Ejemplo n.º 1
0
        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);
            }
        }