public WorkerThread(int parallelRunCount, MainControl mainControl) { this.mainControl = mainControl; innerWorker.AddWorkItem(() => { safe.AddLock(); safe.SafeOpened += () => mainControl.Invoke(new Action(() => mainControl.State = MainControl.States.Stopped)); foreach (var _ in Enumerable.Range(0, parallelRunCount)) StartAlgorithm(); safe.RemoveLock(); }); }
public void Init(MainControl mainControl) { this.mainControl = mainControl; stopButton.Click += StopButtonClick; saveCurrentToSettings.Click += SavePermButtonClick; }
public void Init(MainControl mainControl) { this.mainControl = mainControl; }
public void Init(MainControl mainControl) { this.mainControl = mainControl; stopButton.Click += StopButtonClick; }