public BWArgs(Operations op) { Operation = op; foreach (var ctrl in Program.MainForm.devices.Controls) { if (!(ctrl is RadioButton)) { continue; } var rb = ctrl as RadioButton; if (rb.Checked) { Device = (Devices)Enum.Parse(typeof(Devices), rb.Name, true); break; } Device = Devices.None; } if (Program.MainForm.mmcdevice.SelectedItem != null) { MMCDevice = Program.MainForm.mmcdevice.SelectedItem as MMCDevice; } Verify = Program.MainForm.verifyBox.Checked; EraseFirst = Program.MainForm.eraseBox.Checked; AddSpare = Program.MainForm.addSpareBox.Checked; CorrectSpare = Program.MainForm.correctSpareBox.Checked; }
public static IMMCFlasher GetMMCFlasher(MMCDevice device) { if (!IsUserAnAdmin()) { throw new Exception("You must be admin to use this function..."); } return(new MMCFlasher(device)); }
public static IMMCFlasher GetMMCFlasher(MMCDevice device) { return(new MMCFlasher(device)); }