Esempio n. 1
0
        public override void doit()
        {
            AppForm.CURR_OCTT_DOC.setIsDayIncluded(_guiIndex, false);
            ModelOperations.delDayInModel(_dayIndexInModel, out _undoRedoLists);

            AppForm.getAppForm().refreshGUIAfterDaysTermsChange(true);

            if (_tabIndex == 0)
            {
                AppForm.CURR_OCTT_DOC.CTVSelectedNode = _workingNode;
                AppForm.getAppForm().ctvRefreshTimetablePanel(_workingNode, true, true);

                AppForm.getAppForm().getCoursesTreeView().AfterSelect -= new System.Windows.Forms.TreeViewEventHandler(AppForm.getAppForm().coursesTreeView_AfterSelect);
                AppForm.getAppForm().getCoursesTreeView().SelectedNode = _workingNode;
                AppForm.getAppForm().getCoursesTreeView().AfterSelect += new System.Windows.Forms.TreeViewEventHandler(AppForm.getAppForm().coursesTreeView_AfterSelect);
            }
            else if (_tabIndex == 1)
            {
                AppForm.getAppForm().getTeachersTreeView().AfterSelect -= new System.Windows.Forms.TreeViewEventHandler(AppForm.getAppForm().teachersTreeView_AfterSelect);
                AppForm.getAppForm().getTeachersTreeView().SelectedNode = _workingNode;
                AppForm.getAppForm().getTeachersTreeView().AfterSelect += new System.Windows.Forms.TreeViewEventHandler(AppForm.getAppForm().teachersTreeView_AfterSelect);

                AppForm.CURR_OCTT_DOC.TTVSelectedNode = _workingNode;
                AppForm.getAppForm().ttvRefreshTimetablePanel(_workingNode, true);
            }
            else if (_tabIndex == 2)
            {
                AppForm.getAppForm().getRoomsTreeView().AfterSelect -= new System.Windows.Forms.TreeViewEventHandler(AppForm.getAppForm().roomsTreeView_AfterSelect);
                AppForm.getAppForm().getRoomsTreeView().SelectedNode = _workingNode;
                AppForm.getAppForm().getRoomsTreeView().AfterSelect += new System.Windows.Forms.TreeViewEventHandler(AppForm.getAppForm().roomsTreeView_AfterSelect);

                AppForm.CURR_OCTT_DOC.RTVSelectedNode = _workingNode;
                AppForm.getAppForm().rtvRefreshTimetablePanel(_workingNode, true);
            }
        }
Esempio n. 2
0
        public override void undo()
        {
            foreach (int n in _toAddList)
            {
                int          dayIndexInModel = AppForm.CURR_OCTT_DOC.getDayIndexInModel(n);
                ArrayList [] urLists;
                ModelOperations.delDayInModel(dayIndexInModel, out urLists);
                AppForm.CURR_OCTT_DOC.setIsDayIncluded(n, false);
            }

            AppForm.getAppForm().getTreeTabControl().SelectedIndexChanged -= new System.EventHandler(AppForm.getAppForm().treeTabControl_SelectedIndexChanged);
            AppForm.getAppForm().getTreeTabControl().SelectedIndex         = _tabIndex;
            AppForm.getAppForm().getTreeTabControl().SelectedIndexChanged += new System.EventHandler(AppForm.getAppForm().treeTabControl_SelectedIndexChanged);

            //AppForm.getAppForm().refreshGUIAfterDaysTermsChange(false);
            AppForm.getAppForm().refreshGUIAfterDaysTermsChange(_calledFromMainForm);


            if (_tabIndex == 0)
            {
                AppForm.CURR_OCTT_DOC.CTVSelectedNode = _workingNode;
                AppForm.getAppForm().ctvRefreshTimetablePanel(_workingNode, true, true);

                AppForm.getAppForm().getCoursesTreeView().AfterSelect -= new System.Windows.Forms.TreeViewEventHandler(AppForm.getAppForm().coursesTreeView_AfterSelect);
                AppForm.getAppForm().getCoursesTreeView().SelectedNode = _workingNode;
                AppForm.getAppForm().getCoursesTreeView().AfterSelect += new System.Windows.Forms.TreeViewEventHandler(AppForm.getAppForm().coursesTreeView_AfterSelect);
            }
            else if (_tabIndex == 1)
            {
                AppForm.getAppForm().getTeachersTreeView().AfterSelect -= new System.Windows.Forms.TreeViewEventHandler(AppForm.getAppForm().teachersTreeView_AfterSelect);
                AppForm.getAppForm().getTeachersTreeView().SelectedNode = _workingNode;
                AppForm.getAppForm().getTeachersTreeView().AfterSelect += new System.Windows.Forms.TreeViewEventHandler(AppForm.getAppForm().teachersTreeView_AfterSelect);

                AppForm.CURR_OCTT_DOC.TTVSelectedNode = _workingNode;
                AppForm.getAppForm().ttvRefreshTimetablePanel(_workingNode, true);
            }
            else if (_tabIndex == 2)
            {
                AppForm.getAppForm().getRoomsTreeView().AfterSelect -= new System.Windows.Forms.TreeViewEventHandler(AppForm.getAppForm().roomsTreeView_AfterSelect);
                AppForm.getAppForm().getRoomsTreeView().SelectedNode = _workingNode;
                AppForm.getAppForm().getRoomsTreeView().AfterSelect += new System.Windows.Forms.TreeViewEventHandler(AppForm.getAppForm().roomsTreeView_AfterSelect);

                AppForm.CURR_OCTT_DOC.RTVSelectedNode = _workingNode;
                AppForm.getAppForm().rtvRefreshTimetablePanel(_workingNode, true);
            }
        }