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"); } }
private void Node_CustomizeButton_Click(object sender, EventArgs e) { Polyon pol_form = new Polyon(NODE.NodePosition); pol_form.Owner = this; pol_form.ShowDialog(); }
//add_Polyon private void button1_Click(object sender, EventArgs e) { Polyon pol_form = new Polyon(); pol_form.Owner = this; pol_form.ShowDialog(); if (!Polyon.canceled) { buttonTree1.Add(NODES[NODES.Count - 1]); NODES[NODES.Count - 1].comb_mid_figure.SelectedItem = "Polygon"; } }