예제 #1
0
        private void menuFtpDel_Click(object sender, EventArgs e)
        {
            if (lvFtpList.SelectedItems.Count > 0)
            {
                MailFtp mailFtp = (MailFtp)lvFtpList.SelectedItems[0].Tag;

                DialogResult dr = MessageBox.Show("确定删除此条连接?", "确定", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dr == DialogResult.Yes)
                {
                    try
                    {
                        MailFtpStorage.DelMailFtp(mailFtp);
                        MessageBox.Show("已删除!");
                        Manager.ReloadFtpList();
                        ResetDialog();
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                    }
                }
            }
        }