private void ProjectEdit(Project project) { windowArgs.Save = false; ProjectWindow window = new ProjectWindow(project, windowArgs); window.ShowDialog(); if (!windowArgs.Save) { return; } int Counter = 0; while (Projects[Counter].WeekNoReference != windowArgs.ProjectScreen.WeekNoReference && Counter < Projects.Count) { Counter++; } Projects[Counter] = windowArgs.ProjectScreen; }
private void ProjectAdd() { Project project = new Project { WeekNoCompact = SelectedWeekNoCompact, Count = SelectedWeekNoMaxumumCount + 1 }; windowArgs.Save = false; ProjectWindow window = new ProjectWindow(project, windowArgs); window.ShowDialog(); if (!windowArgs.Save) { //Cancelled return; } Projects.Add(windowArgs.ProjectScreen); ProjectDate_SelectedDateChanged(); }