/// <summary> /// Запустить сервис /// </summary> public void Start() { _schedule = TryGetShedule(); _schedule.Validate(); _schedule.Flights = _schedule.Flights.OrderBy(x => x.Time).ToList(); _timeManager.Start(); }
private void _view_MainFormLoad(object sender, EventArgs e) { try { TaskScheduler scheduler = TaskScheduler.FromCurrentSynchronizationContext(); _processInfoService.LoadProcessesInfo(_ctoken) .ContinueWith(ant => { _view.AddGetNICLabel(_processInfoService.ProcessInfo); _loggerFactory.RunProgramLogged(); AddNewProcess(); _timeManager.Start(); }, CancellationToken.None, TaskContinuationOptions.None, scheduler); } catch (Exception ex) { _loggerFactory.ErrorLogged(ex); } }