Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

moved WinFormsUI to O2_FluentSharp_REPL

  • Loading branch information...
commit edbcd91dba7a5c330ecbf6d786634b21c6d313b8 1 parent 1059948
@DinisCruz DinisCruz authored
Showing with 18 additions and 2,837 deletions.
  1. +12 −3 O2.Platform.exe/O2_Platform.csproj
  2. +1 −1  O2_External_SharpDevelop/O2_External_SharpDevelop.csproj
  3. +4 −1 O2_External_SharpDevelop/Properties/AssemblyInfo.cs
  4. +1 −1  ...harpDevelop/_O2SharpDevelop/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/CodeCompletionWindow.cs
  5. +0 −2  O2_External_WinFormsUI/ChangeLog.txt
  6. +0 −35 O2_External_WinFormsUI/DI.cs.txt
  7. +0 −49 O2_External_WinFormsUI/Forms/GenericDockContent.Designer.cs
  8. +0 −42 O2_External_WinFormsUI/Forms/GenericDockContent.cs
  9. +0 −120 O2_External_WinFormsUI/Forms/GenericDockContent.resx
  10. +0 −378 O2_External_WinFormsUI/Forms/O2AscxGUI.cs
  11. +0 −21 O2_External_WinFormsUI/Forms/O2AscxGUI_Ext.cs
  12. +0 −200 O2_External_WinFormsUI/Forms/O2GuiWithDockPanel.Controllers.cs
  13. +0 −513 O2_External_WinFormsUI/Forms/O2GuiWithDockPanel.Designer.cs
  14. +0 −305 O2_External_WinFormsUI/Forms/O2GuiWithDockPanel.cs
  15. +0 −123 O2_External_WinFormsUI/Forms/O2GuiWithDockPanel.resx
  16. +0 −121 O2_External_WinFormsUI/HandleO2MessageOnSD.cs
  17. +0 −152 O2_External_WinFormsUI/O2Environment/O2DockContent.cs
  18. +0 −316 O2_External_WinFormsUI/O2Environment/O2DockPanel.cs
  19. +0 −195 O2_External_WinFormsUI/O2Environment/O2DockUtils.cs
  20. +0 −86 O2_External_WinFormsUI/O2Environment/O2MessagesHandler.cs
  21. +0 −125 O2_External_WinFormsUI/O2_External_WinFormsUI.csproj
  22. +0 −40 O2_External_WinFormsUI/Properties/AssemblyInfo.cs
  23. BIN  O2_External_WinFormsUI/_External_Dlls/WeifenLuo.WinFormsUI.Docking.dll
  24. BIN  O2_External_WinFormsUI/_External_Dlls/_WeifenLuo.WinFormsUI.Docking.dll.previousVersion
  25. +0 −8 VisualStudio Solution Files/O2.Platform.4.0 - Main Projects.sln
