internal void SetThemeDefaults()
        {
            currentAppearance.Reset();
            if (!themeProperty.UseTheme)
            {
                currentAppearance.SelectedDateAppearance.Assign(appearance.SelectedDateAppearance);
                currentAppearance.ActiveTextColor       = appearance.ActiveTextColor;
                currentAppearance.InactiveTextColor     = appearance.InactiveTextColor;
                currentAppearance.SelectedDateTextColor = appearance.SelectedDateTextColor;
                currentAppearance.TodayBorderColor      = appearance.TodayBorderColor;
                currentAppearance.ButtonBackColor.Assign(appearance.ButtonBackColor);
                currentAppearance.SelectedBackColor.Assign(appearance.SelectedBackColor);
                currentAppearance.ArrowColor      = appearance.ArrowColor;
                currentAppearance.ArrowHoverColor = appearance.ArrowHoverColor;
                currentAppearance.CaptionBackColor.Assign(appearance.CaptionBackColor);
                currentAppearance.CaptionTextColor      = appearance.CaptionTextColor;
                currentAppearance.HoverColor            = appearance.HoverColor;
                currentAppearance.ControlBorderColor    = appearance.ControlBorderColor;
                currentAppearance.TodayColor            = appearance.TodayColor;
                currentAppearance.DayMarker             = appearance.DayMarker;
                currentAppearance.ControlBackColor      = appearance.ControlBackColor;
                currentAppearance.DateDaySaperatorColor = appearance.DateDaySaperatorColor;
                currentAppearance.Radius       = 2;
                currentAppearance.DisabledMask = appearance.DisabledMask;
            }
            else
            {
                switch (themeProperty.ColorScheme)
                {
                case ColorScheme.VS2005:
                    SetColors(ColorSchemeDefinition.VS2005);
                    break;

                case ColorScheme.Classic:
                    SetColors(ColorSchemeDefinition.Classic);
                    break;

                case ColorScheme.Blue:
                    SetColors(ColorSchemeDefinition.Blue);
                    break;

                case ColorScheme.Default:
                    SetColors(ColorSchemeDefinition.GetColorScheme(ColorScheme.Default));
                    break;

                case ColorScheme.OliveGreen:
                    SetColors(ColorSchemeDefinition.OliveGreen);
                    break;

                case ColorScheme.Royale:
                    SetColors(ColorSchemeDefinition.Royale);
                    break;

                case ColorScheme.Silver:
                    SetColors(ColorSchemeDefinition.Silver);
                    break;
                }
            }
        }
