private VScrollBarExtensionLocation ConvertExtensionLocation(ScrollBarExtensionLocation location) { if (location != ScrollBarExtensionLocation.LeftTop) { return(VScrollBarExtensionLocation.Right); } return(VScrollBarExtensionLocation.Left); }
private HScrollBarExtensionLocation ConvertExtensionLocation(ScrollBarExtensionLocation location) { if (location != ScrollBarExtensionLocation.LeftTop) { return(HScrollBarExtensionLocation.Bottom); } return(HScrollBarExtensionLocation.Top); }
protected ScrollBar(ScrollBarOrientation orientation) { this._scrollBarOrientation = orientation; this._mouseTimer = new Timer(); this._mouseTimer.Tick += new EventHandler(this.MouseTimerTick); this._mouseTimer.Interval = 100; this._mouseTimer.Enabled = false; this._clickAction = ScrollBarHitRegion.None; this._minimum = 0; this._maximum = 100; this._largeChange = 10; this._smallChange = 1; this._value = 0; this._arrowButtonsLayout = ScrollBarArrowButtonsLayout.Edges; this._leftUpButton = null; this._leftUpButtonHighlight = null; this._leftUpButtonDisabled = null; this._leftUpButtonSize = 0x13; this._rightDownButton = null; this._rightDownButtonHighlight = null; this._rightDownButtonDisabled = null; this._rightDownButtonSize = 0x13; this._lowTrack = null; this._lowTrackHighlight = null; this._lowTrackDisabled = null; this._highTrack = null; this._highTrackHighlight = null; this._highTrackDisabled = null; this._trackClickBehavior = ScrollBarTrackClickBehavior.Scroll; this._thumb = null; this._thumbHighlight = null; this._thumbDisabled = null; this._minimumThumbSize = 11; this._maximumThumbSize = 0; this._thumbMargins = new MarginPadding(); this._extension = null; this._extensionSize = 13; this._extensionLocation = ScrollBarExtensionLocation.LeftTop; this._extensionVisible = true; this._backgroundBufferBitmap = null; this._backgroundBufferGraphics = null; this._backgroundValid = BackgroundValid.Invalid; this._backBufferBitmap = null; this._backBufferGraphics = null; this.DrawTrack = null; this.DrawArrowButton = null; this.DrawThumb = null; this.ValueChanged = null; this.MinimumReached = null; this.MaximumReached = null; }
private void SetupExtension(int oldSize, int newSize, ScrollBarExtensionLocation oldLocation, ScrollBarExtensionLocation newLocation) { Rectangle rectangle = new Rectangle(base.Location.X, base.Location.Y, base.Width, base.Height); if (newLocation != oldLocation) { if (this._scrollBarOrientation == ScrollBarOrientation.Horizontal) { rectangle.Y += (newLocation == ScrollBarExtensionLocation.LeftTop) ? -oldSize : oldSize; } else { rectangle.X += (newLocation == ScrollBarExtensionLocation.LeftTop) ? -oldSize : oldSize; } } if (newSize != oldSize) { int num = newSize - oldSize; if (this._scrollBarOrientation == ScrollBarOrientation.Horizontal) { rectangle.Height += num; if (newLocation == ScrollBarExtensionLocation.LeftTop) { rectangle.Y -= num; } } else { rectangle.Width += num; if (newLocation == ScrollBarExtensionLocation.LeftTop) { rectangle.X -= num; } } } base.Bounds = rectangle; }
private VScrollBarExtensionLocation ConvertExtensionLocation(ScrollBarExtensionLocation location) { if (location != ScrollBarExtensionLocation.LeftTop) { return VScrollBarExtensionLocation.Right; } return VScrollBarExtensionLocation.Left; }
private HScrollBarExtensionLocation ConvertExtensionLocation(ScrollBarExtensionLocation location) { if (location != ScrollBarExtensionLocation.LeftTop) { return HScrollBarExtensionLocation.Bottom; } return HScrollBarExtensionLocation.Top; }