Example #1
0
        private void UnitListBox_Click(object sender, EventArgs e)
        {
            if (UnitListBox.SelectedItems.Count == 1)
            {
                SimUnitXML unit = ((UISimObjectItem)UnitListBox.SelectedItems[0]).mUnitXML;

                if (unit != null)
                {
                    IUnitPicker pickerInterface = CoreGlobals.getEditorMain().mIGUI.getActiveClientPage() as IUnitPicker;
                    if (pickerInterface != null)
                    {
                        pickerInterface.UnitSelectedChanged(unit);
                    }
                }
            }
        }
Example #2
0
        private void UnitTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            if (e.Node.Tag != null)
            {
                SimUnitXML unit = e.Node.Tag as SimUnitXML;

                if (unit != null)
                {
                    IUnitPicker pickerInterface = CoreGlobals.getEditorMain().mIGUI.getActiveClientPage() as IUnitPicker;
                    if (pickerInterface != null)
                    {
                        pickerInterface.UnitSelectedChanged(unit);
                    }
                }
            }
        }