private bool OnWebBrowserMouseWheel(mshtml.IHTMLEventObj obj) { if (obj.ctrlKey) { obj.cancelBubble = true; obj.returnValue = false; return(false); } return(true); }
bool ClickVisualize(mshtml.IHTMLEventObj pEvtObj) { return(true); /* * mshtml.IHTMLElement element = pEvtObj.srcElement; * if(element.className == "gotobutton") * { * mshtml.IHTMLElementCollection a = element.children as mshtml.IHTMLElementCollection; * * string foundpath = ""; * int foundline = -1; * * foreach (mshtml.IHTMLElement e in a) * { * if(e.className == "gotopath") * { * //TODO: hook up code to generate the path and line to xml. * // so we can use the goto code button. * string path = e.innerText.Trim(); * string dir = App().ActiveDocument.ProjectItem.ContainingProject.FullName; * dir = StringUtility.RLeft(dir, "\\") + "\\"; * * string filepath = dir + path; * filepath = System.IO.Path.GetFullPath(filepath); * * if(System.IO.File.Exists(filepath)) * { * foundpath = filepath; * } * } * if(e.className == "gotoline") * { * string line = e.innerText.Trim(); * foundline = Convert.ToInt32(line); * } * } * * if(foundpath != "" * && foundline != -1) * { * Window docwindow = App().ItemOperations.OpenFile(foundpath, EnvDTE.Constants.vsViewKindTextView); * TextDocument newdoc = (TextDocument)docwindow.Document.Object(""); * * newdoc.Selection.GotoLine(foundline, true); * newdoc.Selection.ActivePoint.TryToShow(vsPaneShowHow.vsPaneShowCentered, null); * } * } * * * return false; */ }
void docEvents_onafterupdate(mshtml.IHTMLEventObj pEvtObj) { //throw new NotImplementedException(); }
//here's the handler private bool ClickEventHandler(mshtml.IHTMLEventObj e) { textBox1.Text = "Item Clicked"; return(true); }
private bool HtmlDocumentClickEventHandler(mshtml.IHTMLEventObj pEvtObj) { return(true); }
private bool ContextMenuEventHandler(mshtml.IHTMLEventObj e) { //e.cancelBubble=true; return(false); }
// method to perform the process of showing the context menus private void ContextMenuShow(object sender, HtmlEventObject e) { // if in readonly mode display the standard context menu // otherwise display the editing context menu if (!_readOnly) { // should disable inappropriate commands if (IsParentTable()) { this.menuTableModify.Visible = true; } else { this.menuTableModify.Visible = false; } // display the text processing context menu contextMenuMain.Show(this, new System.Drawing.Point(e.x, e.y)); // cancel the standard menu and event bubbling e.returnValue = false; e.cancelBubble = true; } }
public void CallbackFunction(mshtml.IHTMLEventObj arg) { //Console.WriteLine(String.Format("[{0}, {1}]", arg.clientX, arg.clientY)); OnDomMouseMove(arg.clientX, arg.clientY); }
private bool ClickEventHandler(mshtml.IHTMLEventObj e) { Console.WriteLine(e.x.ToString() + ":" + e.y.ToString()); return(true); }
// method to perform the process of showing the context menus private void ContextMenuShow(object sender, HtmlEventObject e) { System.Drawing.Point loc = new Point(e.x + this.WebDescriptionView.Location.X, e.y + this.WebDescriptionView.Location.Y); this.ContextMenuDetailedValidation.Show (this, loc); // cancel the standard menu and event bubbling e.returnValue = false; e.cancelBubble = true; }