Exemple #2
0
        internal void SetThemeDefaults()
        {
            currentAppearance.Reset();
            if (!themeProperty.UseTheme)
            {
                if (!appearance.Bar.BackStyle.IsEmpty)
                {
                    currentAppearance.Bar.BackStyle.Assign(appearance.Bar.BackStyle);
                }
                else
                {
                    currentAppearance.Bar.BackStyle.Assign(DEFAULT.Bar.BackStyle);
                }
                currentAppearance.Bar.FocusedBorder = !appearance.Bar.FocusedBorder.IsEmpty
                                                          ? appearance.Bar.FocusedBorder
                                                          : DEFAULT.Bar.FocusedBorder;
                currentAppearance.Bar.NormalBorder = !appearance.Bar.NormalBorder.IsEmpty
                                                         ? appearance.Bar.NormalBorder
                                                         : DEFAULT.Bar.NormalBorder;
                if (!appearance.Bar.AppearanceBorder.IsEmpty)
                {
                    currentAppearance.Bar.AppearanceBorder.Assign(appearance.Bar.AppearanceBorder);
                }
                else
                {
                    currentAppearance.Bar.AppearanceBorder.Assign(DEFAULT.Bar.AppearanceBorder);
                }
                currentAppearance.Bar.CornerRadius = appearance.Bar.CornerRadius != 0
                                                         ? appearance.Bar.CornerRadius
                                                         : DEFAULT.Bar.CornerRadius;
                currentAppearance.Bar.DisabledMask = !appearance.Bar.DisabledMask.IsEmpty
                                                         ? appearance.Bar.DisabledMask
                                                         : DEFAULT.Bar.DisabledMask;

                if (!appearance.Item.BackStyle.IsEmpty)
                {
                    currentAppearance.Item.BackStyle.Assign(appearance.Item.BackStyle);
                }
                else
                {
                    currentAppearance.Item.BackStyle.Assign(DEFAULT.Item.BackStyle);
                }
                if (!appearance.Item.ClickStyle.IsEmpty)
                {
                    currentAppearance.Item.ClickStyle.Assign(appearance.Item.ClickStyle);
                }
                else
                {
                    currentAppearance.Item.ClickStyle.Assign(DEFAULT.Item.ClickStyle);
                }
                if (!appearance.Item.SelectedStyle.IsEmpty)
                {
                    currentAppearance.Item.SelectedStyle.Assign(appearance.Item.SelectedStyle);
                }
                else
                {
                    currentAppearance.Item.SelectedStyle.Assign(DEFAULT.Item.SelectedStyle);
                }
                if (!appearance.Item.DisabledStyle.IsEmpty)
                {
                    currentAppearance.Item.DisabledStyle.Assign(appearance.Item.DisabledStyle);
                }
                else
                {
                    currentAppearance.Item.DisabledStyle.Assign(DEFAULT.Item.DisabledStyle);
                }
                if (!appearance.Item.SelectedHoverStyle.IsEmpty)
                {
                    currentAppearance.Item.SelectedHoverStyle.Assign(appearance.Item.SelectedHoverStyle);
                }
                else
                {
                    currentAppearance.Item.SelectedHoverStyle.Assign(DEFAULT.Item.SelectedHoverStyle);
                }
                if (!appearance.Item.HoverStyle.IsEmpty)
                {
                    currentAppearance.Item.HoverStyle.Assign(appearance.Item.HoverStyle);
                }
                else
                {
                    currentAppearance.Item.HoverStyle.Assign(DEFAULT.Item.HoverStyle);
                }
                currentAppearance.Item.HoverBorder = !appearance.Item.HoverBorder.IsEmpty
                                                         ? appearance.Item.HoverBorder
                                                         : DEFAULT.Item.HoverBorder;
                currentAppearance.Item.HoverForeGround = !appearance.Item.HoverForeGround.IsEmpty
                                                             ? appearance.Item.HoverForeGround
                                                             : DEFAULT.Item.HoverForeGround;
                currentAppearance.Item.SelectedBorder = !appearance.Item.SelectedBorder.IsEmpty
                                                            ? appearance.Item.SelectedBorder
                                                            : DEFAULT.Item.SelectedBorder;
                currentAppearance.Item.NormalBorder = !appearance.Item.NormalBorder.IsEmpty
                                                          ? appearance.Item.NormalBorder
                                                          : DEFAULT.Item.NormalBorder;
                currentAppearance.Item.NormalForeGround = !appearance.Item.NormalForeGround.IsEmpty
                                                              ? appearance.Item.NormalForeGround
                                                              : DEFAULT.Item.NormalForeGround;
                currentAppearance.Item.SelectedForeGround = !appearance.Item.SelectedForeGround.IsEmpty
                                                                ? appearance.Item.SelectedForeGround
                                                                : DEFAULT.Item.SelectedForeGround;
                currentAppearance.Item.DisabledBorder = !appearance.Item.DisabledBorder.IsEmpty
                                                            ? appearance.Item.DisabledBorder
                                                            : DEFAULT.Item.DisabledBorder;
                currentAppearance.Item.DisabledForeGround = !appearance.Item.DisabledForeGround.IsEmpty
                                                                ? appearance.Item.DisabledForeGround
                                                                : DEFAULT.Item.DisabledForeGround;
                currentAppearance.Item.Gradient = appearance.Item.Gradient != 90
                                                      ? appearance.Item.Gradient
                                                      : DEFAULT.Item.Gradient;
                if (!appearance.Item.AppearenceText.IsEmpty)
                {
                    currentAppearance.Item.AppearenceText.Assign(appearance.Item.AppearenceText);
                }
                else
                {
                    currentAppearance.Item.AppearenceText.Assign(DEFAULT.Item.AppearenceText);
                }
            }
            else
            {
                switch (themeProperty.ColorScheme)
                {
                case ColorScheme.VS2005:
                    SetColors(ColorSchemeDefinition.VS2005);
                    break;

                case ColorScheme.Classic:
                    SetColors(ColorSchemeDefinition.Classic);
                    break;

                case ColorScheme.Blue:
                    SetColors(ColorSchemeDefinition.Blue);
                    break;

                case ColorScheme.Default:
                    SetColors(ColorSchemeDefinition.GetColorScheme(ColorScheme.Default));
                    break;

                case ColorScheme.OliveGreen:
                    SetColors(ColorSchemeDefinition.OliveGreen);
                    break;

                case ColorScheme.Royale:
                    SetColors(ColorSchemeDefinition.Royale);
                    break;

                case ColorScheme.Silver:
                    SetColors(ColorSchemeDefinition.Silver);
                    break;
                }
            }
        }