/// <summary> /// The new browser window event. /// </summary> /// <param name="sender"></param> /// <param name="webForm"></param> private void navForm_NewWindowEvent(object sender, NavigableWebForm webForm) { //webForm.IsUnique = true; AttachWebFormEvents(webForm); this.AddDocument(webForm,"Popup Browser",true); }
/// <summary> /// Initializes the form. /// </summary> private void InitializeForm() { // sets the IsUnique for the tab document this.IsUnique = true; // init settings types this.SnifferProperties = new SnifferOptions(); // get settings InspectorConfig = (InspectorConfiguration)ConfigManager.Read("greenBlue/inspector", false); ClientProperties = (HttpProperties)ConfigManager.Read("greenBlue/httpClient", false); // Load Application Properties LoadApplicationProperties(InspectorConfig); // Load Http Properties LoadHttpProperties(ClientProperties); // Init Get and Post Command InitializeHttpCommands(); // Start event for GBInspectorWorkspace this.StartEventDelegate += new InspectorStartRequestEventHandler(InspectorStartGetEvent); this.CancelEventDelegate += new InspectorCancelRequestEventHandler(InspectorCancelRequestEvent); // get request event textViewerForm.StartEvent += new InspectorStartRequestEventHandler(InspectorStartGetEvent); // Context menu textViewerForm.txtEditor.ContextMenu = this.mnuTextStream; textViewerForm.txtEditor.TextChanged += new EventHandler(txtHTTPStream_TextChanged); textViewerForm.txtEditor.CaretChange += new EventHandler(txtEditor_CaretChange); // Create browser navForm = new NavigableWebForm(); AttachWebFormEvents(navForm); // Add browser DocumentManager.Document navigatorDoc = new DocumentManager.Document(navForm,"Web Browser"); dmDocuments.AddDocument(navigatorDoc); // Add Html Text Editor htmlEditorDocument = new DocumentManager.Document(textViewerForm,"Html Browser"); dmDocuments.AddDocument(htmlEditorDocument); // Load History Tree this.sitesTree.ImageList = this.imgIcons; this.sitesTree.IconNodeIndex = 1; this.sitesTree.IconSiteIndex = 7; this.sitesTree.LoadHistoryTree(); }
/// <summary> /// Attach the web form events. /// </summary> /// <param name="wb">The NavigableWebForm Type.</param> private void AttachWebFormEvents(NavigableWebForm wb) { wb.DisplayBrowserUrlSync += new EventHandler(navForm_DisplayBrowserUrlSync); wb.NewWindowEvent += new NewWindowEventHandler(navForm_NewWindowEvent); wb.StartEvent += new InspectorStartRequestEventHandler(InspectorStartGetEvent); wb.FormConvertionEvent += new OnFormConvertionEventHandler(navForm_FormConvertionEvent); wb.FormHeuristicEvent += new OnFormHeuristicEventHandler(navForm_FormHeuristicEvent); wb.LoadFormsEditorEvent += new LoadFormsEditorEventHandler(navForm_LoadFormsEditorEvent); wb.LoadDocumentEvent += new OnLoadHtmlDocumentEventHandler(navForm_LoadDocumentEvent); wb.LoadLinksEvent += new LoadLinksEventHandler(navForm_LoadLinksEvent); }
/// <summary> /// Raised when a document is changed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dmDocuments_FocusedDocumentChanged(object sender, System.EventArgs e) { BasePluginForm plugin = (BasePluginForm)dmDocuments.FocusedDocument.Control; if ( plugin is ScriptingDataDesigner ) { // Hide dhRightPanel.Hide(); dhBottomPanel.Hide(); _scriptingDataDesigner = (ScriptingDataDesigner)plugin; } if ( plugin is NavigableWebForm ) { dhRightPanel.Show(); dhBottomPanel.Show(); navForm = (NavigableWebForm)plugin; } if ( plugin is HtmlPrintForm ) { printForm = (HtmlPrintForm)plugin; } }
private void web_NewWindow2(object sender, AxSHDocVw.DWebBrowserEvents2_NewWindow2Event e) { if ( AllowNewWindow ) { // Create browser NavigableWebForm navForm2 = new NavigableWebForm(true); navForm2.web.RegisterAsBrowser = false; e.ppDisp = navForm2.web.Application; navForm2.web.Visible = true; // check isLinkNavigation to true isLinkNavigation = true; // add and remove current this.NewWindowEvent(this, navForm2); } }