internal void InvokeScroll(VerticalScrollAmount amount, bool down) { if ((this.Form != null) && (this._activeControl != null)) { this.Form.InvokeScroll(amount, down); } }
private void Scroll(VerticalScrollAmount amount, bool down) { uint num = 0; Control control = base.Controls.Cast <Control>().FirstOrDefault <Control>(c => c.Visible); if (control != null) { if ((amount == VerticalScrollAmount.Line) && down) { num = 1; } else if (amount == VerticalScrollAmount.Line) { num = 0; } else if ((amount == VerticalScrollAmount.Page) && down) { num = 3; } else if (amount == VerticalScrollAmount.Page) { num = 2; } else if ((amount == VerticalScrollAmount.Document) && down) { num = 7; } else { if (amount != VerticalScrollAmount.Document) { return; } num = 6; } VScrollBar bar = control.Controls.OfType <VScrollBar>().FirstOrDefault <VScrollBar>(); IntPtr lParam = (bar == null) ? IntPtr.Zero : bar.Handle; Native.SendMessage(control.Handle, 0x115, new IntPtr((int)num), lParam); Native.SendMessage(control.Handle, 8, new IntPtr((int)num), lParam); } }
internal void InvokeScroll(VerticalScrollAmount amount, bool down) { this.BeginInvoke(() => this.Scroll(amount, down)); }
internal void InvokeScroll(VerticalScrollAmount amount, bool down) { if ((this.Form != null) && (this._activeControl != null)) { this.Form.InvokeScroll(amount, down); } }
internal void ScrollResults(VerticalScrollAmount amount, bool down, bool applyToFirstResultsPanel, bool selectFirstResultsPanel) { if (this.AreResultsVisible()) { bool flag = this._editor.Focused || this._editor.ContainsFocus; if (!(!selectFirstResultsPanel || this.btnResults.Checked)) { this.SelectResultsPanel(false); } try { if (this.btnResults.Checked || applyToFirstResultsPanel) { this.ScrollBrowser(this._dataBrowser, amount, down); } else if (this.btnSql.Checked) { this.ScrollActiProEditor(this.txtSQL, amount, down); } else if (this.btnLambda.Checked) { this.ScrollBrowser(this._lambdaBrowser, amount, down); } else if (this.btnIL.Checked) { this.ScrollBrowser(this._ilBrowser, amount, down); } else if (this.IsPluginSelected()) { this._pluginWinManager.InvokeScroll(amount, down); } } catch { if (applyToFirstResultsPanel && selectFirstResultsPanel) { this._dataBrowser.Focus(); SendKeys.Flush(); SendKeys.SendWait("^{END}"); this._dataBrowser.Focus(); SendKeys.SendWait("^{END}"); if (flag) { this._editor.Focus(); } } } } }
internal void ScrollResults(VerticalScrollAmount amount, bool down) { this.ScrollResults(amount, down, false, false); }
private void ScrollBrowser(WebBrowser browser, VerticalScrollAmount amount, bool down) { int height; Rectangle scrollRectangle = browser.Document.Body.ScrollRectangle; object domDocument = browser.Document.DomDocument; object target = domDocument.GetType().InvokeMember("documentElement", BindingFlags.GetProperty, null, domDocument, null); if ((amount == VerticalScrollAmount.Document) && down) { height = scrollRectangle.Height; } else if (!((amount != VerticalScrollAmount.Document) || down)) { height = 0; } else { int num2 = this.Font.Height; height = (int) target.GetType().InvokeMember("scrollTop", BindingFlags.GetProperty, null, target, null); if ((amount == VerticalScrollAmount.Page) && down) { height += browser.Height - num2; } else if (!((amount != VerticalScrollAmount.Page) || down)) { height -= browser.Height - num2; } else if (down) { height += num2; } else { height -= num2; } if (height < 0) { height = 0; } else if (height > scrollRectangle.Height) { height = scrollRectangle.Height; } } target.GetType().InvokeMember("scrollTop", BindingFlags.SetProperty, null, target, new object[] { height }); }
private void ScrollActiProEditor(ActiproSoftware.SyntaxEditor.SyntaxEditor editor, VerticalScrollAmount amount, bool down) { if ((amount == VerticalScrollAmount.Line) && down) { editor.get_SelectedView().ScrollDown(); } else if (amount == VerticalScrollAmount.Line) { editor.get_SelectedView().ScrollUp(); } else if ((amount == VerticalScrollAmount.Page) && down) { editor.get_SelectedView().ScrollPageDown(); } else if (amount == VerticalScrollAmount.Page) { editor.get_SelectedView().ScrollPageUp(); } else if ((amount == VerticalScrollAmount.Document) && down) { editor.get_SelectedView().ScrollToDocumentEnd(); } else if (amount == VerticalScrollAmount.Document) { editor.get_SelectedView().ScrollToDocumentStart(); } }