Ejemplo n.º 1
0
        private async void targetToolStripMenuItem_Click(object sender, EventArgs e)
        {
            mTarget mTarget = new mTarget(galaxy);

            using (UnitEditor ue = new UnitEditor(mTarget))
                if (ue.ShowDialog() == DialogResult.OK)
                {
                    string xml = await server.CheckUnitXml(ue.XML);

                    await galaxy.UpdateUnitXml(xml);
                }
        }
Ejemplo n.º 2
0
        public mTargetPanel(mTarget mTarget)
        {
            InitializeComponent();

            this.mTarget = mTarget;

            foreach (Team t in mTarget.Galaxy.Universe.Teams)
            {
                ComboBoxItem item = new ComboBoxItem(t.Name, t);
                teamComboBox.Items.Add(item);

                if (t.Name == mTarget.Team.Name)
                {
                    teamComboBox.SelectedItem = item;
                }
            }

            if (teamComboBox.SelectedItem == null)
            {
                teamComboBox.SelectedIndex = 0;
            }

            sequenceNumericUpDown.Minimum = decimal.MinValue;
            sequenceNumericUpDown.Maximum = decimal.MaxValue;
            sequenceNumericUpDown.Value   = mTarget.Sequence;

            hintNumericUpDown.Minimum = decimal.MinValue;
            hintNumericUpDown.Maximum = decimal.MaxValue;

            if (mTarget.Hint.HasValue)
            {
                hintCheckBox.Checked    = true;
                hintNumericUpDown.Value = (decimal)mTarget.Hint;
            }
            else
            {
                hintCheckBox.Checked      = false;
                hintvalueLabel.Visible    = false;
                hintNumericUpDown.Visible = false;
            }
        }