コード例 #1
0
        public void LoadGUI()
        {
            int i = 0;

            foreach (UIElement UIE in this.UIDays.Children)
            {
                if (UIE is UIDay)
                {
                    UIDay UIday = UIE as UIDay;
                    UIday.Date = this.firstDateOfMonth.AddDays(i++);
                    if (UIday.Date.Month != this._date.Month)
                    {
                        UIday.Mode = ModeDay.Disable;
                    }
                    else
                    {
                        UIday.Mode = ModeDay.Enable;
                    }
                    if (UIday.Date.Date == this.curDate.Date)
                    {
                        UIday.isCurDay = true;
                    }
                    else
                    {
                        UIday.isCurDay = false;
                    }
                }
            }
        }
コード例 #2
0
 private void Day_SelectDateEvent(object sender, DateTime e)
 {
     if (e != null)
     {
         this.curDate = e;
         foreach (UIElement UIE in this.UIDays.Children)
         {
             if (UIE is UIDay)
             {
                 UIDay UIday = UIE as UIDay;
                 if (UIday.Date.Date == this.curDate.Date)
                 {
                     UIday.isCurDay = true;
                 }
                 else
                 {
                     UIday.isCurDay = false;
                 }
             }
         }
         if (this.SelectDateEvent != null)
         {
             this.SelectDateEvent(this, this._date);
         }
     }
 }