private void btnDelete_Click(object sender, EventArgs e) { if (selectId != -1 && !tFresh.Enabled) { if (tscbAccount.SelectedItem != null) { pop3 = new POP3(accounts[tscbAccount.SelectedItem.ToString()]); } else { return; } pop3.remove(selectId + 1); lbFrom.Text = ""; gbMailHeader.Text = ""; lbDate.Text = ""; txtContentRO.Text = ""; lvMailBox.Items.Clear(); tabcMain.SelectedTab = tbpMailbox; selectId = -1; MessageBox.Show("删除成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); 收取ToolStripMenuItem_Click(this, null); } }
private void 收取ToolStripMenuItem_Click(object sender, EventArgs e) { if (tscbAccount.SelectedItem != null && !tFresh.Enabled) { pop3 = new POP3(accounts[tscbAccount.SelectedItem.ToString()]); } else { return; } lvMailBox.Items.Clear(); pop3.threadingRetrieve(); tFresh.Enabled = true; }