Example #1
0
        private void btnCachly_Click(object sender, EventArgs e)
        {
            frmCachly cachLyFile = new frmCachly(_path, clamav.NameVirus);

            cachLyFile.ShowDialog();
            if (cachLyFile.EncryptFileComplete)
            {
                Close();
            }
        }
Example #2
0
 private void btnCachly_Click(object sender, EventArgs e)
 {
     if (listView.SelectedItems.Count != 0)
     {
         frmCachly deleteFile = new frmCachly(_dsPath[listView.FocusedItem.Index], _dsVirusName[listView.FocusedItem.Index]);
         deleteFile.ShowDialog();
         if (deleteFile.EncryptFileComplete)
         {
             _dsPath.RemoveAt(listView.FocusedItem.Index); _dsVirusName.RemoveAt(listView.FocusedItem.Index);
             for (int i = listView.SelectedItems.Count; i > 0; i--)
             {
                 ListViewItem item = listView.SelectedItems[i - 1];
                 listView.Items[item.Index].Remove();
             }
         }
     }
     else
     {
         MyMessageBox.ShowMessage("Bạn chưa chọn tệp cần cách ly !", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }