private void MainForm_Load(object sender, EventArgs e) { LoadMainEditor(); LoadMailCookietControl(); LoadPopMailControl(); Record record = new Record(); record.ini("get"); // this.notifyIcon1.Visible = true; this.trvListInfo.ExpandAll(); this.BindTreeView(); string[] strArray = record.GetRecord(); this.NickNameEdit.EditValue = strArray[0]; this.SendMailNameEdit.EditValue = strArray[1]; this.ReceiveNameEdit.EditValue = strArray[2]; this.UserNameEdit.EditValue = strArray[3]; this.SubjectEdit.EditValue = strArray[4]; this.ServerNameEdit.EditValue = strArray[5]; this.FliterUsersComboBox.EditValue = "��ʾȫ���û�"; }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { string str = "Time"; if (MessageBox.Show("ȷ��Ҫ�˳���?", "��ʾ", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.Yes) { Record record = new Record(); record.SetRecord(this.NickNameEdit.EditValue.ToString(), this.SendMailNameEdit.EditValue.ToString(), this.ReceiveNameEdit.EditValue.ToString(), this.UserNameEdit.EditValue.ToString(), this.SubjectEdit.EditValue.ToString(), this.ServerNameEdit.EditValue.ToString()); DateTime now = new DateTime(); now = DateTime.Now; int year = now.Year; int month = now.Month; int day = now.Day; string str2 = string.Concat(new object[] { str, year, "��", month, "��", day, "��" }); record.ini("get"); Application.ExitThread(); } else { e.Cancel = true; } }