private void button1_Click(object sender, EventArgs e) { Step3.Visota = Convert.ToInt32(textBox2.Text); Step3.Shirina = Convert.ToInt32(textBox1.Text); Step3.IndentX = Convert.ToInt32(textBox3.Text); Step3.IndentY = Convert.ToInt32(textBox4.Text); Step3.IndentX1 = Convert.ToInt32(textBox5.Text); Step3.IndentY1 = Convert.ToInt32(textBox6.Text); Step3.IndentX2 = Convert.ToInt32(textBox7.Text); Step3.IndentY2 = Convert.ToInt32(textBox8.Text); Step3.IndentX3 = Convert.ToInt32(textBox9.Text); Step3.IndentY3 = Convert.ToInt32(textBox10.Text); Step3.IndentX4 = Convert.ToInt32(textBox11.Text); Step3.IndentY4 = Convert.ToInt32(textBox12.Text); var cfuncdel = new ComboFuncDelBws[] //работа комбобокса при выборе элемента срабатывает метод { Step3.KvadratBws, Step3.KvadratBws2, Step3.KvadratBws3, Step3.KvadratBws4, }; if (comboBox1.SelectedIndex >= 0) { cfuncdel[comboBox1.SelectedIndex](); } Close(); }
private void button3_Click(object sender, EventArgs e) //реализация кнопки построить все { Step3.IndentX = Convert.ToInt32(textBox3.Text); Step3.IndentY = Convert.ToInt32(textBox4.Text); Step3.IndentX1 = Convert.ToInt32(textBox5.Text); Step3.IndentY1 = Convert.ToInt32(textBox6.Text); Step3.IndentX2 = Convert.ToInt32(textBox7.Text); Step3.IndentY2 = Convert.ToInt32(textBox8.Text); Step3.IndentX3 = Convert.ToInt32(textBox9.Text); Step3.IndentY3 = Convert.ToInt32(textBox10.Text); Step3.IndentX4 = Convert.ToInt32(textBox11.Text); Step3.IndentY4 = Convert.ToInt32(textBox12.Text); Step3.Visota = Convert.ToInt32(listBox2.Items.ToString()); Step3.Shirina = Convert.ToInt32(listBox3.Items.ToString()); //Convert.ToInt32(listBox1.SelectedItem.ToString()); //textBox15.Text = Convert.ToString(listBox1.Items[0]); var cfuncdel = new ComboFuncDelBws[] { Step3.KvadratBws, Step3.KvadratBws2, Step3.KvadratBws3, Step3.KvadratBws4, }; if (comboBox1.SelectedIndex >= 0) { cfuncdel[comboBox1.SelectedIndex](); } Close(); }
private void Button1_Click(object sender, RoutedEventArgs e) { var cfuncdel = new ComboFuncDelBws[] //работа комбобокса при выборе элемента срабатывает метод { Step3.KvadratBws }; }