private void Control_OnMouseDoubleClick(object sender, MouseButtonEventArgs e) { var dataGrid = (DataGrid)sender; var day = (Day)dataGrid.SelectedItem; if (day == null) { return; } var editShowWindow = new EditDayWindow(day); if (editShowWindow.ShowDialog() == false) { var memento = _timeTableCaretaker.GetState(); FirstWeek = memento.FirstWeek; SecondWeek = memento.SecondWeek; } CheckWeek(FirstWeek); CheckWeek(SecondWeek); SaveState(); }
private void Control_OnMouseDoubleClick(object sender, MouseButtonEventArgs e) { var dataGrid = (DataGrid) sender; var day = (Day) dataGrid.SelectedItem; if (day == null) { return; } var editShowWindow = new EditDayWindow(day); if(editShowWindow.ShowDialog() == false) { _timeTableCaretaker.RestoreState(_project); } CheckWeek(FirstWeek); CheckWeek(SecondWeek); SaveState(); }