58 lines
1.7 KiB
C#
58 lines
1.7 KiB
C#
using LibW4M.Data.WeaponFactory;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using W4Gui.Dialogs;
|
|
|
|
namespace W4Gui.Components
|
|
{
|
|
public partial class TeamsPanel : UserControl
|
|
{
|
|
private WeaponData weapon;
|
|
private WeaponData weaponCluster;
|
|
public TeamsPanel()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
|
|
private void btnChangeWeapon_Click(object sender, EventArgs e)
|
|
{
|
|
CollectiveSelectionDialog csd = new CollectiveSelectionDialog(DataManager.SaveFile.WeaponFactoryCollective);
|
|
if(csd.ShowDialog() == DialogResult.OK)
|
|
{
|
|
WeaponStore store = csd.SelectedEntry as WeaponStore;
|
|
weapon = store.Weapon;
|
|
}
|
|
}
|
|
|
|
private void btnChangeCluster_Click(object sender, EventArgs e)
|
|
{
|
|
CollectiveSelectionDialog csd = new CollectiveSelectionDialog(DataManager.SaveFile.WeaponFactoryCollective);
|
|
if (csd.ShowDialog() == DialogResult.OK)
|
|
{
|
|
WeaponStore store = csd.SelectedEntry as WeaponStore;
|
|
weaponCluster = store.Cluster;
|
|
}
|
|
}
|
|
|
|
private void btnEditWeapon_Click(object sender, EventArgs e)
|
|
{
|
|
EditWeaponDialog ewd = new EditWeaponDialog(ref weapon);
|
|
ewd.ShowDialog();
|
|
}
|
|
|
|
private void brnEditCluster_Click(object sender, EventArgs e)
|
|
{
|
|
EditWeaponDialog ewd = new EditWeaponDialog(ref weaponCluster);
|
|
ewd.ShowDialog();
|
|
}
|
|
}
|
|
}
|