Ejemplo n.º 1
0
 private void m_listDriveLetters_ItemChecked(object sender, ItemCheckedEventArgs e)
 {
     try
     {
         HideDriveLetter.Hide(e.Item.Text[0], e.Item.Checked);
     }
     catch (Exception err)
     {
         PopUp.MessageBox(err.Message, "HideDriveLetter: ItemChecked");
     }
 }
Ejemplo n.º 2
0
        public void ReloadList()
        {
            try
            {
                m_listDriveLetters.Items.Clear();

                DriveInfo[] driveInfos = System.IO.DriveInfo.GetDrives();

                foreach (char c in DRIVE_LETTERS)
                {
                    bool         isHidden = HideDriveLetter.IsDriveHidden(c);
                    ListViewItem itm      = m_listDriveLetters.Items.Add(c.ToString());
                    itm.SubItems.Add(GetDriveDescription(c, driveInfos));
                    itm.Checked = isHidden;
                }
            }
            catch (Exception err)
            {
                PopUp.MessageBox(err.Message, "HideDriveLetter: Load");
            }
        }