public unsafe ScrollableControl(int width, int height, int viewheight, int scrollbarmode) { this.InitializeComponent(); base.Width = width; base.Height = height; this.propViewHeight = viewheight; this.propScrollbarMode = scrollbarmode; this.Suspended = false; this.HiddenScrollbar = false; this.propStartY = 0; this.StartX = 0; this.propSmallChangeFactor = 8; if (this.ScrollbarMode != 0) { this.Scrollbar = new VScrollBar(); this.Scrollbar.Scroll += new ScrollEventHandler(this.ScrollbarScroll); this.CalcScrollParams(); if (this.ScrollbarMode == 2) { this.Scrollbar.Dock = DockStyle.Right; } else { this.Scrollbar.Dock = DockStyle.Left; this.StartX = this.Scrollbar.Width; } this.OwnControls.Add(this.Scrollbar); this.propViewWidth = base.Width - this.Scrollbar.Width; } else { this.propViewWidth = base.Width; } DoubleBuffControl doubleBuffControl = new DoubleBuffControl(this, new string((sbyte *)(& < Module >.?? _C@_00CNPNBAHC@?$AA@)), this.StartX, this.propStartY, this.propViewWidth, this.propViewHeight); this.ViewControl = doubleBuffControl; this.OwnControls.Add(doubleBuffControl); ControlEventHandler controlEventHandler = new ControlEventHandler(this.myControlAdded); this.MyControlAddedHandler = controlEventHandler; base.ControlAdded += controlEventHandler; ControlEventHandler controlEventHandler2 = new ControlEventHandler(this.myControlRemoved); this.MyControlRemovedHandler = controlEventHandler2; base.ControlRemoved += controlEventHandler2; this.ViewControl.MouseDown += new MouseEventHandler(this.ViewControlMouseDown); }
public new void ResumeLayout() { this.Suspended = false; DoubleBuffControl viewControl = this.ViewControl; if (viewControl != null) { viewControl.ResumeLayout(); } VScrollBar scrollbar = this.Scrollbar; if (scrollbar != null) { scrollbar.ResumeLayout(); } base.ResumeLayout(); }
public new void SuspendLayout() { this.Suspended = true; DoubleBuffControl viewControl = this.ViewControl; if (viewControl != null) { viewControl.SuspendLayout(); } VScrollBar scrollbar = this.Scrollbar; if (scrollbar != null) { scrollbar.SuspendLayout(); } base.SuspendLayout(); }