private void newUnitToolStripMenuItem_Click(object sender, EventArgs e) { MessagePrompt mp = new MessagePrompt("Enter new Uid:"); if (mp.ShowDialog() == DialogResult.OK) { string uid = mp.textBox1.Text; UnitType.NewUnitType(uid, UidList.SelectedItem.ToString()); UidList.Items.Add(uid); Saved = false; Sort(); Status.Text = "Derrived new UnitType `" + uid + "`."; } }
private void newUnitToolStripMenuItem1_Click(object sender, EventArgs e) { MessagePrompt mp = new MessagePrompt("Enter new Uid:"); if (mp.ShowDialog() == DialogResult.OK) { string uid = mp.textBox1.Text; UnitType type = new UnitType(); type.Uid = uid; UnitType.Types.Add(uid, type); UidList.Items.Add(uid); Saved = false; Sort(); Status.Text = "Created new UnitType `" + uid + "`."; } }
private void newUnitToolStripMenuItem1_Click(object sender, EventArgs e) { MessagePrompt mp = new MessagePrompt("Enter new Aid:"); if (mp.ShowDialog() == DialogResult.OK) { string aid = mp.textBox1.Text; Ability a = new Ability(); a.Aid = aid; Ability.Abilities.Add(aid, a); AidList.Items.Add(aid); Saved = false; Sort(); Status.Text = "Created new Ability `" + aid + "`."; } }