View
15 O2.Platform.exe/O2_Platform.csproj
@@ -79,9 +79,6 @@
<EmbeddedResource Include="..\..\O2.FluentSharp\binaries\O2_FluentSharp_Roslyn.dll">
<Link>_Dlls_Embeded\O2_FluentSharp_Roslyn.dll</Link>
</EmbeddedResource>
- <EmbeddedResource Include="..\..\O2.FluentSharp\binaries\O2_FluentSharp_REPL.exe">
- <Link>_Dlls_Embeded\O2_FluentSharp_REPL.exe</Link>
- </EmbeddedResource>
<Content Include="O2_Setup.cs.txt" />
<Content Include="O2_Setup.cs %28with no dependency on O2 Dlls%29.txt" />
<Compile Include="Program.cs" />
@@ -144,10 +141,22 @@
</FileAssociation>
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\..\O2.FluentSharp\O2.FluentSharp.BCL\O2.FluentSharp.BCL.csproj">
+ <Project>{DF7E73CB-02AC-4689-BB8C-AC21FFCCDDC5}</Project>
+ <Name>O2.FluentSharp.BCL</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\O2.FluentSharp\O2.FluentSharp.CoreLib\O2.FluentSharp.CoreLib.csproj">
<Project>{0A7CE0E0-B092-43B5-AB80-99BA909019C9}</Project>
<Name>O2.FluentSharp.CoreLib</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\O2.FluentSharp\O2.FluentSharp.REPL\O2.FluentSharp.REPL.csproj">
+ <Project>{D742BBEF-BFDC-477F-9880-5E0E2C89B6B2}</Project>
+ <Name>O2.FluentSharp.REPL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\O2_External_SharpDevelop\O2_External_SharpDevelop.csproj">
+ <Project>{E76BCE43-8511-4CE8-A965-C0150F713CE9}</Project>
+ <Name>O2_External_SharpDevelop</Name>
+ </ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
View
2  O2_External_SharpDevelop/O2_External_SharpDevelop.csproj
@@ -27,7 +27,7 @@
<OutputPath>bin\debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
+ <WarningLevel>2</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
View
5 O2_External_SharpDevelop/Properties/AssemblyInfo.cs
@@ -38,4 +38,7 @@
[assembly: AssemblyFileVersion("1.0.0.0")]
*/
using System.Reflection;
-[assembly: AssemblyVersionAttribute("4.1.0.*")]
+using System;
+
+[assembly: CLSCompliant(false)]
+[assembly: AssemblyVersionAttribute("4.1.0")]
View
2  ...rpDevelop/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/CodeCompletionWindow.cs
@@ -34,7 +34,7 @@ public class CodeCompletionWindow : AbstractCompletionWindow
public static bool busy; //DC
DeclarationViewWindow declarationViewWindow = null;
- Rectangle workingScreen;
+ new Rectangle workingScreen;
public static CodeCompletionWindow ShowCompletionWindow(Form parent, TextEditorControl control, string fileName, ICompletionDataProvider completionDataProvider, char firstChar)
{
View
2  O2_External_WinFormsUI/ChangeLog.txt
@@ -1,2 +0,0 @@
-5-Dec-09:
- * Added support for loading files when dropped in the main document area (although will only work when the SharpDevelop control is Loaded)
View
35 O2_External_WinFormsUI/DI.cs.txt
@@ -1,35 +0,0 @@
-// This file is part of the OWASP O2 Platform (http://www.owasp.org/index.php/OWASP_O2_Platform) and is released under the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-using System;
-using System.Collections.Generic;
-using O2.External.WinFormsUI.Forms;
-using O2.External.WinFormsUI.O2Environment;
-using O2.Interfaces.Messages;
-using O2.Interfaces.O2Core;
-using O2.Kernel;
-using O2.Kernel.InterfacesBaseImpl;
-
-namespace O2.External.WinFormsUI
-{
- internal class DI
- {
- static DI()
- {
- log = PublicDI.log; // _note that when the O2GuiWithDockPanel is create it will overide the PublicDI log with WinFormsUILog() object
- reflection = PublicDI.reflection;
- config = PublicDI.config;
- o2MessageQueue = KO2MessageQueue.getO2KernelQueue();
-
-
- }
-
- // DI objects
- public static KO2Config config { get; set;}
- public static IO2MessageQueue o2MessageQueue { get; set; }
- public static IO2Log log;
- public static IReflection reflection;
-
- // local global vars
-
-
- }
-}
View
49 O2_External_WinFormsUI/Forms/GenericDockContent.Designer.cs
@@ -1,49 +0,0 @@
-// This file is part of the OWASP O2 Platform (http://www.owasp.org/index.php/OWASP_O2_Platform) and is released under the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-namespace O2.External.WinFormsUI.Forms
-{
- partial class GenericDockContent
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.SuspendLayout();
- //
- // GenericDockContent
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(292, 273);
- this.Name = "GenericDockContent";
- this.TabText = "GenericDockContent";
- this.Text = "GenericDockContent";
- this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.GenericDockContent_FormClosing);
- this.ResumeLayout(false);
-
- }
-
- #endregion
- }
-}
View
42 O2_External_WinFormsUI/Forms/GenericDockContent.cs
@@ -1,42 +0,0 @@
-// This file is part of the OWASP O2 Platform (http://www.owasp.org/index.php/OWASP_O2_Platform) and is released under the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-using System;
-using System.Windows.Forms;
-using O2.External.WinFormsUI.O2Environment;
-using WeifenLuo.WinFormsUI.Docking;
-
-namespace O2.External.WinFormsUI.Forms
-{
- public partial class GenericDockContent : DockContent
- {
- public GenericDockContent()
- {
- InitializeComponent();
- if (DesignMode!= false)
- new O2MessagesHandler(); // make sure the Messages Handler is setup
- }
-
- public Form loadTypeAsMainControl(Type controlToLoad)
- {
- return loadTypeAsMainControl(controlToLoad, controlToLoad.Name);
- }
-
- public Form loadTypeAsMainControl(Type controlToLoad, String tabText)
- {
- return loadControlAsMainControl((Control) Activator.CreateInstance(controlToLoad), tabText);
- }
-
- public Form loadControlAsMainControl(Control control, String tabText)
- {
- control.Dock = DockStyle.Fill;
- Controls.Add(control);
- TabText = tabText;
- Text = control.Text;
- return this;
- }
-
- private void GenericDockContent_FormClosing(object sender, FormClosingEventArgs e)
- {
- O2DockUtils.removeO2DockContentFromDIGlobalVar(Text); // remove the control hosted by by this
- }
- }
-}
View
120 O2_External_WinFormsUI/Forms/GenericDockContent.resx
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
View
378 O2_External_WinFormsUI/Forms/O2AscxGUI.cs
@@ -1,378 +0,0 @@
-// This file is part of the OWASP O2 Platform (http://www.owasp.org/index.php/OWASP_O2_Platform) and is released under the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using System.Windows.Forms;
-using O2.DotNetWrappers.DotNet;
-using O2.DotNetWrappers.ExtensionMethods;
-using O2.DotNetWrappers.Windows;
-using O2.External.WinFormsUI.O2Environment;
-using O2.Interfaces.Views;
-using O2.Kernel;
-using O2.Views.ASCX.Ascx.MainGUI;
-using O2.Views.ASCX.classes.MainGUI;
-using O2.Views.ASCX.CoreControls;
-using O2.Views.ASCX.O2Findings;
-using O2.Views.ASCX;
-
-namespace O2.External.WinFormsUI.Forms
-{
- [Serializable]
- public class O2AscxGUI
- {
- public static Dictionary<String, O2DockContent> dO2LoadedO2DockContent = new Dictionary<String, O2DockContent>();
- public static O2GuiWithDockPanel o2GuiWithDockPanel;
- public static bool o2GuiStandAloneFormMode;
-
- public static bool autoAddLogViewerToGui { get; set; }
-
- static O2AscxGUI()
- {
- new O2MessagesHandler(); // make sure the Messages Handler is setup
-
- autoAddLogViewerToGui = true;
-
- //o2MessageQueue = KO2MessageQueue.getO2KernelQueue();
- }
-
- public static AutoResetEvent guiClosed = new AutoResetEvent(false);
-
- public static bool launch()
- {
- return launch("O2");
- }
-
- public static bool launch(string parentFormTitle)
- {
- try
- {
- if (isGuiLoaded())
- {
- PublicDI.log.error("There is already a GUI loaded and only one can be loaded");
- return false;
- }
- parentFormTitle = ClickOnceDeployment.getFormTitle_forClickOnce(parentFormTitle);
- //new O2DockPanel();
-
- O2Thread.staThread(() => new O2DockPanel());
-
- var maxTimeToWaitForGuiCreation = 20000;
- if (O2DockPanel.guiLoaded.WaitOne(maxTimeToWaitForGuiCreation))
- {
- O2AscxGUI.o2GuiWithDockPanel.invokeOnThread(()=>O2AscxGUI.o2GuiWithDockPanel.Text = parentFormTitle);
- return true;
- }
- if (false == DebugMsg.IsDebuggerAttached())
- //PublicDI.log.reportCriticalErrorToO2Developers(null, null, "from O2AscxGUI: GUI was not available after 20 seconds");
- PublicDI.log.error("from O2AscxGUI: GUI was not available after 20 seconds");
- return false;
- }
- catch (Exception)
- {
- return false;
- }
- }
-
- public static bool launch(string parentFormTitle, int width, int height)
- {
- if (launch(parentFormTitle))
- {
- O2AscxGUI.o2GuiWithDockPanel.invokeOnThread(
- () =>
- {
- O2AscxGUI.o2GuiWithDockPanel.Height = height;
- O2AscxGUI.o2GuiWithDockPanel.Width = width;
- });
-
- return true;
- }
-
- return false;
- }
-
- public static bool waitForAscxGuiClose(int milisecondsToWait)
- {
- if (false == guiClosed.WaitOne(milisecondsToWait))
- {
- PublicDI.log.error("in waitForAscxGuiClose , Gui didn't close after {0} seconds", milisecondsToWait / 1000);
- return false;
- }
- return true;
- }
-
- public static void waitForAscxGuiClose()
- {
- guiClosed.WaitOne();
- }
-
- public static bool close()
- {
- if (isGuiLoaded())
- try
- {
- if (O2AscxGUI.o2GuiWithDockPanel.okThread(delegate { close(); }))
- {
- // before we close this we need to remove all loaded Ascx from the O2AscxGUI.dO2LoadedO2DockContent
- O2AscxGUI.dO2LoadedO2DockContent.Clear();
-
- // now close the GUI
- O2AscxGUI.o2GuiWithDockPanel.Close();
-
- //O2AscxGUI.o2GuiWithDockPanel.Dispose();
-
- }
- }
- catch (Exception ex)
- {
- PublicDI.log.ex(ex, "in O2AscxGUI.close");
- return false;
- }
- if (O2AscxGUI.o2GuiWithDockPanel == null)
- return true;
- if (false == DebugMsg.IsDebuggerAttached())
- waitForAscxGuiClose(5000);
- else
- waitForAscxGuiClose();
-
- PublicDI.log.info("Gui Closed");
- return true;
- }
-
- public static void closeAscxParent(string ascxControlName)
- {
- if (ascxControlName != null)
- {
- var ascxControlToClose = (ContainerControl)getAscx(ascxControlName);
-
- if (ascxControlToClose == null)
- PublicDI.log.error(
- "in O2AscxGui.closeAscxParent, could not get control: {0}", ascxControlName);
- else
- O2Forms.closeParentForm(ascxControlToClose);
- }
- }
-
- public static void setLogViewerDockState(O2DockState o2DockState)
- {
- O2DockUtils.setDockContentState(PublicDI.LogViewerControlName, o2DockState);
- }
-
-
- public static void logInfo(string infoMessageToLog)
- {
- PublicDI.log.info(infoMessageToLog);
- }
-
- public static void logDebug(string debugMessageToLog)
- {
- PublicDI.log.debug(debugMessageToLog);
- }
-
- public static void logError(string errorMessageToLog)
- {
- PublicDI.log.error(errorMessageToLog);
- }
-
- /*public static void showMessageBox(string messageBoxText)
- {
- PublicDI.log.showMessageBox(messageBoxText);
- }
-
- public static DialogResult showMessageBox(string message, string messageBoxTitle,
- MessageBoxButtons messageBoxButtons)
- {
- return PublicDI.log.showMessageBox(message, messageBoxTitle, messageBoxButtons);
- }*/
-
- public static void openAscx(string ascxControlToLoad, O2DockState dockState, String guiWindowName)
- {
- var type = PublicDI.reflection.getType(ascxControlToLoad);
- if (type == null)
- PublicDI.log.error("in O2AscxGui.openAscx, could not resolve type called: {0}", ascxControlToLoad);
- else
- openAscx(type, dockState, guiWindowName);
- }
-
- public static Control openAscx(Type ascxControlToLoad)
- {
- string controlName = StringsAndLists.addSpacesOnUpper(ascxControlToLoad.Name.Replace("ascx_", ""));
- return openAscx(ascxControlToLoad, controlName);
- }
-
- public static Control openAscx(Type ascxControlToLoad, String guiWindowName)
- {
- return openAscx(ascxControlToLoad, O2DockState.Document, guiWindowName);
- }
-
- /// <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;
- }
- public static void openAscxASync(string ascxControlToLoad, O2DockState dockState, String guiWindowName)
- {
- var type = PublicDI.reflection.getType(ascxControlToLoad);
- if (type == null)
- PublicDI.log.error("in O2AscxGui.openAscx, could not resolve type called: {0}", ascxControlToLoad);
- else
- openAscxASync(type, dockState, guiWindowName);
- }
-
-
- public static void openAscxASync(Type ascxControlToLoad, O2DockState dockState, String guiWindowName)
- {
- O2Thread.staThread(() => O2DockPanel.loadControl(ascxControlToLoad, dockState, guiWindowName));
- }
-
- // was not working (tried to fix the annoying cases where the windows cursor was stuck with the HourGlass shape
- /* public static void setCursor(Cursor cursor)
- {
- if (O2AscxGUI.o2GuiWithDockPanel != null)
- O2AscxGUI.o2GuiWithDockPanel.Cursor = cursor;
- }*/
-
- public static void openAscxAsForm(Type ascxControlToLoad)
- {
- openAscxAsForm(ascxControlToLoad, ascxControlToLoad.Name);
- }
-
- public static void openAscxAsForm(Type ascxControlToLoad, string formName)
- {
- O2DockContent.launchO2DockContentAsStandAloneForm(ascxControlToLoad, formName);
- }
-
- public static void openAscxAsForm(string ascxControlToLoad, string formName)
- {
- Type typeOfAscxControlToLoad = PublicDI.reflection.getType(ascxControlToLoad);
- if (typeOfAscxControlToLoad == null)
- PublicDI.log.error("in O2Messages.openAscxAsForm could not resolve Type:{0}", ascxControlToLoad);
- else
- O2DockContent.launchO2DockContentAsStandAloneForm(typeOfAscxControlToLoad, formName);
- }
-
- public static Control getGuiWithDockPanelAsControl()
- {
- return O2AscxGUI.o2GuiWithDockPanel;
- }
-
- public static Control getAscx(string ascxControlName)
- {
- return O2DockUtils.getAscx(ascxControlName);
- }
-
- public static bool isAscxLoaded(string ascxControlName)
- {
- return O2DockUtils.getAscx(ascxControlName) != null;
- }
-
- public static bool isGuiLoaded()
- {
- return O2AscxGUI.o2GuiWithDockPanel != null;
- }
-
- public static object invokeOnAscxControl(string ascxTargetControl, string methodToExecute)
- {
- return invokeOnAscxControl(ascxTargetControl, methodToExecute, new object[0]);
- }
-
- public static object invokeOnAscxControl(string ascxTargetControl, string methodToExecute, object[] methodParameters)
- {
- var ascxControl = getAscx(ascxTargetControl);
- if (ascxControl != null)
- return PublicDI.reflection.invoke(ascxControl, methodToExecute, methodParameters);
- return null;
- }
-
- public static List<String> invokeAndGetStringList(string ascxTargetControl, string methodToExecute)
- {
- return invokeAndGetStringList(ascxTargetControl, methodToExecute, new object[0]);
- }
-
- public static List<String> invokeAndGetStringList(string ascxTargetControl, string methodToExecute, object[] methodParameters)
- {
- var ascxControl = getAscx(ascxTargetControl);
- if (ascxControl != null)
- {
- var returnData = PublicDI.reflection.invoke(ascxControl, methodToExecute, methodParameters);
- if (returnData != null && returnData is List<String>)
- return (List<String>) returnData;
- }
- return null;
- }
-
-
- public static void clickButton(string ascxControlName, string buttonToClick)
- {
- invokeOnAscxControl(ascxControlName, buttonToClick + "_Click", new object[] { null, null });
- }
-
- public static void addControlToMenu(Type ascxControlToLoad)
- {
- string controlName = StringsAndLists.addSpacesOnUpper(ascxControlToLoad.Name.Replace("ascx_", ""));
- addControlToMenu(ascxControlToLoad, controlName);
- }
-
- public static void addControlToMenu(Type ascxControlToLoad, String guiWindowName)
- {
- addControlToMenu(ascxControlToLoad, O2DockState.Float, guiWindowName);
- }
-
- public static void addControlToMenu(string menuItemName, Action onMenuItemClick)
- {
- O2AscxGUI.o2GuiWithDockPanel.addToLoadedO2ModulesMenu(menuItemName, onMenuItemClick);
- }
-
- public static void addControlToMenu(Type ascxControlToLoad, O2DockState dockState, String guiWindowName)
- {
- O2DockPanel.addAscxControlToO2GuiWithDockPanelWithDockState(ascxControlToLoad, O2DockUtils.getDockStateFromO2DockState(dockState), guiWindowName,false);
- }
-
-
- public static void workingOnTaskForm_open(string controlName)
- {
- openAscxASync(typeof (ascx_WorkingOnTask), O2DockState.Float, controlName);
- }
-
- public static void workingOnTaskForm_setText(string controlName, string textValue)
- {
- var ascxControl = getAscx(controlName);
- if (ascxControl!=null && ascxControl is ascx_WorkingOnTask)
- {
- ascxControl.invokeOnThread(
- () => ((ascx_WorkingOnTask)ascxControl).setWorkingTaskText(textValue));
- }
- }
-
- public static void workingOnTaskForm_close(string controlName)
- {
- var ascxControl = getAscx(controlName);
- if (ascxControl != null && ascxControl is ascx_WorkingOnTask)
- {
- ascxControl.invokeOnThread(
- () => ((ascx_WorkingOnTask) ascxControl).close());
- }
- }
-
- public static void addDefaultControlsToMenu()
- {
- O2AscxGUI.addControlToMenu(typeof(ascx_Directory), O2DockState.Float, "Directory Viewer");
- O2AscxGUI.addControlToMenu(typeof(ascx_FileMappings), O2DockState.Float, "Files Mappings");
- O2AscxGUI.addControlToMenu(typeof(ascx_O2ObjectModel), O2DockState.Float, "O2 Object Model");
- O2AscxGUI.addControlToMenu(typeof(ascx_FindingsViewer), O2DockState.Float, "Findings Viewer");
- }
- }
-}
View
21 O2_External_WinFormsUI/Forms/O2AscxGUI_Ext.cs
@@ -1,21 +0,0 @@
-// This file is part of the OWASP O2 Platform (http://www.owasp.org/index.php/OWASP_O2_Platform) and is released under the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace O2.External.WinFormsUI.Forms
-{
- public static class O2AscxGUI_Ext
- {
- public static object invokeOnAscx(this string ascxName, string methodToExecute)
- {
- return invokeOnAscx(ascxName, methodToExecute, new object[0]);
- }
-
- public static object invokeOnAscx(this string ascxName, string methodToExecute, object[] methodParameters)
- {
- return O2AscxGUI.invokeOnAscxControl(ascxName, methodToExecute, methodParameters);
- }
- }
-}
View
200 O2_External_WinFormsUI/Forms/O2GuiWithDockPanel.Controllers.cs
@@ -1,200 +0,0 @@
-// This file is part of the OWASP O2 Platform (http://www.owasp.org/index.php/OWASP_O2_Platform) and is released under the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-using System;
-using System.Drawing;
-using System.Windows.Forms;
-using O2.DotNetWrappers.DotNet;
-using O2.DotNetWrappers.ExtensionMethods;
-using O2.DotNetWrappers.Network;
-using O2.DotNetWrappers.Windows;
-using O2.External.WinFormsUI.O2Environment;
-using O2.Interfaces.Messages;
-using O2.Interfaces.Views;
-using O2.Kernel;
-using O2.Kernel.CodeUtils;
-using O2.Views.ASCX.Ascx.MainGUI;
-using O2.Views.ASCX.classes.MainGUI;
-using WeifenLuo.WinFormsUI.Docking;
-using System.IO;
-using O2.Views.ASCX;
-
-namespace O2.External.WinFormsUI.Forms
-{
- public partial class O2GuiWithDockPanel
- {
-
- public DockPanel getDockPanel()
- {
- return dockPanel;
- }
-
- 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;
- PublicDI.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 void sendEmailToO2SupportUsingTextInMenuBar()
- {
- sendEmailToO2Support("Main GUI", tbTextToemailSupport.Text);
- tbTextToemailSupport.Text = "";
- }
-
- public void sendEmailToO2Support(string subject, string text)
- {
- sendEmailToO2Support(subject, text, true);
- }
-
- public void sendEmailToO2Support(string subject, string text, bool sendSync)
- {
- sendMessageToolStripMenuItem1.Text = "Sending email....";
- try
- {
- var screenShotToSend = new PictureBox
- {
- BackgroundImage =
- Screenshots.getScreenshotOfFormObjectAndItsControls(this)
- };
- PublicDI.log.debug("Sending email to O2 Support with: " + text);
- Mail.sendMail(PublicDI.sEmailHost, "O2User@ouncelabs.com",
- PublicDI.sEmailToSendBugReportsTo, "",
- "Email from O2 User - " + subject,
- Mail.getUserDetailsAsEmailFormat() + Environment.NewLine + text,
- DebugMsg.createAttachmentsForRemoteSupport(DebugMsg.getFirstRtbObject(), screenShotToSend),
- sendSync, emailMessageSent);
-
- //
- }
- catch (Exception ex)
- {
- PublicDI.log.ex(ex, "in sendEmailToO2Support");
- PublicDI.log.error(
- "Could not send support email, please ensure that this o2 module is connected to the Internet");
- }
- }
-
- public MenuStrip getMainMenu()
- {
- return menuStripForO2GuiWithDocPanel;
- }
-
- private void emailMessageSent(bool result)
- {
- if (result)
- {
- toolStripTextBoxForMailServer.Visible = false;
- PublicDI.log.debug("Email sucessfull sent. Thanks");
- setDefaultEmailO2SupportMessage();
- sendMessageToolStripMenuItem1.Text =
- "Mail Sent OK: You can type another message and Click here to send it (or press entrer)";
- }
- else
- {
- toolStripTextBoxForMailServer.Text = PublicDI.sEmailHost;
- toolStripTextBoxForMailServer.ForeColor = Color.Black;
- toolStripTextBoxForMailServer.BackColor = Color.LightPink;
- toolStripTextBoxForMailServer.Visible = true;
- sendMessageToolStripMenuItem1.Text =
- "Could not send support email, please ensure that this o2 module is connected to the Internet";
- }
- }
-
-
- private void tryToLoadFileInMainDocumentArea(DragEventArgs e) // todo:to implement tryToLoadFileInMainDocumentArea
- {
- string file = Dnd.tryToGetFileOrDirectoryFromDroppedObject(e);
- if (File.Exists(file))
- O2Messages.fileOrFolderSelected(file);
- }
-
- public static void CloseThisForm()
- {
- O2AscxGUI.o2GuiWithDockPanel.Close();
- }
-
-
- public static void openLogViewerControl()
- {
- O2Messages.openControlInGUI(typeof(ascx_LogViewer), O2DockState.Float, "O2 Temp Directory");
- }
-
- //isAscxGuiAvailable
-
- public Control getAscx(string ascxControlName)
- {
- if (O2AscxGUI.dO2LoadedO2DockContent.ContainsKey(ascxControlName))
- return O2AscxGUI.dO2LoadedO2DockContent[ascxControlName].control;
- return null;
- }
-
- public void addControlToLoadedO2ModulesMenu(O2DockContent controlToLoad)
- {
- O2AscxGUI.o2GuiWithDockPanel.invokeOnThread(
- () =>
- {
- // Make sure there isn't alread an item with this type
- foreach (ToolStripItem currentToolStripItem in loadedO2ModuleToolStripMenuItem.DropDownItems)
- if (currentToolStripItem.Tag != null && currentToolStripItem.Tag is O2DockContent &&
- ((O2DockContent) currentToolStripItem.Tag).type == controlToLoad.type)
- return;
- var toolStripItem = new ToolStripMenuItem(controlToLoad.name, null,
- loadedO2ModuleToolStripMenuItem_Click)
- {Tag = controlToLoad};
- loadedO2ModuleToolStripMenuItem.DropDownItems.Add(toolStripItem);
- });
- }
-
- public void addToLoadedO2ModulesMenu(string menuItemName, Action onMenuItemClick)
- {
- O2AscxGUI.o2GuiWithDockPanel.invokeOnThread(
- () =>
- {
- var toolStripItem = new ToolStripMenuItem(
- menuItemName, null,new EventHandler((_object, _EventArgs) =>O2Thread.mtaThread(onMenuItemClick)));
-
- ;
- loadedO2ModuleToolStripMenuItem.DropDownItems.Add(toolStripItem);
- });
- }
-
-
- private void loadedO2ModuleToolStripMenuItem_Click(object sender, EventArgs e)
- {
- if (sender is ToolStripMenuItem)
- {
- var toolStripItem = (ToolStripMenuItem) sender;
- if (toolStripItem.Tag is O2DockContent)
- {
- var o2DockPanel = (O2DockContent) toolStripItem.Tag;
- var uniqueControlName = o2DockPanel.name;
- if (O2AscxGUI.isAscxLoaded(o2DockPanel.name))
- uniqueControlName += " " + Guid.NewGuid();
- O2AscxGUI.openAscxASync(o2DockPanel.type,O2DockState.Float,uniqueControlName);
- }
- }
- }
- }
-}
View
513 O2_External_WinFormsUI/Forms/O2GuiWithDockPanel.Designer.cs
@@ -1,513 +0,0 @@
-// This file is part of the OWASP O2 Platform (http://www.owasp.org/index.php/OWASP_O2_Platform) and is released under the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-namespace O2.External.WinFormsUI.Forms
-{
- partial class O2GuiWithDockPanel
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin2 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();
- WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin2 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();
- WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient4 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
- WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient8 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
- WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();
- WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();
- WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient9 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
- WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient5 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
- WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient10 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
- WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
- WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient11 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
- WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient12 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
- WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient6 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
- WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient13 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
- WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient14 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
- this.dockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel();
- this.menuStripForO2GuiWithDocPanel = new System.Windows.Forms.MenuStrip();
- this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.relauchThisO2ModuleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.closeExitO2ModuleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.configToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.whichDirectoryIsThisO2ModuleRunningFromToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.requestHelpFromO2SupportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.logToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.ozasmtQuerytoViewAndFilterOzasmtFilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.findingsViewerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.findingsEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.cirViewertoViewCirDataFilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.sourceCodeEditorwriteAndExecuteDynamicCCodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.o2ReflectorveryBetaVersionOfAnBuiltInNETReflectorToolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.o2UtilsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.unziputilToUnzipFilesOnUsingDragAndDropToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.webAutomationusesFirefoxGeckoWebBrowserControlToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.sourceCodeViewerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.currentTempDirectoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.dynamicallyInvokeO2sInternalClassesAndMethodsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.fileMappingsfilteredByFileTypeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.assemblyObjectInvocationshouldWorkWithMostNetAssesmbliesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.requestHelpFromO2SupportToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
- this.emailO2SupportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.tbTextToemailSupport = new System.Windows.Forms.ToolStripTextBox();
- this.sendMessageToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripTextBoxForMailServer = new System.Windows.Forms.ToolStripTextBox();
- this.crashO2HeyYouKnowYouWantToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.loadedO2ModuleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.windowsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.cbAutoSendLogsOnClose = new System.Windows.Forms.CheckBox();
- this.pictureBox1 = new System.Windows.Forms.PictureBox();
- this.o2CREPLScriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.o2DevelopmentEnviromentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.menuStripForO2GuiWithDocPanel.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
- this.SuspendLayout();
- //
- // dockPanel
- //
- this.dockPanel.ActiveAutoHideContent = null;
- this.dockPanel.AllowDrop = true;
- this.dockPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.dockPanel.DockBackColor = System.Drawing.SystemColors.Control;
- this.dockPanel.Location = new System.Drawing.Point(0, 22);
- this.dockPanel.Name = "dockPanel";
- this.dockPanel.Size = new System.Drawing.Size(1002, 601);
- dockPanelGradient4.EndColor = System.Drawing.SystemColors.ControlLight;
- dockPanelGradient4.StartColor = System.Drawing.SystemColors.ControlLight;
- autoHideStripSkin2.DockStripGradient = dockPanelGradient4;
- tabGradient8.EndColor = System.Drawing.SystemColors.Control;
- tabGradient8.StartColor = System.Drawing.SystemColors.Control;
- tabGradient8.TextColor = System.Drawing.SystemColors.ControlDarkDark;
- autoHideStripSkin2.TabGradient = tabGradient8;
- dockPanelSkin2.AutoHideStripSkin = autoHideStripSkin2;
- tabGradient9.EndColor = System.Drawing.SystemColors.ControlLightLight;
- tabGradient9.StartColor = System.Drawing.SystemColors.ControlLightLight;
- tabGradient9.TextColor = System.Drawing.SystemColors.ControlText;
- dockPaneStripGradient2.ActiveTabGradient = tabGradient9;
- dockPanelGradient5.EndColor = System.Drawing.SystemColors.Control;
- dockPanelGradient5.StartColor = System.Drawing.SystemColors.Control;
- dockPaneStripGradient2.DockStripGradient = dockPanelGradient5;
- tabGradient10.EndColor = System.Drawing.SystemColors.ControlLight;
- tabGradient10.StartColor = System.Drawing.SystemColors.ControlLight;
- tabGradient10.TextColor = System.Drawing.SystemColors.ControlText;
- dockPaneStripGradient2.InactiveTabGradient = tabGradient10;
- dockPaneStripSkin2.DocumentGradient = dockPaneStripGradient2;
- tabGradient11.EndColor = System.Drawing.SystemColors.ActiveCaption;
- tabGradient11.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
- tabGradient11.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
- tabGradient11.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
- dockPaneStripToolWindowGradient2.ActiveCaptionGradient = tabGradient11;
- tabGradient12.EndColor = System.Drawing.SystemColors.Control;
- tabGradient12.StartColor = System.Drawing.SystemColors.Control;
- tabGradient12.TextColor = System.Drawing.SystemColors.ControlText;
- dockPaneStripToolWindowGradient2.ActiveTabGradient = tabGradient12;
- dockPanelGradient6.EndColor = System.Drawing.SystemColors.ControlLight;
- dockPanelGradient6.StartColor = System.Drawing.SystemColors.ControlLight;
- dockPaneStripToolWindowGradient2.DockStripGradient = dockPanelGradient6;
- tabGradient13.EndColor = System.Drawing.SystemColors.GradientInactiveCaption;
- tabGradient13.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
- tabGradient13.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
- tabGradient13.TextColor = System.Drawing.SystemColors.ControlText;
- dockPaneStripToolWindowGradient2.InactiveCaptionGradient = tabGradient13;
- tabGradient14.EndColor = System.Drawing.Color.Transparent;
- tabGradient14.StartColor = System.Drawing.Color.Transparent;
- tabGradient14.TextColor = System.Drawing.SystemColors.ControlDarkDark;
- dockPaneStripToolWindowGradient2.InactiveTabGradient = tabGradient14;
- dockPaneStripSkin2.ToolWindowGradient = dockPaneStripToolWindowGradient2;
- dockPanelSkin2.DockPaneStripSkin = dockPaneStripSkin2;
- this.dockPanel.Skin = dockPanelSkin2;
- this.dockPanel.TabIndex = 7;
- this.dockPanel.ActiveContentChanged += new System.EventHandler(this.dockPanel_ActiveContentChanged);
- this.dockPanel.DragDrop += new System.Windows.Forms.DragEventHandler(this.dockPanel_DragDrop);
- this.dockPanel.DragEnter += new System.Windows.Forms.DragEventHandler(this.dockPanel_DragEnter);
- //
- // menuStripForO2GuiWithDocPanel
- //
- this.menuStripForO2GuiWithDocPanel.AllowDrop = true;
- this.menuStripForO2GuiWithDocPanel.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.fileToolStripMenuItem,
- this.configToolStripMenuItem,
- this.requestHelpFromO2SupportToolStripMenuItem,
- this.o2UtilsToolStripMenuItem,
- this.helpToolStripMenuItem,
- this.loadedO2ModuleToolStripMenuItem,
- this.windowsToolStripMenuItem});
- this.menuStripForO2GuiWithDocPanel.Location = new System.Drawing.Point(0, 0);
- this.menuStripForO2GuiWithDocPanel.Name = "menuStripForO2GuiWithDocPanel";
- this.menuStripForO2GuiWithDocPanel.Size = new System.Drawing.Size(1002, 24);
- this.menuStripForO2GuiWithDocPanel.TabIndex = 11;
- this.menuStripForO2GuiWithDocPanel.Text = "menuStrip1";
- this.menuStripForO2GuiWithDocPanel.DragDrop += new System.Windows.Forms.DragEventHandler(this.menuStripForO2GuiWithDocPanel_DragDrop);
- this.menuStripForO2GuiWithDocPanel.DragEnter += new System.Windows.Forms.DragEventHandler(this.menuStripForO2GuiWithDocPanel_DragEnter);
- //
- // fileToolStripMenuItem
- //
- this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.o2CREPLScriptToolStripMenuItem,
- this.o2DevelopmentEnviromentToolStripMenuItem,
- this.relauchThisO2ModuleToolStripMenuItem,
- this.closeExitO2ModuleToolStripMenuItem});
- this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
- this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
- this.fileToolStripMenuItem.Text = "File";
- //
- // relauchThisO2ModuleToolStripMenuItem
- //
- this.relauchThisO2ModuleToolStripMenuItem.Name = "relauchThisO2ModuleToolStripMenuItem";
- this.relauchThisO2ModuleToolStripMenuItem.Size = new System.Drawing.Size(194, 22);
- this.relauchThisO2ModuleToolStripMenuItem.Text = "Restart this O2 Module";
- //
- // closeExitO2ModuleToolStripMenuItem
- //
- this.closeExitO2ModuleToolStripMenuItem.Name = "closeExitO2ModuleToolStripMenuItem";
- this.closeExitO2ModuleToolStripMenuItem.Size = new System.Drawing.Size(194, 22);
- this.closeExitO2ModuleToolStripMenuItem.Text = "Exit";
- this.closeExitO2ModuleToolStripMenuItem.Click += new System.EventHandler(this.closeExitO2ModuleToolStripMenuItem_Click);
- //
- // configToolStripMenuItem
- //
- this.configToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.whichDirectoryIsThisO2ModuleRunningFromToolStripMenuItem});
- this.configToolStripMenuItem.Name = "configToolStripMenuItem";
- this.configToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
- this.configToolStripMenuItem.Text = "Config";
- //
- // whichDirectoryIsThisO2ModuleRunningFromToolStripMenuItem
- //
- this.whichDirectoryIsThisO2ModuleRunningFromToolStripMenuItem.Name = "whichDirectoryIsThisO2ModuleRunningFromToolStripMenuItem";
- this.whichDirectoryIsThisO2ModuleRunningFromToolStripMenuItem.Size = new System.Drawing.Size(266, 22);
- this.whichDirectoryIsThisO2ModuleRunningFromToolStripMenuItem.Text = "View O2 Install and Temp directories";
- this.whichDirectoryIsThisO2ModuleRunningFromToolStripMenuItem.Click += new System.EventHandler(this.whichDirectoryIsThisO2ModuleRunningFromToolStripMenuItem_Click);
- //
- // requestHelpFromO2SupportToolStripMenuItem
- //
- this.requestHelpFromO2SupportToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.logToolStripMenuItem,
- this.ozasmtQuerytoViewAndFilterOzasmtFilesToolStripMenuItem,
- this.findingsViewerToolStripMenuItem,
- this.findingsEditorToolStripMenuItem,
- this.cirViewertoViewCirDataFilesToolStripMenuItem,
- this.sourceCodeEditorwriteAndExecuteDynamicCCodeToolStripMenuItem,
- this.o2ReflectorveryBetaVersionOfAnBuiltInNETReflectorToolToolStripMenuItem});
- this.requestHelpFromO2SupportToolStripMenuItem.Name = "requestHelpFromO2SupportToolStripMenuItem";
- this.requestHelpFromO2SupportToolStripMenuItem.Size = new System.Drawing.Size(86, 20);
- this.requestHelpFromO2SupportToolStripMenuItem.Text = " O2 Modules";
- this.requestHelpFromO2SupportToolStripMenuItem.Click += new System.EventHandler(this.requestHelpFromO2SupportToolStripMenuItem_Click);
- //
- // logToolStripMenuItem
- //
- this.logToolStripMenuItem.Name = "logToolStripMenuItem";
- this.logToolStripMenuItem.Size = new System.Drawing.Size(411, 22);
- this.logToolStripMenuItem.Text = "O2 Log Viewer";
- this.logToolStripMenuItem.Click += new System.EventHandler(this.logToolStripMenuItem_Click);
- //
- // ozasmtQuerytoViewAndFilterOzasmtFilesToolStripMenuItem
- //
- this.ozasmtQuerytoViewAndFilterOzasmtFilesToolStripMenuItem.Name = "ozasmtQuerytoViewAndFilterOzasmtFilesToolStripMenuItem";
- this.ozasmtQuerytoViewAndFilterOzasmtFilesToolStripMenuItem.Size = new System.Drawing.Size(411, 22);
- this.ozasmtQuerytoViewAndFilterOzasmtFilesToolStripMenuItem.Text = "Ozasmt Query (to view and filter Ozasmt files)";
- this.ozasmtQuerytoViewAndFilterOzasmtFilesToolStripMenuItem.Visible = false;
- this.ozasmtQuerytoViewAndFilterOzasmtFilesToolStripMenuItem.Click += new System.EventHandler(this.ozasmtQuerytoViewAndFilterOzasmtFilesToolStripMenuItem_Click);
- //
- // findingsViewerToolStripMenuItem
- //
- this.findingsViewerToolStripMenuItem.Name = "findingsViewerToolStripMenuItem";
- this.findingsViewerToolStripMenuItem.Size = new System.Drawing.Size(411, 22);
- this.findingsViewerToolStripMenuItem.Text = "Findings Viewer (from ozasmt files or other O2 modules)";
- this.findingsViewerToolStripMenuItem.Visible = false;
- this.findingsViewerToolStripMenuItem.Click += new System.EventHandler(this.findingsViewerToolStripMenuItem_Click);
- //
- // findingsEditorToolStripMenuItem
- //
- this.findingsEditorToolStripMenuItem.Name = "findingsEditorToolStripMenuItem";
- this.findingsEditorToolStripMenuItem.Size = new System.Drawing.Size(411, 22);
- this.findingsEditorToolStripMenuItem.Text = "Finding Editor (to view and change all trace details)";
- this.findingsEditorToolStripMenuItem.Visible = false;
- this.findingsEditorToolStripMenuItem.Click += new System.EventHandler(this.findingsEditorToolStripMenuItem_Click);
- //
- // cirViewertoViewCirDataFilesToolStripMenuItem
- //
- this.cirViewertoViewCirDataFilesToolStripMenuItem.Name = "cirViewertoViewCirDataFilesToolStripMenuItem";
- this.cirViewertoViewCirDataFilesToolStripMenuItem.Size = new System.Drawing.Size(411, 22);
- this.cirViewertoViewCirDataFilesToolStripMenuItem.Text = "Cir Viewer (to view Cir Data Files)";
- this.cirViewertoViewCirDataFilesToolStripMenuItem.Visible = false;
- this.cirViewertoViewCirDataFilesToolStripMenuItem.Click += new System.EventHandler(this.cirViewertoViewCirDataFilesToolStripMenuItem_Click);
- //
- // sourceCodeEditorwriteAndExecuteDynamicCCodeToolStripMenuItem
- //
- this.sourceCodeEditorwriteAndExecuteDynamicCCodeToolStripMenuItem.Name = "sourceCodeEditorwriteAndExecuteDynamicCCodeToolStripMenuItem";
- this.sourceCodeEditorwriteAndExecuteDynamicCCodeToolStripMenuItem.Size = new System.Drawing.Size(411, 22);
- this.sourceCodeEditorwriteAndExecuteDynamicCCodeToolStripMenuItem.Text = "C# Scripts Editor (write and execute dynamic C# code)";
- this.sourceCodeEditorwriteAndExecuteDynamicCCodeToolStripMenuItem.Visible = false;
- //
- // o2ReflectorveryBetaVersionOfAnBuiltInNETReflectorToolToolStripMenuItem
- //
- this.o2ReflectorveryBetaVersionOfAnBuiltInNETReflectorToolToolStripMenuItem.Name = "o2ReflectorveryBetaVersionOfAnBuiltInNETReflectorToolToolStripMenuItem";
- this.o2ReflectorveryBetaVersionOfAnBuiltInNETReflectorToolToolStripMenuItem.Size = new System.Drawing.Size(411, 22);
- this.o2ReflectorveryBetaVersionOfAnBuiltInNETReflectorToolToolStripMenuItem.Text = "O2 Reflector (very beta version of an built in .NET Reflector tool)";
- this.o2ReflectorveryBetaVersionOfAnBuiltInNETReflectorToolToolStripMenuItem.Visible = false;
- //
- // o2UtilsToolStripMenuItem
- //
- this.o2UtilsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.unziputilToUnzipFilesOnUsingDragAndDropToolStripMenuItem,
- this.webAutomationusesFirefoxGeckoWebBrowserControlToolStripMenuItem,
- this.sourceCodeViewerToolStripMenuItem,
- this.currentTempDirectoryToolStripMenuItem,
- this.dynamicallyInvokeO2sInternalClassesAndMethodsToolStripMenuItem,
- this.fileMappingsfilteredByFileTypeToolStripMenuItem,
- this.assemblyObjectInvocationshouldWorkWithMostNetAssesmbliesToolStripMenuItem});
- this.o2UtilsToolStripMenuItem.Name = "o2UtilsToolStripMenuItem";
- this.o2UtilsToolStripMenuItem.Size = new System.Drawing.Size(60, 20);
- this.o2UtilsToolStripMenuItem.Text = "O2 Utils";
- this.o2UtilsToolStripMenuItem.Visible = false;
- //
- // unziputilToUnzipFilesOnUsingDragAndDropToolStripMenuItem
- //
- this.unziputilToUnzipFilesOnUsingDragAndDropToolStripMenuItem.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
- this.unziputilToUnzipFilesOnUsingDragAndDropToolStripMenuItem.Name = "unziputilToUnzipFilesOnUsingDragAndDropToolStripMenuItem";
- this.unziputilToUnzipFilesOnUsingDragAndDropToolStripMenuItem.Size = new System.Drawing.Size(444, 22);
- this.unziputilToUnzipFilesOnUsingDragAndDropToolStripMenuItem.Text = "Unzip (util to unzip files on using drag and drop)";
- this.unziputilToUnzipFilesOnUsingDragAndDropToolStripMenuItem.Click += new System.EventHandler(this.unziputilToUnzipFilesOnUsingDragAndDropToolStripMenuItem_Click);
- //
- // webAutomationusesFirefoxGeckoWebBrowserControlToolStripMenuItem
- //
- this.webAutomationusesFirefoxGeckoWebBrowserControlToolStripMenuItem.Name = "webAutomationusesFirefoxGeckoWebBrowserControlToolStripMenuItem";
- this.webAutomationusesFirefoxGeckoWebBrowserControlToolStripMenuItem.Size = new System.Drawing.Size(444, 22);
- this.webAutomationusesFirefoxGeckoWebBrowserControlToolStripMenuItem.Text = "Web Automation (uses Firefox Gecko Web Browser Control)";
- this.webAutomationusesFirefoxGeckoWebBrowserControlToolStripMenuItem.Click += new System.EventHandler(this.webAutomationusesFirefoxGeckoWebBrowserControlToolStripMenuItem_Click_1);
- //
- // sourceCodeViewerToolStripMenuItem
- //
- this.sourceCodeViewerToolStripMenuItem.Name = "sourceCodeViewerToolStripMenuItem";
- this.sourceCodeViewerToolStripMenuItem.Size = new System.Drawing.Size(444, 22);
- this.sourceCodeViewerToolStripMenuItem.Text = "File Viewer (C# && Xml color coding)";
- //
- // currentTempDirectoryToolStripMenuItem
- //
- this.currentTempDirectoryToolStripMenuItem.Name = "currentTempDirectoryToolStripMenuItem";
- this.currentTempDirectoryToolStripMenuItem.Size = new System.Drawing.Size(444, 22);
- this.currentTempDirectoryToolStripMenuItem.Text = "Current Temp Directory";
- //
- // dynamicallyInvokeO2sInternalClassesAndMethodsToolStripMenuItem
- //
- this.dynamicallyInvokeO2sInternalClassesAndMethodsToolStripMenuItem.Name = "dynamicallyInvokeO2sInternalClassesAndMethodsToolStripMenuItem";
- this.dynamicallyInvokeO2sInternalClassesAndMethodsToolStripMenuItem.Size = new System.Drawing.Size(444, 22);
- this.dynamicallyInvokeO2sInternalClassesAndMethodsToolStripMenuItem.Text = "Dynamically invoke O2\'s internal classes and methods";
- //
- // fileMappingsfilteredByFileTypeToolStripMenuItem
- //
- this.fileMappingsfilteredByFileTypeToolStripMenuItem.Name = "fileMappingsfilteredByFileTypeToolStripMenuItem";
- this.fileMappingsfilteredByFileTypeToolStripMenuItem.Size = new System.Drawing.Size(444, 22);
- this.fileMappingsfilteredByFileTypeToolStripMenuItem.Text = "File Mappings (filtered by file type)";
- this.fileMappingsfilteredByFileTypeToolStripMenuItem.Click += new System.EventHandler(this.fileMappingsfilteredByFileTypeToolStripMenuItem_Click);
- //
- // assemblyObjectInvocationshouldWorkWithMostNetAssesmbliesToolStripMenuItem
- //
- this.assemblyObjectInvocationshouldWorkWithMostNetAssesmbliesToolStripMenuItem.Name = "assemblyObjectInvocationshouldWorkWithMostNetAssesmbliesToolStripMenuItem";
- this.assemblyObjectInvocationshouldWorkWithMostNetAssesmbliesToolStripMenuItem.Size = new System.Drawing.Size(444, 22);
- this.assemblyObjectInvocationshouldWorkWithMostNetAssesmbliesToolStripMenuItem.Text = "Assembly Object Invocation (should work with most .Net assesmblies)";
- //
- // helpToolStripMenuItem
- //
- this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.requestHelpFromO2SupportToolStripMenuItem1,
- this.toolStripSeparator1,
- this.emailO2SupportToolStripMenuItem,
- this.tbTextToemailSupport,
- this.sendMessageToolStripMenuItem1,
- this.toolStripTextBoxForMailServer,
- this.crashO2HeyYouKnowYouWantToToolStripMenuItem});
- this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
- this.helpToolStripMenuItem.Size = new System.Drawing.Size(102, 20);
- this.helpToolStripMenuItem.Text = "Help && Support";
- //
- // requestHelpFromO2SupportToolStripMenuItem1
- //
- this.requestHelpFromO2SupportToolStripMenuItem1.Name = "requestHelpFromO2SupportToolStripMenuItem1";
- this.requestHelpFromO2SupportToolStripMenuItem1.Size = new System.Drawing.Size(460, 22);
- this.requestHelpFromO2SupportToolStripMenuItem1.Text = "Request Help from O2 Support";
- this.requestHelpFromO2SupportToolStripMenuItem1.Click += new System.EventHandler(this.requestHelpFromO2SupportToolStripMenuItem1_Click);
- //
- // toolStripSeparator1
- //
- this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(457, 6);
- //
- // emailO2SupportToolStripMenuItem
- //
- this.emailO2SupportToolStripMenuItem.Name = "emailO2SupportToolStripMenuItem";
- this.emailO2SupportToolStripMenuItem.Size = new System.Drawing.Size(460, 22);
- this.emailO2SupportToolStripMenuItem.Text = "Send Comment to O2 Developers (use text below)";
- //
- // tbTextToemailSupport
- //
- this.tbTextToemailSupport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128)))));
- this.tbTextToemailSupport.Name = "tbTextToemailSupport";
- this.tbTextToemailSupport.Size = new System.Drawing.Size(400, 23);
- this.tbTextToemailSupport.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbTextToemailSupport_KeyDown);
- this.tbTextToemailSupport.TextChanged += new System.EventHandler(this.tbTextToemailSupport_TextChanged);
- //
- // sendMessageToolStripMenuItem1
- //
- this.sendMessageToolStripMenuItem1.Name = "sendMessageToolStripMenuItem1";
- this.sendMessageToolStripMenuItem1.Size = new System.Drawing.Size(460, 22);
- this.sendMessageToolStripMenuItem1.Text = "Click here to send message (or press entrer)";
- this.sendMessageToolStripMenuItem1.Click += new System.EventHandler(this.sendMessageToolStripMenuItem1_Click);
- //
- // toolStripTextBoxForMailServer
- //
- this.toolStripTextBoxForMailServer.Name = "toolStripTextBoxForMailServer";
- this.toolStripTextBoxForMailServer.Size = new System.Drawing.Size(150, 23);
- this.toolStripTextBoxForMailServer.Text = "mail server";
- this.toolStripTextBoxForMailServer.Visible = false;
- this.toolStripTextBoxForMailServer.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.toolStripTextBoxForMailServer_KeyPress);
- this.toolStripTextBoxForMailServer.TextChanged += new System.EventHandler(this.toolStripTextBoxForMailServer_TextChanged);
- //
- // crashO2HeyYouKnowYouWantToToolStripMenuItem
- //
- this.crashO2HeyYouKnowYouWantToToolStripMenuItem.Name = "crashO2HeyYouKnowYouWantToToolStripMenuItem";
- this.crashO2HeyYouKnowYouWantToToolStripMenuItem.Size = new System.Drawing.Size(460, 22);
- this.crashO2HeyYouKnowYouWantToToolStripMenuItem.Text = "Crash O2 !!! (Hey you know you want to :) )";
- this.crashO2HeyYouKnowYouWantToToolStripMenuItem.Click += new System.EventHandler(this.crashO2HeyYouKnowYouWantToToolStripMenuItem_Click);
- //
- // loadedO2ModuleToolStripMenuItem
- //
- this.loadedO2ModuleToolStripMenuItem.Name = "loadedO2ModuleToolStripMenuItem";
- this.loadedO2ModuleToolStripMenuItem.Size = new System.Drawing.Size(120, 20);
- this.loadedO2ModuleToolStripMenuItem.Text = "Loaded O2 Module";
- //
- // windowsToolStripMenuItem
- //
- this.windowsToolStripMenuItem.Name = "windowsToolStripMenuItem";
- this.windowsToolStripMenuItem.Size = new System.Drawing.Size(68, 20);
- this.windowsToolStripMenuItem.Text = "Windows";
- //
- // cbAutoSendLogsOnClose
- //
- this.cbAutoSendLogsOnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.cbAutoSendLogsOnClose.AutoSize = true;
- this.cbAutoSendLogsOnClose.BackColor = System.Drawing.Color.WhiteSmoke;
- this.cbAutoSendLogsOnClose.Location = new System.Drawing.Point(813, 3);
- this.cbAutoSendLogsOnClose.Name = "cbAutoSendLogsOnClose";
- this.cbAutoSendLogsOnClose.Size = new System.Drawing.Size(151, 17);
- this.cbAutoSendLogsOnClose.TabIndex = 15;
- this.cbAutoSendLogsOnClose.Text = "Auto send O2 Logs on exit";
- this.cbAutoSendLogsOnClose.UseVisualStyleBackColor = false;
- this.cbAutoSendLogsOnClose.Visible = false;
- //
- // pictureBox1
- //
- this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
- this.pictureBox1.Location = new System.Drawing.Point(968, 0);
- this.pictureBox1.Name = "pictureBox1";
- this.pictureBox1.Size = new System.Drawing.Size(33, 29);
- this.pictureBox1.TabIndex = 18;
- this.pictureBox1.TabStop = false;
- //
- // o2CREPLScriptToolStripMenuItem
- //
- this.o2CREPLScriptToolStripMenuItem.Name = "o2CREPLScriptToolStripMenuItem";
- this.o2CREPLScriptToolStripMenuItem.Size = new System.Drawing.Size(194, 22);
- this.o2CREPLScriptToolStripMenuItem.Text = "O2 C# REPL Script";
- this.o2CREPLScriptToolStripMenuItem.Click += new System.EventHandler(this.o2CREPLScriptToolStripMenuItem_Click);
- //
- // o2DevelopmentEnviromentToolStripMenuItem
- //
- this.o2DevelopmentEnviromentToolStripMenuItem.Name = "o2DevelopmentEnviromentToolStripMenuItem";
- this.o2DevelopmentEnviromentToolStripMenuItem.Size = new System.Drawing.Size(227, 22);
- this.o2DevelopmentEnviromentToolStripMenuItem.Text = "O2 Development Enviroment";
- this.o2DevelopmentEnviromentToolStripMenuItem.Click += new System.EventHandler(this.o2DevelopmentEnviromentToolStripMenuItem_Click);
- //
- // O2GuiWithDockPanel
- //
- this.AllowDrop = true;
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(1002, 623);
- this.Controls.Add(this.dockPanel);
- this.Controls.Add(this.pictureBox1);
- this.Controls.Add(this.cbAutoSendLogsOnClose);
- this.Controls.Add(this.menuStripForO2GuiWithDocPanel);
- this.IsMdiContainer = true;
- this.MainMenuStrip = this.menuStripForO2GuiWithDocPanel;
- this.Name = "O2GuiWithDockPanel";
- this.Text = "O2GuiWithDockPanel";
- this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.O2GuiWithDockPanel_FormClosing);
- this.Load += new System.EventHandler(this.O2GuiWithDockPanel_Load);
- this.DragDrop += new System.Windows.Forms.DragEventHandler(this.O2GuiWithDockPanel_DragDrop);
- this.DragEnter += new System.Windows.Forms.DragEventHandler(this.O2GuiWithDockPanel_DragEnter);
- this.menuStripForO2GuiWithDocPanel.ResumeLayout(false);
- this.menuStripForO2GuiWithDocPanel.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private WeifenLuo.WinFormsUI.Docking.DockPanel dockPanel;
- private System.Windows.Forms.MenuStrip menuStripForO2GuiWithDocPanel;
- private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem closeExitO2ModuleToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem relauchThisO2ModuleToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem requestHelpFromO2SupportToolStripMenuItem1;
- private System.Windows.Forms.CheckBox cbAutoSendLogsOnClose;
- private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
- private System.Windows.Forms.ToolStripMenuItem emailO2SupportToolStripMenuItem;
- private System.Windows.Forms.ToolStripTextBox tbTextToemailSupport;
- private System.Windows.Forms.ToolStripMenuItem sendMessageToolStripMenuItem1;
- private System.Windows.Forms.ToolStripTextBox toolStripTextBoxForMailServer;
- private System.Windows.Forms.PictureBox pictureBox1;
- private System.Windows.Forms.ToolStripMenuItem configToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem o2UtilsToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem unziputilToUnzipFilesOnUsingDragAndDropToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem webAutomationusesFirefoxGeckoWebBrowserControlToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem requestHelpFromO2SupportToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem logToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem ozasmtQuerytoViewAndFilterOzasmtFilesToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem findingsViewerToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem findingsEditorToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem cirViewertoViewCirDataFilesToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem o2ReflectorveryBetaVersionOfAnBuiltInNETReflectorToolToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem sourceCodeEditorwriteAndExecuteDynamicCCodeToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem sourceCodeViewerToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem currentTempDirectoryToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem dynamicallyInvokeO2sInternalClassesAndMethodsToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem fileMappingsfilteredByFileTypeToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem assemblyObjectInvocationshouldWorkWithMostNetAssesmbliesToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem crashO2HeyYouKnowYouWantToToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem whichDirectoryIsThisO2ModuleRunningFromToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem loadedO2ModuleToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem windowsToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem o2CREPLScriptToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem o2DevelopmentEnviromentToolStripMenuItem;
- }
-}
View
305 O2_External_WinFormsUI/Forms/O2GuiWithDockPanel.cs
@@ -1,305 +0,0 @@
-// This file is part of the OWASP O2 Platform (http://www.owasp.org/index.php/OWASP_O2_Platform) and is released under the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-using System;
-using System.Drawing;
-using System.Windows.Forms;
-using O2.DotNetWrappers.DotNet;
-using O2.DotNetWrappers.Network;
-using O2.DotNetWrappers.Windows;
-using O2.External.WinFormsUI;
-using O2.Interfaces.Views;
-using O2.Kernel;
-using O2.Views.ASCX.Ascx.MainGUI;
-using O2.Views.ASCX.classes.MainGUI;
-using O2.Views.ASCX.Forms;
-using WeifenLuo.WinFormsUI.Docking;
-using O2.Kernel.InterfacesBaseImpl;
-
-namespace O2.External.WinFormsUI.Forms
-{
- public partial class O2GuiWithDockPanel : Form
- {
- //private string guiXmlFormat = Path.Combine(PublicDI.o2CorLibConfig.O2TempDir, "GuiFormat.xml");
-
- public O2GuiWithDockPanel()
- {
- InitializeComponent();
- if (DesignMode == false)
- {
- // set the logRedirection in the publicDI log so that all messages go to the GUIs Log (and visible by the LogViewer)
- PublicDI.log.LogRedirectionTarget = new WinFormsUILog(); // first create the one we are going to use locally
- KO2MessageQueue.getO2KernelQueue().onMessages += o2MessageQueue_onMessages;
- O2AscxGUI.o2GuiWithDockPanel = this;
- cbAutoSendLogsOnClose.Checked = false; // ClickOnceDeployment.isApplicationBeingExecutedViaClickOnceDeployment();
- }
- }
-
-
- /* private void button1_Click(object sender, EventArgs e)
- {
-
- }*/
-
-
-
- private void closeToolStripMenuItem_Click(object sender, EventArgs e)
- {
- }
-
-
- private void O2GuiWithDockPanel_FormClosing(object sender, FormClosingEventArgs e)
- {
- if (cbAutoSendLogsOnClose.Checked)
- sendEmailToO2Support("On Form Closing", "Closed at: " + DateTime.Now.ToShortTimeString(), false);
- PublicDI.log.LogRedirectionTarget = null;
-
- KO2MessageQueue.getO2KernelQueue().onMessages -= o2MessageQueue_onMessages;
- O2AscxGUI.o2GuiWithDockPanel = null; // reset this value since this GUI is not available anymore
- O2AscxGUI.guiClosed.Set(); // set flag to the treads on WaitFor() can continute
- PublicDI.log.info("O2GuiWithDockPanel form Closing"); // this log entry should now go to the Debug View
- }
-
- private void requestHelpFromO2SupportToolStripMenuItem_Click(object sender, EventArgs e)
- {
- }
-
- private void dockPanel_ActiveContentChanged(object sender, EventArgs e)
- {
- }
-
- private void reLaunchThisO2ModuleToolStripMenuItem_Click(object sender, EventArgs e)
- {
- }
-
- private void closeExitO2ModuleToolStripMenuItem_Click(object sender, EventArgs e)
- {
- Application.Exit();
- }
-
-/* private void relauchThisO2ModuleToolStripMenuItem_Click(object sender, EventArgs e)
- {
- Processes.reLaunchCurrentProcess();
- }*/
-
- private void requestHelpFromO2SupportToolStripMenuItem1_Click(object sender, EventArgs e)
- {
- ReportBug.showGui(this);
- }
-
-
- private void textToemailSupport_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (e.KeyChar == (char) Keys.Enter)
- sendEmailToO2SupportUsingTextInMenuBar();
- }
-
- private void btSendCommentToO2Support_Click(object sender, EventArgs e)
- {
- sendEmailToO2SupportUsingTextInMenuBar();
- }
-
-
- private void sendMessageToolStripMenuItem1_Click(object sender, EventArgs e)
- {
- sendEmailToO2Support("From O2 GUI Tool bar", tbTextToemailSupport.Text);
- }
-
- private void setDefaultEmailO2SupportMessage()
- {
- tbTextToemailSupport.Text = PublicDI.sEmailDefaultTextFromO2Gui;
- }
-
- private void O2GuiWithDockPanel_Load(object sender, EventArgs e)
- {
- setDefaultEmailO2SupportMessage();
- }
-
- private void tbTextToemailSupport_TextChanged(object sender, EventArgs e)
- {
- if (tbTextToemailSupport.Text != PublicDI.sEmailDefaultTextFromO2Gui)
- tbTextToemailSupport.BackColor = Color.LightGreen;
- else
- tbTextToemailSupport.BackColor = Color.LightPink;
- }
-
- private void tbTextToemailSupport_KeyDown(object sender, KeyEventArgs e)
- {
- if (tbTextToemailSupport.Text == PublicDI.sEmailDefaultTextFromO2Gui)
- tbTextToemailSupport.Text = "";
- if (e.KeyCode == Keys.Enter)
- {
- sendEmailToO2Support("From O2 GUI Tool bar (using Enter)", tbTextToemailSupport.Text);
- }
- }
-
-
-
-
- private void toolStripTextBoxForMailServer_TextChanged(object sender, EventArgs e)
- {
- PublicDI.sEmailHost = toolStripTextBoxForMailServer.Text;
- toolStripTextBoxForMailServer.BackColor = Color.LightGreen;
- }
-
- private void toolStripTextBoxForMailServer_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (e.KeyChar == (Char) Keys.Enter)
- sendMessageToolStripMenuItem1_Click(null, null);
- }
-
- private void dockPanel_DragDrop(object sender, DragEventArgs e)
- {
- tryToLoadFileInMainDocumentArea(e);
- }
-
-
- private void dockPanel_DragEnter(object sender, DragEventArgs e)
- {
- Dnd.setEffect(e);
- }
-
- private void menuStripForO2GuiWithDocPanel_DragDrop(object sender, DragEventArgs e)
- {
- tryToLoadFileInMainDocumentArea(e);
- }
-
- private void menuStripForO2GuiWithDocPanel_DragEnter(object sender, DragEventArgs e)
- {
- Dnd.setEffect(e);
- }
-
- private void O2GuiWithDockPanel_DragEnter(object sender, DragEventArgs e)
- {
- Dnd.setEffect(e);
- }
-
- private void O2GuiWithDockPanel_DragDrop(object sender, DragEventArgs e)
- {
- tryToLoadFileInMainDocumentArea(e);
- }
-
-
-
- private void ozasmtQuerytoViewAndFilterOzasmtFilesToolStripMenuItem_Click(object sender, EventArgs e)
- {
- //PublicDI.windowsForms.openAscx(typeof (ascx_OzasmtQuery), false, "O2 Tool - Ozasmt Query");
- }
-
-
- private void findingsEditorToolStripMenuItem_Click(object sender, EventArgs e)
- {
- //PublicDI.windowsForms.openAscx(typeof (ascx_FindingEditor), true, "O2 Tool - Finding Editor");
- }
-
- private void currentTempDirectoryToolStripMenuItem_Click(object sender, EventArgs e)
- {
- //PublicDI.windowsForms.openAscx(typeof (ascx_Directory), true, "O2 Temp Directory");
- }
-
- private void logToolStripMenuItem_Click(object sender, EventArgs e)
- {
- openLogViewerControl();
- }
-
-
-
- private void findingsViewerToolStripMenuItem_Click(object sender, EventArgs e)
- {
- //PublicDI.windowsForms.openAscx(typeof (ascx_FindingsViewer), true, "O2 Tool - Findings Viewer");
- }
-
- private void cirViewertoViewCirDataFilesToolStripMenuItem_Click(object sender, EventArgs e)
- {
-// PublicDI.windowsForms.openAscx(typeof (ascx_CirViewer_CirData), false, "O2 Tool - Cir Viewer");
- }
-
- private void unziputilToUnzipFilesOnUsingDragAndDropToolStripMenuItem_Click(object sender, EventArgs e)
- {
- // PublicDI.windowsForms.openAscx(typeof (ascx_Unzip), true, "O2 Tool - Unzip files");
- }
-
- /* private void o2ReflectorveryBetaVersionOfAnBuiltInNETReflectorToolToolStripMenuItem_Click(object sender,
- EventArgs e)
- {
- PublicDI.windowsForms.openAscx(typeof (ascx_O2Reflector), false, "O2 Tool - O2 Reflector");
- }
- */
-
- private void webAutomationusesFirefoxGeckoWebBrowserControlToolStripMenuItem_Click(object sender, EventArgs e)
- {
- // PublicDI.windowsForms.openAscx(typeof (ascx_WebAutomation), false, "Web Automation using Firefox Gecko Web Browser Control");
- }
-
- /* private void sourceCodeViewerToolStripMenuItem_Click(object sender, EventArgs e)
- {
- PublicDI.windowsForms.openAscx(typeof (ascx_SourceCodeEditor), false, "File Viewer");
- }
-
- private void sourceCodeEditorwriteAndExecuteDynamicCCodeToolStripMenuItem_Click(object sender, EventArgs e)
- {
- PublicDI.windowsForms.openAscx(typeof (ascx_Scripts), false, "C# Scripts Editor");
- }
-
- private void editThisO2ModuleStartUpXmlConfigFileToolStripMenuItem_Click(object sender, EventArgs e)
- {
- ascx_SourceCodeEditor.loadFile(SpringExec.getCurrentModuleXmlConfigFile().Replace("vshost.", ""));
- }
-
- private void dynamicallyInvokeO2sInternalClassesAndMethodsToolStripMenuItem_Click(object sender, EventArgs e)
- {
- ascx_AssemblyInvoke.loadAsO2DockPanel(DockState.Float, "O2 Object Model").loadAssembly(
- PublicDI.reflection.getCurrentAssembly(), false);
- }*/
-
- private void webAutomationusesFirefoxGeckoWebBrowserControlToolStripMenuItem_Click_1(object sender, EventArgs e)
- {
-// PublicDI.windowsForms.openAscx(typeof (ascx_WebAutomation), false, "Web automation - using Firefox Gecko engine");
- }
-
- private void fileMappingsfilteredByFileTypeToolStripMenuItem_Click(object sender, EventArgs e)
- {
-// PublicDI.windowsForms.openAscx(typeof (ascx_FileMappings), false, "File Mappings");
- }
-
-/* private void assemblyObjectInvocationshouldWorkWithMostNetAssesmbliesToolStripMenuItem_Click(object sender,
- EventArgs e)
- {
- PublicDI.windowsForms.openAscx(typeof (ascx_AssemblyInvoke), false, "Generic Assembly Invoke");
- }*/
-
- private void crashO2HeyYouKnowYouWantToToolStripMenuItem_Click(object sender, EventArgs e)
- {
- PublicDI.log.info("Crashing O2 :)");
- throw new Exception("How to crash O2 in 1 click!");
- }
-
- private void relauchThisO2ModuleInTempDirToolStripMenuItem_Click(object sender, EventArgs e)
- {
- Processes.startCurrentProcessInTempFolder();
- }
-
- private void whichDirectoryIsThisO2ModuleRunningFromToolStripMenuItem_Click(object sender, EventArgs e)
- {
- //PublicDI.log.showMessageBox(PublicDI.config.CurrentExecutableDirectory, "This O2 module is running from:",
- // MessageBoxButtons.OK);
- O2AscxGUI.openAscxASync(typeof (ascx_O2InstallAndTempDirectories), O2DockState.Float, "O2 Install and Temp Directories");
-
- }
-
- private void editThisO2ModuleStartUpXmlConfigFileToolStripMenuItem_Click(object sender, EventArgs e)
- {
-
- }
-
- private void o2CREPLScriptToolStripMenuItem_Click(object sender, EventArgs e)
- {
- open.scriptEditor_MtaThread();
- }
-
- private void o2DevelopmentEnviromentToolStripMenuItem_Click(object sender, EventArgs e)
- {
- open.devEnvironment_MtaThread();
- }
-
-
- }
-}
View
123 O2_External_WinFormsUI/Forms/O2GuiWithDockPanel.resx
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <metadata name="menuStripForO2GuiWithDocPanel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>116, 17</value>
- </metadata>
-</root>
View
121 O2_External_WinFormsUI/HandleO2MessageOnSD.cs
@@ -1,121 +0,0 @@
-// This file is part of the OWASP O2 Platform (http://www.owasp.org/index.php/OWASP_O2_Platform) and is released under the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-using System;
-using System.IO;
-using System.Windows.Forms;
-using O2.DotNetWrappers.O2Misc;
-using O2.External.SharpDevelop.Ascx;
-using O2.External.WinFormsUI.Forms;
-using O2.External.WinFormsUI.O2Environment;
-using O2.Interfaces.Messages;
-using O2.Interfaces.Views;
-using O2.Kernel.CodeUtils;
-using O2.Kernel.InterfacesBaseImpl;
-
-namespace O2.External.SharpDevelop
-{
- public class HandleO2MessageOnSD
- {
- public static bool autoTryToFixSourceCodeFileReferences = true;
-
- public static void o2MessageHelper_Handle_IM_FileOrFolderSelected(IO2Message o2Message)
- {
- o2MessageHelper_Handle_IM_FileOrFolderSelected(o2Message, null);
- }
-
- public static void o2MessageHelper_Handle_IM_FileOrFolderSelected(IO2Message o2Message, string parentControl)
- {
- // open file in ascx_SourceCodeEditor
- if (o2Message is IM_FileOrFolderSelected)
- {
- var fileOrFolderSelectedMessage = ((IM_FileOrFolderSelected) o2Message);
- //var fileSelected = .pathToFileOrFolder;
- fileOrFolderSelectedMessage.pathToFileOrFolder = tryToResolveFileLocation(fileOrFolderSelectedMessage.pathToFileOrFolder, O2AscxGUI.getGuiWithDockPanelAsControl());
- if (File.Exists(fileOrFolderSelectedMessage.pathToFileOrFolder))
- {
- // var filename = Path.GetFileName(fileOrFolderSelectedMessage.pathToFileOrFolder);
-
- var ascx_ScriptControl = getScriptEditor(fileOrFolderSelectedMessage.pathToFileOrFolder);
- O2Messages.getAscx(ascx_ScriptControl,
- guiControl =>
- {
- if (guiControl != null && guiControl is ascx_SourceCodeEditor)
- {
- var sourceCodeEditor = (ascx_SourceCodeEditor)guiControl;
- switch (fileOrFolderSelectedMessage.messageText)
- {
- case "KM_Show_Selected_Text":
- loadFileAndSelectText(sourceCodeEditor, fileOrFolderSelectedMessage);
- break;
- default:
- loadFileAndSelectLine(sourceCodeEditor, fileOrFolderSelectedMessage);
- break;
- }
-
- if (parentControl != null)
- O2DockUtils.setDockContentState(parentControl,
- O2DockState.DockLeft);
- }
- });
- }
- }
- }
-
- private static void loadFileAndSelectText(ascx_SourceCodeEditor sourceCodeEditor, IM_FileOrFolderSelected fileOrFolderSelectedMessage)
- {
-
- sourceCodeEditor.loadSourceCodeFile(fileOrFolderSelectedMessage.pathToFileOrFolder);
- sourceCodeEditor.setSelectedText(fileOrFolderSelectedMessage.lineNumber,
- fileOrFolderSelectedMessage.columnNumber,
- fileOrFolderSelectedMessage.showAsError);
- }
-
- private static void loadFileAndSelectLine(ascx_SourceCodeEditor sourceCodeEditor, IM_FileOrFolderSelected fileOrFolderSelectedMessage)
- {
- sourceCodeEditor.loadSourceCodeFile(fileOrFolderSelectedMessage.pathToFileOrFolder);
- sourceCodeEditor.setSelectedLineNumber(fileOrFolderSelectedMessage.lineNumber);
- }
-
- private static string getScriptEditor(string filename)
- {
- var ascxSourceCodeEditor = getScriptEditorControlName(filename);
- if (false == O2AscxGUI.isAscxLoaded(ascxSourceCodeEditor))
- O2AscxGUI.openAscx(typeof(ascx_SourceCodeEditor), O2DockState.Document, ascxSourceCodeEditor);
- return ascxSourceCodeEditor;
- }
-
- public static void setSelectedLineNumber(string filename, int lineNumber)
- {
- if (false == String.IsNullOrEmpty(filename))
- {
- var scriptEditor = getScriptEditor(filename);
- O2AscxGUI.invokeOnAscxControl(scriptEditor, "setSelectedLineNumber", new object[] { filename, lineNumber });
- }
- }
-
- public static string getScriptEditorControlName(string fileName)
- {
- return "Script editor: " + fileName;
- }
-
-
- public static void setO2MessageFileEventListener()
- {
- setO2MessageFileEventListener(null);
- }
-
- public static void setO2MessageFileEventListener(string staticViewerControlName)
- {
- KO2MessageQueue.getO2KernelQueue().onMessages +=
- o2Message => o2MessageHelper_Handle_IM_FileOrFolderSelected(o2Message, staticViewerControlName);
- }
-
- public static string tryToResolveFileLocation(string fileToMap, Control hostControl)
- {
- if (autoTryToFixSourceCodeFileReferences && false == File.Exists(fileToMap) && false == Directory.Exists(fileToMap))
- {
- return SourceCodeMappingsUtils.mapFile(fileToMap, hostControl);
- }
- return fileToMap;
- }
- }
-}
View
152 O2_External_WinFormsUI/O2Environment/O2DockContent.cs
@@ -1,152 +0,0 @@
-// This file is part of the OWASP O2 Platform (http://www.owasp.org/index.php/OWASP_O2_Platform) and is released under the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-using System;
-using System.Threading;
-using System.Windows.Forms;
-using O2.DotNetWrappers.DotNet;
-using O2.External.WinFormsUI.Forms;
-using O2.Interfaces.Views;
-using WeifenLuo.WinFormsUI.Docking;
-using O2.Kernel;
-
-namespace O2.External.WinFormsUI.O2Environment
-{
- public class O2DockContent
- {
- public Control control;
- public int desiredHeight;
- public int desiredWidth;
- public GenericDockContent dockContent;
- public DockState dockState;
- public string name;
- public Type type;
- public AutoResetEvent controlLoadedIntoGui = new AutoResetEvent(false);
-
- public O2DockContent(Type typeOfControlToLoad)
- : this(typeOfControlToLoad, DockState.Document)
- {
- }
-
-
- public O2DockContent(Type typeOfControlToLoad, DockState controlDockState)
- : this(typeOfControlToLoad, controlDockState, typeOfControlToLoad.Name)
- {
- }
-
- /*public O2DockContent(Type controlToLoad, DockState controlDockState, string controlName)
- : this((Control) Activator.CreateInstance(controlToLoad), controlDockState, controlName)
- {
- }*/
-
- public O2DockContent(Type typeOfControlToLoad, O2DockState controlDockState, string controlName)
- : this(typeOfControlToLoad, (DockState)Enum.Parse(typeof(DockState), controlDockState.ToString()), controlName)
- {
-
- }
-
- /*public O2DockContent(Control controlToLoad)
- : this(controlToLoad, DockState.Document)
- {
- }
-
-
- public O2DockContent(Control controlToLoad, DockState controlDockState)
- : this(controlToLoad, controlDockState, controlToLoad.Name)
- {
- }*/
-
- /// <summary>
- /// _note this will not create the Control, it expects a type and the control creation should be done by the form host
- /// (this way we avoid the multi thread problems of this control being created on a diferent thread from the main hosting Form
- /// </summary>
- /// <param name="typeOfControlToLoad"></param>
- /// <param name="controlDockState"></param>
- /// <param name="controlName"></param>
- public O2DockContent(Type typeOfControlToLoad, DockState controlDockState, string controlName)
- //public O2DockContent(Control controlToLoad, DockState controlDockState, string controlName)
- {
-
- type = typeOfControlToLoad;
- dockContent = new GenericDockContent {Text = controlName};
- dockState = controlDockState;
- name = controlName;
- }
-
- public bool createControlFromType()
- {
- try
- {
- control = (Control)Activator.CreateInstance(type); // dockContent.Controls[0];
- if (control != null)
- {
- desiredWidth = control.Width;
- desiredHeight = control.Height;
- control.Text = name;
- dockContent.Text = control.Text;
- dockContent.loadControlAsMainControl(control, name);
- return true;
- }
- }
- catch (Exception ex)
- {
- PublicDI.log.ex(ex, "in createControlFromType");
- }
- return false;
-
- }
-
- public static void launchO2DockContentAsStandAloneForm(Type typeOfControlToLoad, string controlName)
- {
-
- if (typeOfControlToLoad == null)
- PublicDI.log.error("in launchO2DockContentAsStandAloneForm typeOfControlToLoad was null");
- else
- try
- {
- var sync = new AutoResetEvent(false);
- O2Thread.staThread(() =>
- {
- try
- {
- O2AscxGUI.o2GuiStandAloneFormMode = true;
- //var controlToLoad = (Control) Activator.CreateInstance(typeOfControlToLoad);
- // if (typeOfControlToLoad != null)
- // {
- var o2DockContent = new O2DockContent(typeOfControlToLoad, DockState.Float, controlName);
- o2DockContent.dockContent.HandleCreated += (sender, e) => sync.Set();
- // as soons as the control HandleCreated is created, we can let this function (launchO2DockContentAsStandAloneForm end)
- if (o2DockContent.createControlFromType())
- {
- o2DockContent.dockContent.Width = o2DockContent.desiredWidth;
- o2DockContent.dockContent.Height = o2DockContent.desiredHeight;
- O2DockUtils.addO2DockContentToDIGlobalVar(o2DockContent);
- o2DockContent.dockContent.Closed += (sender, e) =>
- {
- if (O2AscxGUI.dO2LoadedO2DockContent.Count == 0) // if there are no more controls trigger the end of the GUI session
- O2AscxGUI.guiClosed.Set();
- };
-
- o2DockContent.dockContent.ShowDialog();
- }
- else
- {
- PublicDI.log.error(
- "in launchO2DockContentAsStandAloneForm, could not create instance of controlToLoad: {0}",
- typeOfControlToLoad.ToString());
- }
- }
- catch (Exception ex)
- {
- PublicDI.log.ex(ex, "in launchO2DockContentAsStandAloneForm");
- }
- sync.Set();
- });
- sync.WaitOne();
- }
- catch (Exception ex)
- {
- PublicDI.log.ex(ex);
- }
-
- }
- }
-}
View
316 O2_External_WinFormsUI/O2Environment/O2DockPanel.cs
@@ -1,316 +0,0 @@
-// This file is part of the OWASP O2 Platform (http://www.owasp.org/index.php/OWASP_O2_Platform) and is released under the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using System.Windows.Forms;
-using O2.DotNetWrappers.DotNet;
-using O2.DotNetWrappers.ExtensionMethods;
-using O2.External.WinFormsUI.Forms;
-using O2.Interfaces.Views;
-using O2.Kernel;
-using O2.Views.ASCX.Ascx.MainGUI;
-using O2.Views.ASCX.classes.MainGUI;
-using WeifenLuo.WinFormsUI.Docking;
-using O2.Views.ASCX;
-
-namespace O2.External.WinFormsUI.O2Environment
-{
- public class O2DockPanel
- {
- public static AutoResetEvent guiLoaded = new AutoResetEvent(false);
-
- public O2DockPanel()
- {
- openO2DockContentInNewDockPanel(new List<O2DockContent>());
- }
-
- public O2DockPanel(Type controlToLoad)
- {
- openO2DockContentInNewDockPanel(controlToLoad);
- }
-
- public O2DockPanel(O2DockContent controlToLoad)
- {
- openO2DockContentInNewDockPanel(controlToLoad);
- }
-
- public O2DockPanel(List<O2DockContent> controlsToLoad)
- {
- openO2DockContentInNewDockPanel(controlsToLoad);
- }
-
- public string formName { get; set; }
- public int formWidth { get; set; }
- public int formHeight { get; set; }
- public List<O2DockContent> o2DockContentObjects { get; set; }
-
- /*public O2DockPanel(List<Type> controlsToLoad)
- {
- }*/
-
-
- public void openO2DockContentInNewDockPanel(string controlToLoad)
- {
- Type typeToLoad = Type.GetType(controlToLoad);
- if (typeToLoad == null)
- PublicDI.log.error("in openO2DockContentInNewDockPanel, could not resolve type: {0}", controlToLoad);
- else
- openO2DockContentInNewDockPanel(typeToLoad);
- }
-
- public void openO2DockContentInNewDockPanel(Type controlToLoad)
- {
- openO2DockContentInNewDockPanel(new O2DockContent(controlToLoad));
- }
-
- public void openO2DockContentInNewDockPanel(O2DockContent o2DockContent)
- {
- openO2DockContentInNewDockPanel(new List<O2DockContent> {o2DockContent});
- }
-
- public void openO2DockContentInNewDockPanel(List<O2DockContent> controlsToLoad)
- {
- if (O2AscxGUI.autoAddLogViewerToGui)
- addLogViewerToControlsToLoad(controlsToLoad);
-
-
- //O2Thread.staThread(() =>
- // {
- //var mainO2Form = new O2GuiWithDockPanel();
- addControlsToFormAndStartIt(controlsToLoad);
- // O2AscxGUI.guiClosed.WaitOne();
- // });
-
-
- }
-
- private O2GuiWithDockPanel getO2GuiWithDockPanel()
- {
- if (O2AscxGUI.o2GuiWithDockPanel == null)
- {
- O2AscxGUI.o2GuiWithDockPanel = new O2GuiWithDockPanel();
- O2AscxGUI.o2GuiWithDockPanel.Text =
- ClickOnceDeployment.getFormTitle_forClickOnce(formName ?? O2AscxGUI.o2GuiWithDockPanel.Text);
- O2AscxGUI.o2GuiWithDockPanel.Width = (formWidth > 0) ? formWidth : O2AscxGUI.o2GuiWithDockPanel.Width;
- O2AscxGUI.o2GuiWithDockPanel.Height = (formHeight > 0) ? formHeight : O2AscxGUI.o2GuiWithDockPanel.Height;
- }
- return O2AscxGUI.o2GuiWithDockPanel;
- }
-
- private void addControlToO2GuiWithDockPanelSync(O2DockContent controlToAdd)
- {
- var controlAdded = new AutoResetEvent(false);
- var o2GuiWithDockPanel = getO2GuiWithDockPanel();
- //if (O2AscxGUI.o2GuiWithDockPanel.Handle != null)
- if (O2AscxGUI.o2GuiWithDockPanel.InvokeRequired)
- O2AscxGUI.o2GuiWithDockPanel.Invoke(new EventHandler(delegate { addControlToO2GuiWithDockPanelSync(o2GuiWithDockPanel,controlToAdd, controlAdded); }));
- else
- addControlToO2GuiWithDockPanelSync(o2GuiWithDockPanel,controlToAdd, controlAdded);
-
- controlAdded.WaitOne();
- }
-
- private static void addControlToO2GuiWithDockPanelSync(O2GuiWithDockPanel o2GuiWithDockPanel, O2DockContent controlToAdd, EventWaitHandle controlAdded)
- {
- //if (controlToAdd.dockContent != null && controlToAdd.dockContent.okThread(
- // delegate { addControlToO2GuiWithDockPanelSync(controlToAdd, controlAdded); }))
- //{
-
- //var sync = new AutoResetEvent(false);
-
- // add the control on the o2GuiThread
- //O2AscxGUI.o2GuiWithDockPanel.Invoke(new EventHandler(delegate {
- try
- {
- if (controlToAdd.createControlFromType())
- {
- controlToAdd.dockContent.Show(o2GuiWithDockPanel.getDockPanel(), controlToAdd.dockState);
-
- if (controlToAdd.dockState == DockState.Float && controlToAdd.dockContent.TopLevelControl != null)
- {
- controlToAdd.dockContent.TopLevelControl.Width = controlToAdd.desiredWidth;
- controlToAdd.dockContent.TopLevelControl.Height = controlToAdd.desiredHeight;
- }
- if (controlToAdd.dockState == DockState.Document)
- {
- if (O2AscxGUI.o2GuiWithDockPanel.Width < controlToAdd.desiredWidth)
- O2AscxGUI.o2GuiWithDockPanel.Width = controlToAdd.desiredWidth + 10;
- if (O2AscxGUI.o2GuiWithDockPanel.Height < controlToAdd.desiredHeight + 100)
- O2AscxGUI.o2GuiWithDockPanel.Height = controlToAdd.desiredHeight + 100;
- }
- O2DockUtils.addO2DockContentToDIGlobalVar(controlToAdd);
- }
- }
- catch(Exception ex)
- {
- PublicDI.log.ex(ex, "in addControlToO2GuiWithDockPanelSync");
- }
-
- controlAdded.Set();
- // }));
- //}
- //controlAdded.WaitOne();
- }
-
- private void addControlsToFormAndStartIt(IEnumerable<O2DockContent> controlsToAdd)
- {
-// if (mainO2Form.getDockPanel().okThread(delegate { addControlsToFormAndStartIt(mainO2Form, controlsToLoad); }))
- {
- // check if the O2AscxGUI.o2GuiWithDockPanel exists, and if it doesn't create it (we need to do do this here because of multi=thread conflics
- // that occour sometimes if the O2AscxGUI.o2GuiWithDockPanel is created on a separate thread
-
- foreach (O2DockContent controlToAdd in controlsToAdd)
- addControlToO2GuiWithDockPanelSync(controlToAdd);
-
- try
- {
-
- //ClickOnceDeployment.startThreadFor_checkForClickOnceUpdatesAndInstall(); // removed
-
- guiLoaded.Set();
- Application.Run(O2AscxGUI.o2GuiWithDockPanel);
- }
- catch (Exception ex)
- {
- //PublicDI.log.reportCriticalErrorToO2Developers(this, ex, "Inside Application.Run(mainO2Form);");
- PublicDI.log.error("Inside Application.Run(mainO2Form);: " + ex.Message);
- }
- }
- }
-
-
- private static void addLogViewerToControlsToLoad(ICollection<O2DockContent> controlsToLoad)
- {
- // first make sure the ascx_LogViewer is not already in the list of controls to add
- foreach(var controlToLoad in controlsToLoad)
- if (controlToLoad.type == typeof(ascx_LogViewer))
- return;
-
- var logViewer = new O2DockContent(typeof(ascx_LogViewer), DockState.DockBottomAutoHide, PublicDI.LogViewerControlName);
- controlsToLoad.Add(logViewer);
- }
-
- public void openO2DockContentInNewDockPanel()
- {
- openO2DockContentInNewDockPanel(o2DockContentObjects);
- }
-
- public static Control loadControl(Type ascxControlToLoad, DockState dockState, String name)
- {
- return addAscxControlToO2GuiWithDockPanelWithDockState(ascxControlToLoad, dockState, name).control;
- }
-
- public static Control loadControl(Type ascxControlToLoad, O2DockState dockState, String name)
- {
- var o2DockContent = addAscxControlToO2GuiWithDockPanelWithDockState(
- ascxControlToLoad, O2DockUtils.getDockStateFromO2DockState(dockState), name);
- if (o2DockContent != null)
- return o2DockContent.control;
-
- return null;
- }
-
- public static Control loadControl(Type ascxControlToLoad, bool showAsFloat, String name)
- {
- return addAscxControlToO2GuiWithDockPanel(ascxControlToLoad, showAsFloat, name).control;
- }
-
- public static O2DockContent addAscxControlToO2GuiWithDockPanel(Type ascxControlToLoad, bool showAsFloat, String name)
- {
- return addAscxControlToO