protected virtual bool ProcessPageKey(KeyEventArgs e) { if (this.textBoxElement.CanPerformAutoComplete) { return(this.textBoxElement.ListElement.ProcessKeyboardSelection(e.KeyCode)); } if (!this.textBoxElement.Multiline) { return(false); } Keys keyCode = e.KeyCode; TextBoxScroller vscroller = this.textBoxElement.ViewElement.VScroller; int num1 = vscroller.Value; int height = (int)vscroller.ClientSize.Height; int num2 = keyCode != Keys.Prior ? num1 + height : num1 - height; PointF position = (PointF)this.textBoxElement.Caret.Position; vscroller.Value = num2; if (vscroller.Value != num2) { return(false); } ITextBoxNavigator navigator = this.textBoxElement.Navigator; TextPosition positionFromPoint = navigator.GetPositionFromPoint(position); navigator.CaretPosition = positionFromPoint; return(true); }
public virtual bool ProcessMouseWheel(MouseEventArgs e) { int num1 = Math.Max(1, e.Delta / SystemInformation.MouseWheelScrollDelta); int num2 = Math.Sign(e.Delta) * num1 * SystemInformation.MouseWheelScrollLines; TextBoxScroller vscroller = this.textBoxElement.ViewElement.VScroller; int num3 = vscroller.Value - num2 * vscroller.SmallChange; vscroller.Value = num3; return(false); }
protected override void DisposeManagedResources() { base.DisposeManagedResources(); if (this.hScroller != null) { this.hScroller.Dispose(); this.hScroller = (TextBoxScroller)null; } if (this.vScroller == null) { return; } this.vScroller.Dispose(); this.vScroller = (TextBoxScroller)null; }