/// <summary> /// Initializes the start form. /// </summary> void InitializeStartForm() { //SetStyle(ControlStyles.DoubleBuffer, true); //SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.stStatus.Controls.Add(this.pgBrowserProgress); this.SuspendLayout(); // Add menu, toolbar and address toolbar to command bar manager this.commandBarManager.CommandBars.Add(this.menubar); this.commandBarManager.CommandBars.Add(this.toolbar); // this.commandBarManager.CommandBars.Add(this.addressToolbar); this.Controls.Add(this.commandBarManager); // GBInspectorWorkspace inspector = new GBInspectorWorkspace(); // this.StartEvent += inspector.StartEventDelegate; // this.CancelEvent += inspector.CancelEventDelegate; // // inspector.GBExit += new EventHandler(this.mnuExit_Click); // inspector.DisableAddressBar += new DisableAddressBarEventHandler(inspector_DisableAddressBar); // inspector.EnableAddressBar += new EnableAddressBarEventHandler(inspector_EnableAddressBar); // inspector.UpdateAddressEvent += new UpdateAddressEventHandler(inspector_UpdateAddressEvent); // inspector.StartProgressBarEvent += new StartProgressBarEventHandler(inspector_StartProgressBarEvent); // inspector.StopProgressBarEvent += new StopProgressBarEventHandler(inspector_StopProgressBarEvent); // inspector.ChangeStatusBarPanelEvent += new ChangeStatusBarEventHandler(inspector_ChangeStatusBarPanelEvent); // inspector.LoadPluginMenusEvent += new LoadPluginMenusEventHandler(inspector_LoadPluginMenusEvent); // inspector.ApplyToolbarSettingsEvent += new ApplyToolbarSettingsEventHandler(inspector_ApplyToolbarSettingsEvent); // inspector.ApplyMenuSettingsEvent += new ApplyMenuSettingsEventHandler(inspector_ApplyMenuSettingsEvent); // inspector.ApplyMenuRootSettingsEvent += new ApplyMenuRootSettingsEventHandler(inspector_ApplyMenuRootSettingsEvent); scriptingDataDesigner = new ScriptingDataDesigner(); // scriptingDataDesigner.HttpGetPageEvent += new HttpGetPageEventHandler(GetPageFromSessionDesigner); scriptingDataDesigner.ApplyMenuSettingsEvent += new ApplyMenuSettingsEventHandler(inspector_ApplyMenuSettingsEvent); scriptingDataDesigner.ApplyToolbarSettingsEvent += new ApplyToolbarSettingsEventHandler(inspector_ApplyToolbarSettingsEvent); DocumentManager.Document inspectorDoc; inspectorDoc = new DocumentManager.Document(scriptingDataDesigner,"Scripting Application Designer"); dmPanels.AddDocument(inspectorDoc); // set focused doc dmPanels.FocusedDocument = inspectorDoc; this.ResumeLayout(true); LoadPluginMenuEventArgs args = new LoadPluginMenuEventArgs(LoadWorkspaceMenu()); inspector_LoadPluginMenusEvent(this, args); }
/// <summary> /// Raises when a Record Session button is toggle. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void RecordSessionChanged(object sender, EventArgs e) { ChangeStatusBarEventArgs statusBarArgs =new ChangeStatusBarEventArgs(); if ( !IsRecording ) { statusBarArgs.Index = 2; statusBarArgs.Text = "Recording"; this.ChangeStatusBarPanelEvent(this, statusBarArgs); this.CurrentSessionRecording = new Session(); IsRecording = true; } else { statusBarArgs.Index = 2; statusBarArgs.Text = ""; this.ChangeStatusBarPanelEvent(this, statusBarArgs); IsRecording = false; if ( this.CurrentSessionRecording.SessionRequests.Count > 0 ) { _scriptingDataDesigner = new ScriptingDataDesigner(); _scriptingDataDesigner.PluginMenus = this.mnSessionMenus; // _scriptingDataDesigner.ApplyMenuSettingsEvent += new ApplyMenuSettingsEventHandler(SessionDesigner_ApplyMenuSettingsEvent); // _scriptingDataDesigner.ApplyToolbarSettingsEvent += new ApplyToolbarSettingsEventHandler(sessionDesigner_ApplyToolbarSettingsEvent); // Loads the sesion into the ui. //UpdateReportDialogTestMenu(false); _scriptingDataDesigner.LoadSession(this.CurrentSessionRecording); _scriptingDataDesigner.DisplayTreeView(); // Remove any existing document and add new document. this.RemoveAndAddDocument(_scriptingDataDesigner, "Scripting Application Designer", true); } } }
/// <summary> /// Loads a session designer from a file stream. /// </summary> /// <param name="file"> Session file stream to load.</param> public void LoadScriptingDataDesigner(string file) { _scriptingDataDesigner = new ScriptingDataDesigner(file); // _scriptingDataDesigner.ApplyMenuSettingsEvent += new ApplyMenuSettingsEventHandler(SessionDesigner_ApplyMenuSettingsEvent); // _scriptingDataDesigner.ApplyToolbarSettingsEvent += new ApplyToolbarSettingsEventHandler(sessionDesigner_ApplyToolbarSettingsEvent); _scriptingDataDesigner.PluginMenus = this.mnSessionMenus; //UpdateReportDialogTestMenu(false); _scriptingDataDesigner.DisplayTreeView(); // Remove current document if found and add new RemoveAndAddDocument(_scriptingDataDesigner,"Scripting Application Designer",true); }
/// <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; } }