Пример #1
0
 private void btnSSave_Click(object sender, EventArgs e)
 {
     if ((edtPath.Text != "") && General.IsDigitsOnly(edtTimer.Text))
     {
         string reason;
         if (!hasWriteAccessToFolder(edtPath.Text, out reason))
         {
             MessageBox.Show(reason, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return;
         }
         if (int.Parse(edtTimer.Text) < 5)
         {
             MessageBox.Show("Timer has to be higher than 5 seconds");
             return;
         }
         else
         {
             General.SaveSettings(edtPath.Text, int.Parse(edtTimer.Text) * 1000, chkHTML.Checked, chkSave.Checked, chkTray.Checked, chkWarn.Checked); // save settings
             Close();
         }
     }
     else
     {
         MessageBox.Show("Check value for timer and path");
     }
 }