private void btnOK_Click(object sender, EventArgs e)
        {
            if (txtName.Text == "")
            {
                MessageBox.Show("名前を入力して下さい");
                return;
            }
            Person.Name = txtName.Text;
            switch (cmbAttr.Text)
            {
            case "医員":
                Person.Attre = StandbyList.Person.Attributes.医員;
                break;

            case "助教":
                Person.Attre = StandbyList.Person.Attributes.助教;
                break;
            }
            Person.Requirement.PossibleTimes        = (int)num1st.Value;
            Person.Requirement.HolidayPossibleTimes = (int)numHoliday.Value;
            Person.Requirement.Interval             = (int)numInterval.Value;
            Person.Requirement.HolidayInterval      = (int)numHolidayInterval.Value;
            if (!Person.Possible.Any(t => t.Year == Year && t.Month == Month))
            {
                Person.Possible.Add(new PossibleDays(Year, Month));
            }
            for (int i = 0; i < DateTime.DaysInMonth(Year, Month); i++)
            {
                DateTime dt = new DateTime(Year, Month, i + 1);
                CalendarControl.Schedule[] schedule = calendar1.GetSchedule(dt);
                if (schedule.Count() != 0 && schedule[0].Item.ToString() == "×")
                {
                    Person[new DateTime(Year, Month, i + 1)] = StandbyList.PossibleDays.Status.Affair;
                }
                else if (schedule.Count() != 0 && schedule[0].Item.ToString() == "△")
                {
                    Person[new DateTime(Year, Month, i + 1)] = PossibleDays.Status.Limited;
                }
                else
                {
                    Person[new DateTime(Year, Month, i + 1)] = StandbyList.PossibleDays.Status.None;
                }
            }
            // RepeatRuleによる他の月における不都合日の設定
            AddedRule.ForEach(t => SetOtherMonthsAffair(t));
            Person.Requirement.RepeatRule.AddRange(AddedRule);
            DeletedRule.ForEach(t => DeleteOtherMonthsRules(t));
            DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }
        private void setRule(RepeatRule rule)
        {
            // ルールに則ってカレンダーに不都合日を設定する
            var days = rule.GetDays(Year, Month);

            days.AddRange(getBAMonthsAffairDays(Year, Month, rule));
            days.Where(day => day > 0 && day <= DateTime.DaysInMonth(Year, Month)).ToList().ForEach(day =>
            {
                DateTime target = new DateTime(Year, Month, day);
                var schedule    = calendar1.GetSchedule(target);
                CalendarControl.Schedule item = new CalendarControl.Schedule();

                item.Start = target;
                if (schedule.Count() == 0)
                {
                    item.Item      = "×";
                    item.Alignment = StringAlignment.Center;
                    calendar1.RemoveSchedule(item.Start);
                    calendar1.AddSchedule(item);
                }
            });
            AddedRule.Add(rule);
        }