private void editProfile_Click(object sender, EventArgs e) { if (profilesListBox.SelectedIndex > -1) { string profileName = (string)profilesListBox.SelectedItem; // Get sf from name SettingsFile sf = usb.GetProfiles()[profileName]; CreateProfile cp = new CreateProfile(sf.GetKey <string>("DeviceID"), usb, this, usbListener); cp.SetFromSettingsFile(sf); cp.Show(); } }
private void button1_Click(object sender, EventArgs e) { if (driveLetterComboBox.SelectedIndex > -1) { DriveInfo di = (DriveInfo)driveLetterComboBox.SelectedItem; string toHash = Program.GetUniqueDeviceID(di); string hashCode = Program.GetHashCode(toHash); CreateProfile cp = new CreateProfile(hashCode, usb, this, usbListener); cp.Show(); } }