private void onClose(object sender, FormClosingEventArgs e) { Settings1 settings = new Settings1(); settings.Reload(); if (passSave.Checked) { settings.savepass = true; settings.password = textBox1.Text; } settings.username = TxtPhone.Text; settings.pop3 = textBox2.Text; settings.usessl = ssl.Checked; settings.Save(); }
private void button2_Click(object sender, EventArgs e) { //save the settings Settings1 settings = new Settings1(); settings.interval = int.Parse(textBoxInterval.Text); settings.username = textBoxName.Text; settings.password = textBoxPassword.Text; settings.pop3 = textBoxServer.Text; settings.subject = textBoxSubject.Text; settings.chain = checkBoxChain.Checked; settings.record = checkBoxRecord.Checked; settings.deleteAfterSending = !checkBoxSave.Checked; settings.savepass = checkBoxSavePass.Checked; settings.sendRecordingToSender = checkBoxSend.Checked; settings.Save(); this.Close(); }