示例#1
0
        public ChangeEduProgramGroupDataCmd(EduProgramGroup epg, string newName, string newExtID)
        {
            _epg = epg;

            _oldName = _epg.getName();
            _newName = newName;

            _oldExtID = _epg.ExtID;
            _newExtID = newExtID;
        }
示例#2
0
        private void Form_Closing(Object sender, CancelEventArgs e)
        {
            if (this.DialogResult == DialogResult.OK)
            {
                if (_epg == null)
                {
                    if (!EduProgramGroup.checkNewName(_epgNameTextBox.Text))
                    {
                        e.Cancel = true;

                        string message2 = RES_MANAGER.GetString("Form_Closing.msb.epgnotcreated.message");

                        string caption2 = RES_MANAGER.GetString("Form_Closing.msb.epgnotcreated.caption");

                        MessageBoxButtons buttons2 = MessageBoxButtons.OK;

                        MessageBox.Show(this, message2, caption2, buttons2,
                                        MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                    }
                    else
                    {
                        e.Cancel = false;
                    }
                }
                else
                {
                    if (_epgNameTextBox.Text.ToUpper() != _epg.getName().ToUpper())
                    {
                        if (!EduProgramGroup.checkNewName(_epgNameTextBox.Text))
                        {
                            e.Cancel = true;

                            string message2 = RES_MANAGER.GetString("Form_Closing.msb.epgdatanotchanged.message");

                            string caption2 = RES_MANAGER.GetString("Form_Closing.msb.epgdatanotchanged.caption");

                            MessageBoxButtons buttons2 = MessageBoxButtons.OK;

                            MessageBox.Show(this, message2, caption2, buttons2,
                                            MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                        }
                        else
                        {
                            e.Cancel = false;
                        }
                    }
                }
            }
        }
        private void Form_Load(object sender, System.EventArgs e)
        {
            _topLabel.Text = RES_MANAGER.GetString("Form_Load._topLabel.Text1") + " '" + _course.getFullName() + "' " + RES_MANAGER.GetString("Form_Load._topLabel.Text2");

            if (_course.getCoursesToHoldTogetherList() != null)
            {
                _thtWorkingList = (ArrayList)_course.getCoursesToHoldTogetherList().Clone();
            }

            foreach (Course tempCourse in _thtWorkingList)
            {
                string [] epgAndEpAndCourse = new string[3];

                EduProgram      ep  = (EduProgram)tempCourse.Parent;
                EduProgramGroup epg = (EduProgramGroup)ep.Parent;

                String textEduProgram = ep.getName() + ", " + ep.getCode() + ", " + ep.getSemester() + ". " + RES_MANAGER.GetString("Form_Load.listView.textEduProgram.sem");

                epgAndEpAndCourse[0] = epg.getName();
                epgAndEpAndCourse[1] = textEduProgram;
                epgAndEpAndCourse[2] = tempCourse.getFullName();

                ListViewItem newLvi = new ListViewItem(epgAndEpAndCourse);
                newLvi.Tag = tempCourse;
                _thtCoursesListView.Items.Add(newLvi);
            }

            this.fillPickListView();

            if (_isFormDisabled)
            {
                this._thtPickListView.DoubleClick    -= new System.EventHandler(this._thtPickListView_DoubleClick);
                this._thtCoursesListView.DoubleClick -= new System.EventHandler(this._thtCoursesListView_DoubleClick);


                this.Text        += " - READ ONLY";
                _okButton.Enabled = false;
            }
        }
示例#4
0
 public EPGPropertiesForm(EduProgramGroup epg) : this()
 {
     _epg = epg;
     _epgNameTextBox.Text = epg.getName();
     _extIDTextBox.Text   = epg.ExtID;
 }