Beispiel #1
0
        /// <summary>Days�I�u�W�F�N�g��ݒ肷��</summary>
        /// <param name="days">Days�I�u�W�F�N�g</param>
        public void SetDays(Days days)
        {
            //���ݕҏW����Days�I�u�W�F�N�g������ꍇ�̓C�x���g�ʒm����
            if (this.days != null)
            {
                this.days.NameChangeEvent -= new Days.NameChangeEventHandler(days_NameChangeEvent);
                this.days.DayChangeEvent -= new Days.DayChangeEventHandler(days_DayChangeEvent);
            }

            this.days = days;

            //�C�x���g�o�^
            days.NameChangeEvent += new Days.NameChangeEventHandler(days_NameChangeEvent);
            days.DayChangeEvent += new Days.DayChangeEventHandler(days_DayChangeEvent);

            //�R���g���[���j�����ɃC�x���g�ʒm����
            this.Disposed += delegate(object sender, EventArgs e)
            {
                days.NameChangeEvent -= new Days.NameChangeEventHandler(days_NameChangeEvent);
                days.DayChangeEvent -= new Days.DayChangeEventHandler(days_DayChangeEvent);
            };

            //������������s��
            bool initFlag = initializing;
            initializing = true;

            //���̂�ݒ�
            tbxDaysName.Text = days.Name;

            //TextBox�ɗj���O���[�v��ݒ�
            tbxSunday.Text = days.GetTermName(DayOfWeek.Sunday);
            tbxMonday.Text = days.GetTermName(DayOfWeek.Monday);
            tbxTuesday.Text = days.GetTermName(DayOfWeek.Tuesday);
            tbxWednesday.Text = days.GetTermName(DayOfWeek.Wednesday);
            tbxThursday.Text = days.GetTermName(DayOfWeek.Thursday);
            tbxFriday.Text = days.GetTermName(DayOfWeek.Friday);
            tbxSaturday.Text = days.GetTermName(DayOfWeek.Saturday);

            initializing = initFlag;
        }
Beispiel #2
0
        public static void MakeScheduler()
        {
            //スケジュールを作成
            //FC有り
            CTSchedule fc = new CTSchedule();
            fc.FCStartTemperature = 13;
            fc.OperatingMode = CTSchedule.Mode.SwitchWithWBTemp;
            fc.OutletWaterTemperatureFC = 16;
            fc.OutletWaterTemperature = 32;

            //FC無し
            CTSchedule noFc = new CTSchedule();
            fc.OperatingMode = CTSchedule.Mode.NoFreeCooling;
            fc.OutletWaterTemperature = 32;

            //期間構造(四季)を作成
            ITermStructure terms = new Seasons(Seasons.PredefinedSeasons.FourSeasons);
            //最上層のスケジューラを作成
            Scheduler<CTSchedule> ctScheduler = new Scheduler<CTSchedule>(terms);

            //期間構造(平日・週末)を作成
            terms = new Days(Days.PredefinedDays.WeekDayAndWeekEnd);
            //冬季用スケジューラを作成
            Scheduler<CTSchedule> winterSC = new Scheduler<CTSchedule>(terms);
            //平日のみFC有り
            winterSC.SetSchedule("週末", noFc);
            winterSC.SetSchedule("平日", fc);

            //冬季の平日を階層構造で表現
            ctScheduler.SetScheduler("冬", winterSC);

            //その他の季節は曜日を問わずFC無し
            ctScheduler.SetSchedule("春", noFc);
            ctScheduler.SetSchedule("夏", noFc);
            ctScheduler.SetSchedule("秋", noFc);
        }