Пример #1
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (textDescript.Text == "")
     {
         MessageBox.Show(Lan.g(this, "The Description cannot be blank"));
         return;
     }
     AutoCodeCur.Description   = textDescript.Text;
     AutoCodeCur.IsHidden      = checkHidden.Checked;
     AutoCodeCur.LessIntrusive = checkLessIntrusive.Checked;
     AutoCodes.Update(AutoCodeCur);
     DialogResult = DialogResult.OK;
 }
Пример #2
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (textDescript.Text == "")
     {
         MessageBox.Show(Lan.g(this, "The Description cannot be blank"));
         return;
     }
     if (listForCode.Count == 0)
     {
         MsgBox.Show(this, "Must have at least one item in the list.");
         //This is not actually rigorous enough since items will already be deleted.
         return;
     }
     AutoCodeCur.Description   = textDescript.Text;
     AutoCodeCur.IsHidden      = checkHidden.Checked;
     AutoCodeCur.LessIntrusive = checkLessIntrusive.Checked;
     AutoCodes.Update(AutoCodeCur);
     DialogResult = DialogResult.OK;
 }