示例#1
0
 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);
 }
示例#2
0
 private void ChooseSpecificSlotsButton_onClick(object sender, RoutedEventArgs e)
 {
     _chooseSpecificSlotWindow.ShowDialog();
     if (_chooseSpecificSlotWindow.UserClickedDone && _chooseSpecificSlotWindow.SlotSelectionIsChanged)
     {
         UpdateGUI(_chooseSpecificSlotModel.NewListOfTimetables);
         _windowStateSummary = null;
     }
 }
示例#3
0
        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);
        }
示例#4
0
 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);
     }
 }
示例#5
0
 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)));
     }
 }