//public Planning Plan
        //{
        //    get
        //    {
        //        return new Planning(new DayPlanning[]
        //        {   _sunday.DayPlan,
        //            _monday.DayPlan,
        //            _tuesday.DayPlan,
        //            _wednesday.DayPlan,
        //            _thursday.DayPlan,
        //            _friday.DayPlan,
        //            _saturday.DayPlan,
        //        });
        //    }

        //    set
        //    {
        //        AdaptdDay(_sunday, value.Plan[0]);
        //        AdaptdDay(_monday, value.Plan[1]);
        //        AdaptdDay(_tuesday, value.Plan[2]);
        //        AdaptdDay(_wednesday, value.Plan[3]);
        //        AdaptdDay(_thursday, value.Plan[4]);
        //        AdaptdDay(_friday, value.Plan[5]);
        //        AdaptdDay(_saturday, value.Plan[6]);
        //    }
        //}

        private static void AdaptdDay(DayControl daycontrol, DayPlanning dayplanning)
        {
            daycontrol.DayPlan.Selected = dayplanning.Selected;
            daycontrol.DayPlan          = dayplanning;
        }
示例#2
0
        public static void DayPlanPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DayControl THIS = d as DayControl;

            THIS.DataContext = THIS.DayPlan;
        }