private void DeleteMenuItem_Click(object sender, RoutedEventArgs e) { if (AppControler.ActualChosenTypeInMenu == AppControler.TaskCollectionType) { DataBase.DeleteCollection(AppControler.ActualChosenIdInMenu); } else if (AppControler.ActualChosenTypeInMenu == AppControler.TaskType) { DataBase.DeleteTask(AppControler.ActualChosenIdInMenu); } else if (AppControler.ActualChosenTypeInMenu == AppControler.PointType) { DataBase.DeletePoint(AppControler.ActualChosenIdInMenu); } AppControler.MenuTreeSourceUpdate(); }
private void EditMenuItem_Click(object sender, RoutedEventArgs e) { if (AppControler.ActualChosenTypeInMenu == AppControler.TaskCollectionType) { Views.TaskCollectionEditWindow taskCollectionEditWindow = new Views.TaskCollectionEditWindow(AppControler.ActualChosenIdInMenu); taskCollectionEditWindow.Show(); } else if (AppControler.ActualChosenTypeInMenu == AppControler.TaskType) { Views.TaskEditWindow taskEditWindow = new Views.TaskEditWindow(AppControler.ActualChosenIdInMenu); taskEditWindow.Show(); } else if (AppControler.ActualChosenTypeInMenu == AppControler.PointType) { Views.PointEditWindow pointEditWindow = new Views.PointEditWindow(AppControler.ActualChosenIdInMenu); pointEditWindow.Show(); } AppControler.MenuTreeSourceUpdate(); }