Beispiel #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");
     }
 }
Beispiel #2
0
        private void btnSSave_Click(object sender, EventArgs e)
        {
            if ((edtPath.Text != "") && (General.IsDigitsOnly(edtTimer.Text)))
            {
                if (int.Parse(edtTimer.Text) < 5)
                {
                    MessageBox.Show("Timer has to be higher than 5 seconds");
                }
                else
                {
                    General.setSettings(edtPath.Text, int.Parse(edtTimer.Text) * 1000, chkHTML.Checked, chkSave.Checked, chkTray.Checked, chkWarn.Checked); // save settings

                    this.Close();
                }
            }
            else
            {
                MessageBox.Show("Check value for timer and path");
            }
        }
Beispiel #3
0
        private void btnSSave_Click(object sender, EventArgs e)
        {
            if ((edtPath.Text != "") && (General.IsDigitsOnly(edtTimer.Text)))
            {
                if (!hasWriteAccessToFolder(edtPath.Text))
                {
                    MessageBox.Show("No Permission to write to the selected folder", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                if (int.Parse(edtTimer.Text) < 5)
                {
                    MessageBox.Show("Timer has to be higher than 5 seconds");
                }
                else
                {
                    General.setSettings(edtPath.Text, int.Parse(edtTimer.Text) * 1000, chkHTML.Checked, chkSave.Checked, chkTray.Checked, chkWarn.Checked); // save settings

                    this.Close();
                }
            }
            else
            {
                MessageBox.Show("Check value for timer and path");
            }
        }