Beispiel #1
0
 private void CreateOrFindSystem(object sender, EventArgs e)
 {
     if (String.Compare(SelectedItem.ToString(), "<New>") == 0)
     {
         QueryNewName name = new QueryNewName("Enter new SyStem Name");
         name.ShowDialog();
         if (name.DialogResult == DialogResult.OK)
         {
             Oolite_System_Info info = Local.AddSystem(name.textBox1.Text);
             Items.Add(info);
         }
     }
 }
Beispiel #2
0
        private void CreateOrFindCommodity(object sender, EventArgs e)
        {
            if (String.Compare(SelectedItem.ToString(), "<New>") == 0)
            {
                QueryNewName name = new QueryNewName("Enter new Commodity Name");

                name.ShowDialog();
                if (name.DialogResult == DialogResult.OK)
                {
                    Commodity info = Local.AddCommodity(name.textBox1.Text);
                    Items.Add(info);
                }
            }
        }