private void SubjectListModel_NewListOfTimetablesGenerated(object sender, EventArgs e) { _windowStateSummary = null; _newListOfTimetables = (List <List <Slot> >)sender; _chooseSpecificSlotModel = new ChooseSpecificSlotModel(_subjectModels.FindAll(x => x.IsSelected), _permutator); _chooseSpecificSlotWindow = new Window_ChooseSpecificSlot(_chooseSpecificSlotModel); UpdateGUI(_newListOfTimetables); }
private void ChooseSpecificSlotsButton_onClick(object sender, RoutedEventArgs e) { _chooseSpecificSlotWindow.ShowDialog(); if (_chooseSpecificSlotWindow.UserClickedDone && _chooseSpecificSlotWindow.SlotSelectionIsChanged) { UpdateGUI(_chooseSpecificSlotModel.NewListOfTimetables); _windowStateSummary = null; } }
private void SelectSubjectPanel_OnSlotSelectionChanged(object sender, EventArgs e) { _predicates.Clear(); _inputSlots.SelectedSubjectNames = SelectSubjectPanel.GetNamesOfCheckedSubject().ToList(); var selectedSlots = _inputSlots.GetSlotsOf(SelectSubjectPanel.UIDofSelectedSlots); SetTimeConstraintButton.Visibility = selectedSlots.Length == 0 ? Visibility.Hidden : Visibility.Visible; List <List <Slot> > result = RunPermutation(selectedSlots); _windowStateSummary = new Window_StateSummary(selectedSlots.ToList(), result); UpdateGUI(result); }
private void SetTimeConstraintButton_OnClick(object sender, RoutedEventArgs e) { if (_windowStateSummary == null) { _windowStateSummary = new Window_StateSummary(_subjectModels.GetSelectedSlots(), _newListOfTimetables); } _windowStateSummary.ShowDialog(); if (_windowStateSummary.UserClickedDone) { UpdateGUI(_windowStateSummary.RemainingTimetables); } }
private void SetTimeConstraintButton_OnClick(object sender, RoutedEventArgs e) { if (_windowStateSummary == null) { _windowStateSummary = new Window_StateSummary(_inputSlots.GetSlotsOf(SelectSubjectPanel.UIDofSelectedSlots).ToList(), _raw); } _windowStateSummary.ShowDialog(); if (_windowStateSummary.UserClickedDone) { _predicates = _windowStateSummary.Predicates; UpdateGUI(RunPermutation(_inputSlots.GetSlotsOf(SelectSubjectPanel.UIDofSelectedSlots))); } }