async internal void TestScheduler() { ViewState = ViewStates.InTestCalculation; StringBuilder result = new StringBuilder(); SchedulerM.resetFirmeUltimeEsecuzione(); Task <SortedDictionary <DateTime, string> > taskThread = Task <SortedDictionary <DateTime, string> > .Factory.StartNew(() => SchedulerM.TestScheduler(false)); await taskThread; foreach (KeyValuePair <DateTime, string> date in taskThread.Result) { result.Append(date.Value + " - " + date.Key.DayOfWeek + Util.crLf); } //TestResult += date.Value + " - " + date.Key.DayOfWeek + Util.crLf; TestResult = result.ToString().RemoveFinal(Util.crLf); ViewState = ViewStates.InTestResultShowing; }
public SchedulerVM(SchedulerM schedulerM) //SchedulerM parameter constructor for CreateVmFromM Converter { SchedulerM = schedulerM; }
public SchedulerVM() { SchedulerM = new SchedulerM(); }