Пример #1
0
 public void SetNewTheme(SmartButtonThemeBase xtheme)
 {
     if (xtheme == null)
         throw new ArgumentNullException("xtheme");
     _xtheme = xtheme;
     base.Invalidate();
 }
        private void SetDefaultValue()
        {
            InnerPaddingWidth = 0;
            MiddleButtonOutterSpace1 = 1;
            MiddleButtonOutterSpace2 = 0;
            SideButtonLength = 16;
            BestUndirectLen = 15;
            DrawBackground = true;
            DrawBorder = false;
            DrawInnerBorder = false;
            ShowSideButtons = true;
            //SideButtonCanDisabled = false;
            BackColor = Color.FromArgb(227,227,227);
            BorderColor = Color.FromArgb(248, 248, 248);

            SideButtonForePathSize = new Size(7, 7);
            SideButtonForePathGetter = new ButtonForePathGetter(
                GraphicsPathHelper.Create7x4In7x7DownTriangleFlag);

            //SideButtonColorTable = SideBtnColor();
            //MiddleButtonColorTable = MdlBtnColor();

            HowSideButtonForePathDraw = ForePathRenderMode.Draw;

            DrawLinesInMiddleButton = true;
            MiddleBtnLineOutterSpace1 = 4;
            MiddleBtnLineOutterSpace2 = 4;
            MiddleButtonLine1Color = Color.FromArgb(89, 89, 89);
            MiddleButtonLine2Color = Color.FromArgb(182, 182, 182);

            //SideButtonRadius = MiddleButtonRadius = 0;
            SideButtonBorderType = ButtonBorderType.Rectangle;

            BackgroundRadius = 0;
            DrawExtraMiddleLine = false;
            ExtraMiddleLineLength = 6;

            SideButtonTheme = GetSideButtonTheme();
            MdlButtonTheme = GetMdlButtonTheme();
        }
Пример #3
0
 public void SetNewTheme(SmartButtonThemeBase xtheme)
 {
     InnerButton.SetNewTheme(xtheme);
 }
 private SmartButtonThemeBase GetSideButtonTheme()
 {
     SmartButtonThemeBase theme = new SmartButtonThemeBase();
     theme.ColorTable = SideBtnColor();
     theme.RoundedStyle = RoundStyle.All;
     theme.RoundedRadius = 0;
     return theme;
 }