private void GetProgTasks()
        {
            SettingsViewModel settings = this.view.SettingsView;

            ProgTask.CommanderPath = settings.CommanderFile;
            ProgTask.Rom1          = settings.FlashROM1 ? settings.ROM1File : string.Empty;
            ProgTask.Rom2          = settings.FlashROM2 ? settings.ROM2File : string.Empty;

            this.progTaskList.Clear();
            this.progTaskStatusList.Clear();
            this.progProcessList.Clear();
            this.view.ProgView.ProcessList.Clear();
            foreach (SettingsViewModel.JLink jlink in settings.JLinkList)
            {
                if (jlink.Selection)
                {
                    ProgViewModel.ProgProcess progProcess = new ProgViewModel.ProgProcess();
                    progProcess.Steps[ProgViewModel.N_JLinkSN].Text = jlink.SerialNumber;
                    this.view.ProgView.ProcessList.Add(progProcess);
                    this.progProcessList.Add(jlink.SerialNumber, progProcess);
                    ProgTask progTask = new ProgTask(jlink.SerialNumber, settings.RandomMAC, settings.RandomInstallCode);
                    progTask.TaskProgressUpdated += ProgTask_TaskUpdated;
                    progTask.StepUpdated         += ProgTask_StepUpdated;
                    progTask.TaskCompleted       += ProgTask_TaskCompleted;
                    this.progTaskList.Add(jlink.SerialNumber, progTask);
                }
            }
        }
 public MainWindow()
 {
     this.view        = new MainWindowViewModel();
     this.DataContext = this.view;
     InitializeComponent();
     this.jlink              = new ProgTask(null, true, true);
     this.configUtil         = new ConfigUtils();
     this.progTaskList       = new Dictionary <string, ProgTask>();
     this.progTaskStatusList = new List <string>();
     this.progProcessList    = new Dictionary <string, ProgViewModel.ProgProcess>();
 }