示例#1
0
 private void ColorSlideButton_Resize(object sender, EventArgs e)
 {
     if (!widthSet)
     {
         originalWidth = Width;
         slideManager  = new SlideManager(this, ColorPair.SlideColor);
         widthSet      = true;
     }
 }
示例#2
0
        public ColorSlideButton()
        {
            InitializeComponent();

            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);

            custom        = false;
            originalWidth = Width;

            SetColor += new ThemeChanged(SetDefaultTheme);
            SetDefaultTheme(CurrentTheme);

            slideManager = new SlideManager(this, ColorPair.SlideColor);
        }