Example #1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtName.Text))
     {
         MessageBox.Show("Input name");
     }
     else
     {
         if (HelperImage.ExistsName(txtName.Text) && txtName.Enabled == true)
         {
             MessageBox.Show("Name has other item");
         }
         else
         {
             if (MessageBox.Show("Do you want save changes ?", "Save", MessageBoxButtons.YesNo) == DialogResult.Yes)
             {
                 HelperImage.SaveInfo(txtName.Text, txtOutput.Text);
                 DialogResult = DialogResult.OK;
                 this.Close();
             }
         }
     }
 }