/// <summary> /// Clears all data from the DataLists and SubCategory Lists. /// </summary> private void ClearData() { DataViewModel.ClearData(); SubCategoryViewModel.ClearData(); Income.ClearData(); Expense.ClearData(); WindowTitle = "Budget Planner"; BudgetFileName = String.Empty; MainFileDirectory = String.Empty; CategoryDirectory = String.Empty; }
/// <summary> /// Switches to DataView.xaml. Updates the SubCategory Data. /// </summary> public void ViewData() { if (lastScreenIsNF) { _eventAggregator.PublishOnUIThread(new CancelNewEvent()); //CancellingNewBudget?.Invoke(this, new EventArgs()); } Activate_DataView(); DataViewModel.SortCategories(); SubCategoryViewModel.FinishCategories(); DataViewModel.UpdateData(); }
/// <summary> /// Sets up empty data lists. /// </summary> public void InitializeAll() { DataViewModel.Initialize(); SubCategoryViewModel.Initialize(); }