private void button2_Click(object sender, EventArgs e)
 {
     this.Hide();
     if (tree.SelectedNode == null)
     {
         MessageBox.Show("You Cannot add a Sector Object without first \n having a sector selected. Please " +
             "select a sector and try again!");
     }
     else
     {
         if (tree.SelectedNode.Parent != null)
         {
             NewSectorObject newSectorObject = new NewSectorObject(comboBox1.SelectedItem.ToString(), tree, secWin);
             newSectorObject.ShowDialog();
         }
         else
         {
             MessageBox.Show("You Cannot add a Sector Object without first \n having a sector selected. Please " +
             "select a sector and try again!");
         }
     }
 }
Esempio n. 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     this.Hide();
     if (tree.SelectedNode == null)
     {
         MessageBox.Show("You Cannot add a Sector Object without first \n having a sector selected. Please " +
                         "select a sector and try again!");
     }
     else
     {
         if (tree.SelectedNode.Parent != null)
         {
             NewSectorObject newSectorObject = new NewSectorObject(comboBox1.SelectedItem.ToString(), tree, secWin);
             newSectorObject.ShowDialog();
         }
         else
         {
             MessageBox.Show("You Cannot add a Sector Object without first \n having a sector selected. Please " +
                             "select a sector and try again!");
         }
     }
 }
 public void canvasCamera_MouseDown(object sender, PInputEventArgs e)
 {
     if (_nso != null)
     {
         _nso.setPosition(e.Position);
         _nso.Show();
         _nso = null;
     }
 }
 public void newSectorObject(NewSectorObject nso)
 {
     _nso = nso;
 }