public static void executeInAppDomain(string appDomainName, string scriptToExecute)
        {
            O2Thread.mtaThread(
                () => {
                var o2AppDomain = new O2AppDomainFactory(appDomainName);
                try
                {
                    o2AppDomain.load("O2_XRules_Database");
                    o2AppDomain.load("O2_Kernel");
                    o2AppDomain.load("O2_DotNetWrappers");

                    var o2Proxy = (O2Proxy)o2AppDomain.getProxyObject("O2Proxy");

                    o2Proxy.InvokeInStaThread = true;
                    o2Proxy.staticInvocation("O2_External_SharpDevelop", "FastCompiler_ExtensionMethods", "executeSourceCode", new object[] { scriptToExecute });
                }
                catch (Exception ex)
                {
                    ex.log("inside new AppDomain");
                }

                DebugMsg.showMessageBox("Click OK to close the '{0}' AppDomain (and close all open windows)".format(appDomainName));
                o2AppDomain.unLoadAppDomain();
            });
        }
 public static string sayHellotoMe(string myName, bool showInMessageBox)
 {
     string message = string.Format("Hello {0}", myName);
     log.info(message);
     if (showInMessageBox)
         DebugMsg.showMessageBox(message);
     return message;
 }
        public static void sayHelloO2World()
        {
            var response = "Hello there, do you want me to say hello to you?".askUserQuestion();

            if (response)
            {
                DebugMsg.showMessageBox("Thanks and Hello from the OWASP O2 Platform :)");
            }
        }
 public DialogResult showMessageBox(string message, string messageBoxTitle, MessageBoxButtons messageBoxButtons)
 {
     return(DebugMsg.showMessageBox(message, messageBoxTitle, messageBoxButtons));
 }
 public void         showMessageBox(string message)
 {
     DebugMsg.showMessageBox(message);
 }