예제 #1
0
 private void combo_mid_DropDownClosed(object sender, EventArgs e)
 {
     try
     {
         if (NODE.comb_mid_figure.SelectedItem.ToString() == "Conus")
         {
             Conus con_form = new Conus(NODE.NodePosition);
             con_form.Owner = this;
             con_form.ShowDialog();
         }
         if (NODE.comb_mid_figure.SelectedItem.ToString() == "Polygon")
         {
             Polyon pol_form = new Polyon(NODE.NodePosition);
             pol_form.Owner = this;
             pol_form.ShowDialog();
         }
         if (NODE.comb_mid_figure.SelectedItem.ToString() == "Cylynder")
         {
             Cylinder cyl_form = new Cylinder(NODE.NodePosition);
             cyl_form.Owner = this;
             cyl_form.ShowDialog();
         }
     }
     catch (Exception) { MessageBox.Show("You have to change somethig"); }
 }
예제 #2
0
        //add_Conus
        private void button4_Click(object sender, EventArgs e)
        {
            Conus con_form = new Conus();

            con_form.Owner = this;
            con_form.ShowDialog();

            if (!Conus.canceled)
            {
                buttonTree1.Add(NODES[NODES.Count - 1]);
                NODES[NODES.Count - 1].comb_mid_figure.SelectedItem = "Conus";
            }
        }