Пример #1
0
        private void targetBtn_Click(object sender, EventArgs e)
        {
            UnitPicker unitPicker = new UnitPicker(Units);

            unitPicker.UnitPicked   += UnitPicked;
            unitPicker.StartPosition = FormStartPosition.CenterParent;
            unitPicker.ShowDialog();
        }
Пример #2
0
        private void UnitPicked(object sender, UnitEventArgs e)
        {
            PickedUnit = e.Unit;
            UpdateData();

            UnitPicker unitPicker = (UnitPicker)sender;

            unitPicker.Close();
        }
Пример #3
0
 private void targetBtn_Click(object sender, EventArgs e)
 {
     UnitPicker unitPicker = new UnitPicker(Units);
     unitPicker.UnitPicked += UnitPicked;
     unitPicker.StartPosition = FormStartPosition.CenterParent;
     unitPicker.ShowDialog();
 }