private void Add_Load(object sender, EventArgs e) { listDrives = DriveInfo.GetDrives().Where(drive => drive.DriveType != DriveType.CDRom).ToList(); foreach (var drive in listDrives) { if (drive.Name != @"C:\") { comboBoxDevice.Items.Add(drive.VolumeLabel); } } usbInfoList = UsbInfoList.Deserialize() ?? new UsbInfoList(); var toolTip1 = new ToolTip { AutoPopDelay = 5000, InitialDelay = 1000, ReshowDelay = 500 }; toolTip1.SetToolTip(radioButtonFast, "Copy the entire folder of the drive"); toolTip1.SetToolTip(radioButtonLight, "Compress the entire folder of the drive in one zip"); toolTip1.SetToolTip(radioButtonSingle, "Compress the single folders of the drive in multiple zip"); toolTip1.SetToolTip(radioButtonComplex, "Compress the single folders of the device and then compress in a single zip"); if (Properties.Settings.Default.Ip != "") { checkBoxBackCloud.Enabled = true; } }
private void rimuoviToolStripMenuItem_Click(object sender, EventArgs e) { new FormRemove().ShowDialog(); usbInfoList = UsbInfoList.Deserialize() ?? new UsbInfoList(); listBoxDevices.Items.Clear(); foreach (var usbs in usbInfoList) { listBoxDevices.Items.Add(usbs.VolumeLabel); } }
private void Form1_Load(object sender, EventArgs e) { Helper.CreateShortCut(); listDrives = DriveInfo.GetDrives().Where(drive => drive.DriveType != DriveType.CDRom).ToList(); usbInfoList = UsbInfoList.Deserialize() ?? new UsbInfoList(); StartDetector(); foreach (var usbs in usbInfoList) { listBoxDevices.Items.Add(usbs.VolumeLabel); } linkLabelDeviceBackupPath.LinkClicked += LinkLabelDeviceBackupPath_LinkClicked; WindowState = FormWindowState.Minimized; }
private void FormRemove_Load(object sender, EventArgs e) { usbInfoList = UsbInfoList.Deserialize() ?? new UsbInfoList(); foreach (var usb in usbInfoList) { comboBoxRemove.Items.Add(usb.VolumeLabel); } if (comboBoxRemove.Items.Count < 1) { return; } comboBoxRemove.SelectedIndex = 0; }