コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ZeroitMetroTrackbarRegionSmartTagActionList"/> class.
        /// </summary>
        /// <param name="component">A component related to the <see cref="T:System.ComponentModel.Design.DesignerActionList" />.</param>
        public ZeroitMetroTrackbarRegionSmartTagActionList(IComponent component) : base(component)
        {
            this.colUserControl = component as ZeroitMetroTrackbarRegion;

            // Cache a reference to DesignerActionUIService, so the
            // DesigneractionList can be refreshed.
            this.designerActionUISvc = GetService(typeof(DesignerActionUIService)) as DesignerActionUIService;
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ZeroitMetroTrackbarRegion"/> class.
        /// </summary>
        public ZeroitMetroTrackbarRegion()
        {
            ZeroitMetroTrackbarRegion metroTrackbarRegion = this;

            base.MouseDown += new MouseEventHandler(metroTrackbarRegion.MetroTrackBarRegion_MouseDown);
            ZeroitMetroTrackbarRegion metroTrackbarRegion1 = this;

            base.MouseMove += new MouseEventHandler(metroTrackbarRegion1.MetroTrackBarRegion_MouseMove);
            ZeroitMetroTrackbarRegion metroTrackbarRegion2 = this;

            base.MouseUp += new MouseEventHandler(metroTrackbarRegion2.MetroTrackBarRegion_MouseUp);
            ZeroitMetroTrackbarRegion metroTrackbarRegion3 = this;

            base.Paint += new PaintEventHandler(metroTrackbarRegion3.MetroTrackBarRegion_Paint);
            ZeroitMetroTrackbarRegion.__ENCAddToList(this);
            this.BarSize           = 6;
            this.sliderWidth       = 6;
            this._UseSwitchBorders = true;
            this._UseFixedSize     = true;
            this._Style            = Design.Style.Light;
            this.ColorScheme       = new ZeroitMetroTrackbarRegion.MainColorScheme();
            this.val        = 50;
            this.minVal     = 0;
            this.maxVal     = 100;
            this.scrolling1 = false;
            this.scrolling2 = false;
            this.slider1Pos = 0;
            this.slider2Pos = 0;
            this.SetStyle(ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
            this.UpdateStyles();
            this.Size   = new System.Drawing.Size(200, 20);
            this._Style = Design.Style.Dark;
            this.Invalidate();
            this._Style = Design.Style.Light;
            this.SetPos();
        }