Beispiel #1
0
 private void Button1_Click(object sender, EventArgs e)
 {
     try
     {
         UjTapanyagForm dialogus = new UjTapanyagForm();
         if (dialogus.ShowDialog() == DialogResult.OK)
         {
             ListBoxRefresh();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #2
0
 private void Button2_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedIndex != -1)
     {
         try
         {
             UjTapanyagForm dialogus = new UjTapanyagForm((Tapanyag)listBox1.SelectedItem, true);
             dialogus.ShowDialog();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     else
     {
         MessageBox.Show("To display a nutrient choose one!", "Attention!", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #3
0
 private void Button3_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedIndex != -1)
     {
         try
         {
             UjTapanyagForm dialogus = new UjTapanyagForm((Tapanyag)listBox1.SelectedItem);
             if (dialogus.ShowDialog() == DialogResult.OK)
             {
                 ListBoxRefresh();
             }
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     else
     {
         MessageBox.Show("To modify a nutrient choose one!", "Attention!", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }