Esempio n. 1
0
 private void LoadTasks(string filePath)
 {
     try
     {
         _taskList             = new TaskList(filePath);
         User.Default.FilePath = filePath;
         User.Default.Save();
         _changefile.ViewOnFile(User.Default.FilePath);
         FilterAndSort(_currentSort);
     }
     catch (Exception ex)
     {
         HandleException("An error occurred while opening " + filePath, ex);
         sortMenu.IsEnabled = false;
     }
 }
Esempio n. 2
0
 private void LoadTasks(string filePath)
 {
     try
     {
         _taskList             = new TaskList(filePath);
         User.Default.FilePath = filePath;
         User.Default.Save();
         _changefile.ViewOnFile(User.Default.FilePath);
         FilterAndSort(_currentSort);
     }
     catch (Exception ex)
     {
         var msg = "An error occurred while openning " + filePath;
         Log.Error(msg, ex);
         MessageBox.Show(ex.Message, msg, MessageBoxButton.OK, MessageBoxImage.Error);
         sortMenu.IsEnabled = false;
     }
 }