Ejemplo n.º 1
0
 public void closeGui()
 {
     //O2AscxGUI.waitForAscxGuiClose();
     //wcfClient.o2GuiAscx.waitForAscxGuiClose();
     wcfClient.o2GuiAscx.close();
     wcfClient.close();
     wcfServer.close();
 }
Ejemplo n.º 2
0
        public void loadCSharpScriptsGuiOnSeparateAppDomainUsingWCF_UsingO2WcfObject()
        {
            var wcfHostName = "loadCSharpScriptsGui";
            var wcfServer   = new O2WcfServer(wcfHostName);
            var wcfClient   = new O2WcfClient(wcfHostName);

            Assert.That(wcfServer.AllOK, "wcfServer was not OK");
            Assert.That(wcfClient.AllOK, "wcfClient was not OK");

            WCFCecilAssemblyDependencies.createAppDomainViaWcfClient(wcfClient, typeof(StartCSharpScriptGui));
            DI.log.info("**UnitTest: using main (with all controls currently loaded via it ");
            //if (false)
            {
                wcfClient.invoke(typeof(StartCSharpScriptGui), "Main", new object[0]);
                Processes.Sleep(2000);
                wcfClient.o2GuiAscx.close();
                wcfClient.o2GuiAscx.waitForAscxGuiClose();
            }
            DI.log.info("**UnitTest: just the gui with one ascx_Scripts module");
            //if (false)
            {
                wcfClient.o2GuiAscx.launch();
                wcfClient.o2GuiAscx.openAscx(typeof(ascx_Scripts), O2DockState.Document, "ascx_Scripts");
                wcfClient.o2GuiAscx.close();
                wcfClient.o2GuiAscx.waitForAscxGuiClose();
            }

            DI.log.info("**UnitTest: just the ascx_Scripts as a stand alone form");
            //if (false)
            {
                wcfClient.o2GuiAscx.openAscxAsForm(typeof(ascx_Scripts), "ascx_Scripts");
                Processes.Sleep(2000);
                wcfClient.o2GuiAscx.closeAscxParent("ascx_Scripts");
                wcfClient.o2GuiAscx.waitForAscxGuiClose();
            }
            //O2AscxGUI.closeAscxParent("ascx_Scripts");

            wcfClient.close();
            wcfServer.close();
        }