This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "Text with 4 sides".popupWindow(1000,500) | |
| .add_TextArea().set_Text("I'm in the middle") | |
| .parentForm().insert_Above(100).add_TreeView().add_Nodes("above").pink() | |
| .parentForm().insert_Below(150).add_TreeView().add_Nodes("below").blue() | |
| .parentForm().insert_Left (150).add_TreeView().add_Nodes("left" ).red() | |
| .parentForm().insert_Right(150).add_TreeView().add_Nodes("right").green() | |
| //.parentForm().insert_LogViewer() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //C# Example | |
| Func<Bitmap, string> saveImageToWebDir = | |
| (bitmap)=>{ | |
| var logFolder = new WebService().CurrentLogFile_Path(); | |
| var targetFolder = logFolder.parentFolder().pathCombine("Images").createDir(); | |
| var screenshotFile = targetFolder.pathCombine("{0}.jpg".format("".add_RandomLetters(10))); | |
| var file = bitmap.save(screenshotFile); | |
| return file.replace(AppDomain.CurrentDomain.BaseDirectory, "/"); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var topPanel = "Util - CheckMarx Rule and Guidance Viewer".popupWindow(1000, 600).insert_LogViewer(); | |
| //var topPanel = panel.add_Panel(true); | |
| var settingsPanel = topPanel.insert_Above(40,"Settings"); | |
| var treeView = topPanel.add_TreeView_with_PropertyGrid().sort(); | |
| var codeViewer = topPanel.insert_Right().add_SourceCodeViewer(); | |
| var browser = codeViewer.insert_Below().add_WebBrowser(); | |
| var cxPortal = new CxPortalWebService(); | |
| settingsPanel.add_Label("Server:",2).append_TextBox(cxPortal.Url).align_Right(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var cxPortal = new CxPortalWebService(); | |
| var sessionId = "cxSessionId".o2Cache( | |
| ()=>{ | |
| var user = "What user do you want to use".askUser(); | |
| var pwd = "What is the pwd for user {0}".format(user).askUser(); | |
| var credentials = new Credentials() | |
| { | |
| User = user, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //var topPanel = panel.add_Panel(true); | |
| var topPanel = O2Gui.open<Panel>("Util - Findings Viewer with REPL",400,400); | |
| topPanel.add_FindingsViewer(); | |
| topPanel.mainMenu().clear().add_Menu("REPL") | |
| .add_MenuItem("Find control to REPL", ()=> new API_HawkEye().openControlFinder()); | |
| return topPanel; | |
| //using O2.XRules.Database.Findings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "testing control...".popupWindow().add_Control<ascx_Simple_Script_Editor>(); | |
| //O2File:E:\O2_V4\O2.FluentSharp\O2.FluentSharp.REPL\Ascx\ascx_Simple_Script_Editor.cs | |
| //O2Tag_OnlyAddReferencedAssemblies | |
| //using O2.XRules.Database.Utils | |
| //using O2.DotNetWrappers.ExtensionMethods | |
| //O2Ref:O2_FluentSharp_BCL.dll |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var visualStudio = new VisualStudio_2010(); | |
| var topPanel = visualStudio.open_Panel(); | |
| topPanel.windowBase().width(600); | |
| var panel = topPanel.insert_Above(); | |
| topPanel.add_Script_Me(panel); | |
| //another way to do this | |
| /* | |
| var scriptEditor = visualStudio.open_ScriptEditor(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var targetFile = @"E:\O2_V4\O2.FluentSharp\O2.FluentSharp.REPL\Ascx\ascx_Simple_Script_Editor.cs"; | |
| var targetType = "ascx_Simple_Script_Editor"; | |
| var visualStudio = new VisualStudio_2010(); | |
| var panel = visualStudio.open_Panel("Live instance of: " + targetType) | |
| .insert_LogViewer();; | |
| Action<string> compileAndShowFile = | |
| (file)=>{ | |
| var compileEngine = new CompileEngine(false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //var topPanel = panel.add_Panel(true); | |
| var topPanel = "PoC - Join Traces (on Attributes) - very basic version".popupWindow(1000,800); | |
| var findingsViewer_joinedTraces = topPanel.add_FindingsViewer(); | |
| var findingsViewer_setAttributes = findingsViewer_joinedTraces.insert_Above().add_FindingsViewer(); | |
| var findingsViewer_getAttributes = findingsViewer_setAttributes.insert_Right().add_FindingsViewer(); | |
| Action joinTraces = | |
| ()=>{ | |
| var getAttributes_Findings = findingsViewer_getAttributes.o2Findings(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var visualStudio = new VisualStudio_2010(); | |
| visualStudio.window("ToolWindowPane WinForms").Close(vsSaveChanges.vsSaveChangesNo); | |
| return visualStudio.dte(); |