Exemple #1
0
        public void ReadConfig(WidgetCfg_ClockAnalog cfg)
        {
            cfgInstance  = Guid.NewGuid().ToString();
            bmpBackCache = null;

            BackgroundImage          = cfg.BackgroundImage;
            BackImageAllowsBackColor = cfg.BackImageAllowsBackColor;
            TickMarkStyle            = cfg.TickMarkStyle;

            ColorBackground       = cfg.ColorBackground;
            ColorTickMarks        = cfg.ColorTickMarks;
            ColorHourHandStroke   = cfg.ColorHourHandStroke;
            ColorHourHandFill     = cfg.ColorHourHandFill;
            ColorMinuteHandStroke = cfg.ColorMinuteHandStroke;
            ColorMinuteHandFill   = cfg.ColorMinuteHandFill;
            ColorSecondHandStroke = cfg.ColorSecondHandStroke;
            ColorSecondHandFill   = cfg.ColorSecondHandFill;
            ColorCenterCapStroke  = cfg.ColorCenterCapStroke;
            ColorCenterCapFill    = cfg.ColorCenterCapFill;

            ShowHourHand   = cfg.ShowHours;
            ShowMinuteHand = cfg.ShowMinutes;
            ShowSecondHand = cfg.ShowSeconds;

            FlowHourHand   = cfg.FlowHourHand;
            FlowMinuteHand = cfg.FlowMinuteHand;
            FlowSecondHand = cfg.FlowSecondHand;

            HourPathList   = cfg.HourHandConfig.HourPathList;
            MinutePathList = cfg.MinuteHandConfig.MinutePathList;
            SecondPathList = cfg.SecondHandConfig.SecondPathList;
            CapPathList    = cfg.CapConfig.CapPathList;
        }
        public void ReadConfig(WidgetCfg_ClockAnalog cfg)
        {
            cfgInstance = Guid.NewGuid().ToString();

            BackgroundImage = cfg.BackgroundImage;

            ColorBackground       = cfg.ColorBackground;
            ColorTickMarks        = cfg.ColorTickMarks;
            ColorHourHandStroke   = cfg.ColorHourHandStroke;
            ColorHourHandFill     = cfg.ColorHourHandFill;
            ColorMinuteHandStroke = cfg.ColorMinuteHandStroke;
            ColorMinuteHandFill   = cfg.ColorMinuteHandFill;
            ColorSecondHandStroke = cfg.ColorSecondHandStroke;
            ColorSecondHandFill   = cfg.ColorSecondHandFill;

            ShowHourHand   = cfg.ShowHours;
            ShowMinuteHand = cfg.ShowMinutes;
            ShowSecondHand = cfg.ShowSeconds;

            FlowHourHand   = cfg.FlowHourHand;
            FlowMinuteHand = cfg.FlowMinuteHand;
            FlowSecondHand = cfg.FlowSecondHand;
        }