Example #1
0
        public static bool closeAscxGui()
        {
            var o2AppDomainFactory = AppDomainUtils.getO2AppDomainFactoryForCurrentO2Kernel();
            var result             = o2AppDomainFactory.invoke("O2AscxGUI O2_External_WinFormsUI", "close", null);

            if (result is bool)
            {
                return((bool)result);
            }
            return(false);
        }
Example #2
0
        public static bool openAscxGui()
        {
            var o2AppDomainFactory = AppDomainUtils.getO2AppDomainFactoryForCurrentO2Kernel();
            var result             = o2AppDomainFactory.invoke("O2AscxGUI O2_External_WinFormsUI", "launch", null);

            if (result is bool)
            {
                return((bool)result);
            }
            return(false);
            //o2WcfProxy = O2WcfUtils.createClientProxy(newO2KernelProcessName);
            //o2WcfProxy.invokeOnAppDomainObject(newAppDomain, "O2AscxGUI O2_External_WinFormsUI","launch",null)
        }
Example #3
0
        public static void openControlInGUI(string controlTypeAndAssembly, O2DockState o2DockState, string controlName)
        {
            // lets try to find this control in the current AppDomain
            var  o2AppDomainFactory = AppDomainUtils.getO2AppDomainFactoryForCurrentO2Kernel();
            Type proxyObjectType    = o2AppDomainFactory.getProxyType(controlTypeAndAssembly);

            if (proxyObjectType == null)
            {
                PublicDI.log.error("in openControlInGUI, could not find control: {0}", controlTypeAndAssembly);
            }
            else
            {
                openControlInGUI(proxyObjectType, o2DockState, controlName);
            }
        }
Example #4
0
 public static bool isGuiLoaded()
 {
     try
     {
         if (PublicDI.reflection.getType("O2AscxGUI") == null) // first see if the assembly O2_External_WinFormsUI is loaded
         {
             return(false);
         }
         var o2AppDomainFactory = AppDomainUtils.getO2AppDomainFactoryForCurrentO2Kernel();
         return((bool)o2AppDomainFactory.invoke("O2AscxGUI O2_External_WinFormsUI", "isGuiLoaded"));
     }
     catch (Exception)
     {
         return(false);
     }
 }
Example #5
0
        public static bool isDebuggerAvailable()
        {
            // need to find a different way to do this

            try
            {
                if (PublicDI.reflection.getType("O2MDbgUtils") == null) // first see if the assembly O2_External_WinFormsUI is loaded
                {
                    return(false);
                }
                var o2AppDomainFactory = AppDomainUtils.getO2AppDomainFactoryForCurrentO2Kernel();
                return((bool)o2AppDomainFactory.invoke("O2MDbgUtils O2_Debugger_Mdbg", "IsDebuggerAvailable"));
            }
            catch (Exception)
            {
                return(false);
            }
        }
Example #6
0
        public static void waitForAscxGuiEnd()
        {
            var o2AppDomainFactory = AppDomainUtils.getO2AppDomainFactoryForCurrentO2Kernel();

            o2AppDomainFactory.invoke("O2AscxGUI O2_External_WinFormsUI", "waitForAscxGuiClose", null);
        }
Example #7
0
        public static void openAscxAsForm(object ascxControlToLoad, string controlName)
        {
            var o2AppDomainFactory = AppDomainUtils.getO2AppDomainFactoryForCurrentO2Kernel();

            o2AppDomainFactory.invoke("O2AscxGUI O2_External_WinFormsUI", "openAscxAsForm", new [] { ascxControlToLoad, controlName });
        }