public void Run(model.ITest test) { submittedTasks.Clear(); this.test = test; tasks = new CircularEnumerator<ITask>(test.Tasks); tasks.MoveNext(); var progress = new ProgressDialogImpl(); progress.Begin("Lade Test..."); progress.Show(); Task.Factory .StartNew(() => { positioner.PositionWindow(testUi.AsWindow()); volumeProvider.Initialize(); }) .ContinueWith(t => { progress.Close(); var currentTask = tasks.Current; UpdateUiForCurrentTask(); }, TaskScheduler.FromCurrentSynchronizationContext()); }
public void Run(model.ITest test) { submittedTasks.Clear(); this.test = test; tasks = new CircularEnumerator <ITask>(test.Tasks); tasks.MoveNext(); var progress = new ProgressDialogImpl(); progress.Begin("Lade Test..."); progress.Show(); Task.Factory .StartNew(() => { positioner.PositionWindow(testUi.AsWindow()); volumeProvider.Initialize(); }) .ContinueWith(t => { progress.Close(); var currentTask = tasks.Current; UpdateUiForCurrentTask(); }, TaskScheduler.FromCurrentSynchronizationContext()); }