private void o2MessageQueue_onMessages(IO2Message o2Message) { //first thing to do is to make sure we are on the correct thread if (InvokeRequired) { Invoke(new EventHandler(delegate { o2MessageQueue_onMessages(o2Message); })); } else { if (o2Message is IM_GUIAction) { var mGuiAction = (IM_GUIAction)o2Message; DI.log.info("O2GuiWithDockPanel received IM_GUIAction of action: {0}", mGuiAction.GuiAction); switch (mGuiAction.GuiAction) { case (IM_GUIActions.openControlInGui): O2DockPanel.loadControl(mGuiAction.controlType, mGuiAction.o2DockState, mGuiAction.controlName); break; case (IM_GUIActions.setAscxDockStateAndOpenIfNotAvailable): // if setDockState fails is because the control is not loaded if (false == O2DockUtils.setDockState(mGuiAction.controlName, mGuiAction.o2DockState)) { O2AscxGUI.openAscxASync(mGuiAction.controlTypeString, mGuiAction.o2DockState, mGuiAction.controlName); } break; } return; } } }
public static void showWebInspectResultsInO2DockWindow(WebInspectResults webInspectResults) { O2DockPanel.addAscxControlToO2GuiWithDockPanel(typeof(ascx_TableList), true, PoC.dockContentTitle_WebInspectResults); var tableList = (ascx_TableList)O2AscxGUI.getAscx(PoC.dockContentTitle_WebInspectResults); showWebInspectResultsInTableList(webInspectResults, tableList); }
private void lbAssessmentFilesThatNeedSourceCodePathFixing_DoubleClick(object sender, EventArgs e) { //ascx_SourceCodeFileReferences scfrSourceCodeFileReferences = (ascx_SourceCodeFileReferences)Exec.openNewWindowWithControl(typeof(ascx_SourceCodeFileReferences),"Fix Source Code File References"); var scfrSourceCodeFileReferences = (ascx_SourceCodeFileReferences) O2DockPanel.loadControl(typeof(ascx_SourceCodeFileReferences), true, "Fix Source Code File References"); scfrSourceCodeFileReferences.dCallbackToRefreshFilesMappings = checkIfSourceCodeReferencesAreValid; scfrSourceCodeFileReferences.loadAssessmentFile( (O2AssessmentData_OunceV6)lbAssessmentFilesThatNeedSourceCodePathFixing.SelectedItem); }
/// <summary> /// opens ascx control (Sync mode) /// </summary> /// <param name="ascxControlToLoad"></param> /// <param name="dockState"></param> /// <param name="guiWindowName"></param> public static Control openAscx(Type ascxControlToLoad, O2DockState dockState, String guiWindowName) { Control ascxControl = null; var sync = new AutoResetEvent(false); O2Thread.staThread(() => { ascxControl = O2DockPanel.loadControl(ascxControlToLoad, dockState, guiWindowName); sync.Set(); }); sync.WaitOne(); return(ascxControl); }
private void dropObject_OunceOzasmt_eDnDAction_ObjectDataReceived_Event(object oObject) { if (File.Exists(oObject.ToString())) { var o2AssessmentOunceScan = new O2Assessment(new O2AssessmentLoad_OunceV6(), oObject.ToString()); o2AssessmentOunceScan.o2Findings = AspNetAnalysis.findWebControlSources(o2AssessmentOunceScan.o2Findings); O2DockPanel.addAscxControlToO2GuiWithDockPanel(typeof(ascx_FindingsViewer), true, PoC.dockContentTitle_FindingsViewer); var findingsViewer = (ascx_FindingsViewer)O2AscxGUI.getAscx(PoC.dockContentTitle_FindingsViewer); findingsViewer.loadO2Assessment(o2AssessmentOunceScan); findingsViewer.setFilter1Value("vulnName"); findingsViewer.setFilter2Value("(no Filter)"); } }
internal static void showFindingsCreatedFromWebInspectResults(WebInspectResults webInspectResults) { // var webInspectResults = (WebInspectResults)oObject; var o2Assessment = new O2Assessment { o2Findings = WebInspectToOzasmt.createO2FindingsFromWebInspectResults( webInspectResults) }; O2DockPanel.addAscxControlToO2GuiWithDockPanel(typeof(ascx_FindingsViewer), true, PoC.dockContentTitle_FindingsViewer); var findingsViewer = (ascx_FindingsViewer)O2AscxGUI.getAscx(PoC.dockContentTitle_FindingsViewer); findingsViewer.loadO2Assessment(o2Assessment); findingsViewer.setFilter1Value("vulnName"); findingsViewer.setFilter2Value("(no Filter)"); //GlobalStaticVars.dO2LoadedO2DockContent[PoC.dockContentTitle_FindingsViewer].dockContent.ParentForm.Height = 500; }
private void btStep_LoadWebInspectFiles_Click(object sender, EventArgs e) { /*O2DockPanel.addAscxControlToO2GuiWithDockPanel(typeof (ascx_FileMappings), * true, * PoC.dockContentTitle_WebInspectScanFiles);*/ // var webInspectScanFiles = // (ascx_FileMappings) O2AscxGUI.getAscx(PoC.dockContentTitle_WebInspectScanFiles); /* if (webInspectScanFiles != null) * // { * webInspectScanFiles.setExtensionsToShow("scan"); * webInspectScanFiles.clearMappings(); * // webInspectScanFiles.addFolder(@"E:\OunceWork\HP_WebInspect\HacmeBankScans"); * webInspectScanFiles.expandTree(); */ O2DockPanel.addAscxControlToO2GuiWithDockPanel(typeof(ascx_WebInspectResults), true, PoC.dockContentTitle_WebInspectResults); // O2DockPanel.setDockState(PoC.dockContentTitle_WebInspectScanFiles, DockState.Document); // } }
private void btLoadMappingsGui_Click(object sender, EventArgs e) { O2DockPanel.addAscxControlToO2GuiWithDockPanel(typeof(ascx_WebInspectOzasmMapperGui), false, "Finding Editor"); }
public static void addControlToMenu(Type ascxControlToLoad, O2DockState dockState, String guiWindowName) { O2DockPanel.addAscxControlToO2GuiWithDockPanelWithDockState(ascxControlToLoad, O2DockUtils.getDockStateFromO2DockState(dockState), guiWindowName, false); }
public static void openAscxASync(Type ascxControlToLoad, O2DockState dockState, String guiWindowName) { O2Thread.staThread(() => O2DockPanel.loadControl(ascxControlToLoad, dockState, guiWindowName)); }