예제 #1
0
 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;
 }
예제 #2
0
 public static IMMCFlasher GetMMCFlasher(MMCDevice device)
 {
     if (!IsUserAnAdmin())
     {
         throw new Exception("You must be admin to use this function...");
     }
     return(new MMCFlasher(device));
 }
예제 #3
0
 public static IMMCFlasher GetMMCFlasher(MMCDevice device)
 {
     return(new MMCFlasher(device));
 }