private void SaveSettings() { SMTPHost = SMTPHostBox.Text; SMTPName = SMTPNameBox.Text; SMTPPass = SMTPPassBox.Text; POPHost = POPHostBox.Text; POPName = POPNameBox.Text; POPPass = POPPassBox.Text; try { SMTPPort = Int32.Parse(SMTPPortBox.Text); POPPort = Int32.Parse(POPPortBox.Text); this.Close(); } catch { MessageBox.Show("Wrong Port Format"); } IOComms.writeSettings(); }
private void MainForm_Load(object sender, EventArgs e) { IOComms.readSettings(); }