Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (((double)numericUpDown7.Value != 0 ||
          (!numericUpDown7.Enabled && numericUpDown5.Value + numericUpDown6.Value <= 1)) &&
         (double)numericUpDown3.Value != 0 &&
         (int)numericUpDown1.Value != 0 && (int)numericUpDown2.Value != 0 &&
         listBox1.SelectedItem != null && listBox2.SelectedItem != null
         )
     {
         Uzel.Add(
             (double)numericUpDown3.Value,
             listBox1.SelectedIndex,
             listBox2.SelectedIndex,
             (int)numericUpDown1.Value,
             (int)numericUpDown2.Value,
             (double)numericUpDown4.Value,
             (double)numericUpDown5.Value,
             (double)numericUpDown6.Value,
             (double)numericUpDown7.Value
             );
         ChangeTabel();
     }
     else
     {
         MessageBox.Show(
             "Не все вводные данные валидны",
             "Сообщение",
             MessageBoxButtons.OK,
             MessageBoxIcon.Information,
             MessageBoxDefaultButton.Button1,
             MessageBoxOptions.DefaultDesktopOnly);
     }
 }