コード例 #1
0
        public frmCalendarOption(CalendarOption Option)
        {
            InitializeComponent();

            mOption = Option;
            chkTeacher.Checked = Option.IsTeacher;
            chkClass.Checked = Option.IsClass;
            chkClassroom.Checked = Option.IsClassroom;
            chkSubject.Checked = Option.IsSubject;
            chkSubjectAlias.Checked = Option.IsSubjectAlias;
        }
コード例 #2
0
        /// <summary>
        /// 取得教師設定
        /// </summary>
        /// <returns></returns>
        public static CalendarOption GetTeacherOption()
        {
            if (vTeacherOption == null)
                vTeacherOption = new CalendarOption();

            vTeacherOption.Type = CalendarType.Teacher;
                Campus.Configuration.ConfigData config = Campus.Configuration.Config.User["TeacherOption"];
                string DisplayTeacher = config["DisplayTeacher"];
                string DisplayClass = config["DisplayClass"];
                string DisplayClassroom = config["DisplayClassroom"];
                string DisplaySubject = config["DisplaySubject"];
                string DisplaySubjectAlias = config["DisplaySubjectAlias"];

                if (string.IsNullOrWhiteSpace(DisplayTeacher))
                    vTeacherOption.IsTeacher = false;
                else
                    vTeacherOption.IsTeacher = DisplayTeacher.ToLower().Equals("false") ? false : true;

                if (string.IsNullOrWhiteSpace(DisplayClass))
                    vTeacherOption.IsClass = true;
                else
                    vTeacherOption.IsClass = DisplayClass.ToLower().Equals("false") ? false : true;

                if (string.IsNullOrWhiteSpace(DisplayClassroom))
                    vTeacherOption.IsClassroom = false;
                else
                    vTeacherOption.IsClassroom = DisplayClassroom.ToLower().Equals("false") ? false : true;

                if (string.IsNullOrWhiteSpace(DisplaySubject))
                    vTeacherOption.IsSubject = true;
                else
                    vTeacherOption.IsSubject = DisplaySubject.ToLower().Equals("false") ? false : true;

                if (string.IsNullOrWhiteSpace(DisplaySubjectAlias))
                    vTeacherOption.IsSubjectAlias = false;
                else
                    vTeacherOption.IsSubjectAlias = DisplaySubjectAlias.ToLower().Equals("false") ? false : true;

                return vTeacherOption;
        }