Exemplo n.º 1
0
 private void RefreshCommandsCanExecute(object sender, LogFileLoader.ResultEvent resultEvent)
 {
     _fileLoader.LoadResultEvent -= RefreshCommandsCanExecute;
     _fileLoader = null;
     ManageRepositoriesViewModel.IsLoading = false;
     CommandRefresh.CanExecute(null);
     CommandDelete.CanExecute(null);
     LogEntryRows.FilterYalvView.CanExecute(null);
     RaisePropertyChanged("HasData");
 }
Exemplo n.º 2
0
 /// <summary>
 /// Method is executed when the background process finishes and returns here
 /// because it was cancelled or is done processing.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FileLoaderLoadResultEvent(object sender, LogFileLoader.ResultEvent e)
 {
     _fileLoader.LoadResultEvent -= FileLoaderLoadResultEvent;
     _fileLoader = null;
     ManageRepositoriesViewModel.IsLoading = false;
     if (e.InnerException != null)
     {
         var exp = new ApplicationException(e.Message, e.InnerException)
         {
             Source = "LoadFileLoader"
         };
         exp.Data.Add("Process cancelled?", e.Cancel.ToString());
         MessageBox.Show(string.Format("Exception : {0} \n {1}", exp, e.Error),
                         Resources.GlobalHelper_ParseLogFile_Error_Title,
                         MessageBoxButton.OK, MessageBoxImage.Exclamation);
         LoadFinishedEvent(false);
     }
     else
     {
         LoadFinishedEvent(true);
     }
 }