コード例 #1
0
ファイル: O2Messages.cs プロジェクト: pusp/o2platform
 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)
         DI.log.error("in openControlInGUI, could not find control: {0}", controlTypeAndAssembly);
     else
         openControlInGUI(proxyObjectType, o2DockState, controlName);
 }
コード例 #2
0
        public static KM_GUIAction openControlInGui(Type _controlType, O2DockState _o2DockState, string _controlName)
        {
            var kmGuiAction = new KM_GUIAction();

            kmGuiAction.controlName = _controlName;
            kmGuiAction.o2DockState = _o2DockState;
            kmGuiAction.controlType = _controlType;
            kmGuiAction.messageText = "KM_OpenControlInGUI";
            kmGuiAction.messageGUID = new Guid();
            kmGuiAction.GuiAction   = IM_GUIActions.openControlInGui;
            return(kmGuiAction);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: O2DockUtils.cs プロジェクト: pusp/o2platform
 public static void setDockContentState(string controlToConfigure, O2DockState o2DockState)
 {
     if (false == string.IsNullOrEmpty(controlToConfigure))
     {
         var o2DockContent = getO2DockContent(controlToConfigure);
         if (o2DockContent != null)
             o2DockContent.dockContent.okThread(delegate
                                                    {
                                                        o2DockContent.dockContent.DockState =
                                                            getDockStateFromO2DockState(o2DockState);
                                                    });
     }
 }
コード例 #5
0
ファイル: KM_GUIAction.cs プロジェクト: pusp/o2platform
 public static KM_GUIAction openControlInGui(Type _controlType, O2DockState _o2DockState, string _controlName)
 {
     var kmGuiAction = new KM_GUIAction
                           {
                               GuiAction = IM_GUIActions.openControlInGui,
                               messageGUID = new Guid(),
                               messageText = "KM_OpenControlInGUI",
                               controlType = _controlType,
                               o2DockState = _o2DockState,
                               controlName = _controlName
                           };
     return kmGuiAction;
 }
コード例 #6
0
        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);
            }
        }
コード例 #7
0
        public static KM_GUIAction openControlInGui(Type _controlType, O2DockState _o2DockState, string _controlName)
        {
            var kmGuiAction = new KM_GUIAction
            {
                GuiAction   = IM_GUIActions.openControlInGui,
                messageGUID = new Guid(),
                messageText = "KM_OpenControlInGUI",
                controlType = _controlType,
                o2DockState = _o2DockState,
                controlName = _controlName
            };

            return(kmGuiAction);
        }
コード例 #8
0
        /// <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);
        }
コード例 #9
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)
            {
                DI.log.error("in openControlInGUI, could not find control: {0}", controlTypeAndAssembly);
            }
            else
            {
                openControlInGUI(proxyObjectType, o2DockState, controlName);
            }
        }
コード例 #10
0
 public static void setDockContentState(string controlToConfigure, O2DockState o2DockState)
 {
     if (false == string.IsNullOrEmpty(controlToConfigure))
     {
         var o2DockContent = getO2DockContent(controlToConfigure);
         if (o2DockContent != null)
         {
             o2DockContent.dockContent.okThread(delegate
             {
                 o2DockContent.dockContent.DockState =
                     getDockStateFromO2DockState(o2DockState);
             });
         }
     }
 }
コード例 #11
0
        internal static KM_GUIAction setAscxDockStateAndOpenIfNotAvailable(string typeOfControl, O2DockState _o2DockState, string _controlName)
        {
            var kmGuiAction = new KM_GUIAction();

            kmGuiAction.controlName       = _controlName;
            kmGuiAction.o2DockState       = _o2DockState;
            kmGuiAction.controlTypeString = typeOfControl;
            kmGuiAction.GuiAction         = IM_GUIActions.setAscxDockStateAndOpenIfNotAvailable;
            return(kmGuiAction);
        }
コード例 #12
0
ファイル: KM_GUIAction.cs プロジェクト: pusp/o2platform
 public static KM_GUIAction openControlInGui(Type _controlType, O2DockState _o2DockState)
 {
     return openControlInGui(_controlType, _o2DockState, _controlType.Name);
 }
コード例 #13
0
 public static void setLogViewerDockState(O2DockState o2DockState)
 {
     O2DockUtils.setDockContentState(PublicDI.LogViewerControlName, o2DockState);
 }
コード例 #14
0
 public static Control openControlInGUISync(Type controlType, O2DockState o2DockState, string controlName)
 {
     DI.o2MessageQueue.sendMessageSync(KM_GUIAction.openControlInGui(controlType, o2DockState, controlName));
     return(getAscxSync(controlName));
 }
コード例 #15
0
 public static object setAscxDockStateAndOpenIfNotAvailable(string typeOfControl, O2DockState o2DockState, string controlName)
 {
     return(DI.o2MessageQueue.sendMessage(KM_GUIAction.setAscxDockStateAndOpenIfNotAvailable(typeOfControl, o2DockState, controlName)));
 }
コード例 #16
0
 public static bool setDockState(string name, O2DockState state)
 {
     return(setDockState(name, getDockStateFromO2DockState(state)));
 }
コード例 #17
0
 public static void setLogViewerDockState(O2DockState o2DockState)
 {
     O2DockUtils.setDockContentState(PublicDI.LogViewerControlName, o2DockState);
 }
コード例 #18
0
ファイル: O2DockUtils.cs プロジェクト: SergeTruth/OxyChart
 public static DockState getDockStateFromO2DockState(O2DockState o2DockState)
 {
     return (DockState) Enum.Parse(typeof (DockState), o2DockState.ToString());
 }
コード例 #19
0
ファイル: O2DockUtils.cs プロジェクト: SergeTruth/OxyChart
 public static bool setDockState(string name, O2DockState state)
 {
     return setDockState(name, getDockStateFromO2DockState(state));
 }
コード例 #20
0
 public static void addControlToMenu(Type ascxControlToLoad, O2DockState dockState, String guiWindowName)
 {
     O2DockPanel.addAscxControlToO2GuiWithDockPanelWithDockState(ascxControlToLoad, O2DockUtils.getDockStateFromO2DockState(dockState), guiWindowName,false);
 }
コード例 #21
0
 public static void openAscxASync(Type ascxControlToLoad, O2DockState dockState, String guiWindowName)
 {
     O2Thread.staThread(() => O2DockPanel.loadControl(ascxControlToLoad, dockState, guiWindowName));
 }
コード例 #22
0
 public static void openAscxASync(string ascxControlToLoad, O2DockState dockState, String guiWindowName)
 {
     var type = DI.reflection.getType(ascxControlToLoad);
     if (type == null)
         DI.log.error("in O2AscxGui.openAscx, could not resolve type called: {0}", ascxControlToLoad);
     else
         openAscxASync(type, dockState, guiWindowName);
 }
コード例 #23
0
        /// <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;
        }
コード例 #24
0
ファイル: O2DockContent.cs プロジェクト: SergeTruth/OxyChart
 /*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)
 {
 }
コード例 #25
0
 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;            
 }
コード例 #26
0
ファイル: O2WcfClient.cs プロジェクト: pusp/o2platform
            //                clientProxy.
            //

            //                        o2WcfProxy.O2Messages("openAscxAsForm", new object[] { typeof(ascx_CirAnalysis).FullName, ascxControlName });

            //            o2WcfProxy.O2Messages("executeOnAscxSync", new object[] {ascxControlName, "loadO2CirDataFile" , new [] { DI.config.ExecutingAssembly }});

            //            }

            public void openAscx(Type controlType, O2DockState o2DockState, string ascxControlName)
            {
                o2WcfClient.invoke("O2AscxGUI", "openAscx",
                                   new object[] { controlType.FullName, o2DockState, ascxControlName });
            }
コード例 #27
0
 public static DockState getDockStateFromO2DockState(O2DockState o2DockState)
 {
     return((DockState)Enum.Parse(typeof(DockState), o2DockState.ToString()));
 }
コード例 #28
0
ファイル: O2Messages.cs プロジェクト: SergeTruth/OxyChart
 public static Control openControlInGUISync(Type controlType, O2DockState o2DockState, string controlName)
 {
     KO2MessageQueue.o2MessageQueue.sendMessageSync(KM_GUIAction.openControlInGui(controlType, o2DockState, controlName));
     return getAscxSync(controlName);
 }
コード例 #29
0
        /*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)
        {
        }
コード例 #30
0
ファイル: KM_GUIAction.cs プロジェクト: njmube/FluentSharp
 public static KM_GUIAction openControlInGui(Type _controlType, O2DockState _o2DockState, string _controlName)
 {
     var kmGuiAction = new KM_GUIAction();
     kmGuiAction.controlName = _controlName;
     kmGuiAction.o2DockState = _o2DockState;
     kmGuiAction.controlType = _controlType;
     kmGuiAction.messageText = "KM_OpenControlInGUI";
     kmGuiAction.messageGUID = new Guid();
     kmGuiAction.GuiAction = IM_GUIActions.openControlInGui;
     return kmGuiAction;
 }
コード例 #31
0
 public static void openControlInGUI(Type controlType, O2DockState o2DockState, string controlName)
 {
     DI.o2MessageQueue.sendMessage(KM_GUIAction.openControlInGui(controlType, o2DockState, controlName));
 }
コード例 #32
0
 public static void addControlToMenu(Type ascxControlToLoad, O2DockState dockState, String guiWindowName)
 {
     O2DockPanel.addAscxControlToO2GuiWithDockPanelWithDockState(ascxControlToLoad, O2DockUtils.getDockStateFromO2DockState(dockState), guiWindowName, false);
 }
コード例 #33
0
 public static KM_GUIAction openControlInGui(Type _controlType, O2DockState _o2DockState)
 {
     return(openControlInGui(_controlType, _o2DockState, _controlType.Name));
 }
コード例 #34
0
ファイル: KM_GUIAction.cs プロジェクト: pusp/o2platform
 internal static KM_GUIAction setAscxDockStateAndOpenIfNotAvailable(string typeOfControl, O2DockState _o2DockState, string _controlName)
 {
     var kmGuiAction = new KM_GUIAction
                           {
                               GuiAction = IM_GUIActions.setAscxDockStateAndOpenIfNotAvailable,
                               controlTypeString = typeOfControl,
                               o2DockState = _o2DockState,
                               controlName = _controlName
     };
     return kmGuiAction;  
 }
コード例 #35
0
ファイル: O2Messages.cs プロジェクト: SergeTruth/OxyChart
 public static void openControlInGUI(Type controlType, O2DockState o2DockState, string controlName)
 {
     KO2MessageQueue.o2MessageQueue.sendMessage(KM_GUIAction.openControlInGui(controlType, o2DockState, controlName));
 }
コード例 #36
0
 public static void openAscxASync(Type ascxControlToLoad, O2DockState dockState, String guiWindowName)
 {
     O2Thread.staThread(() => O2DockPanel.loadControl(ascxControlToLoad, dockState, guiWindowName));
 }
コード例 #37
0
ファイル: O2Messages.cs プロジェクト: SergeTruth/OxyChart
 public static object setAscxDockStateAndOpenIfNotAvailable(string typeOfControl, O2DockState o2DockState, string controlName)
 {
     return KO2MessageQueue.o2MessageQueue.sendMessage(KM_GUIAction.setAscxDockStateAndOpenIfNotAvailable(typeOfControl, o2DockState, controlName));
 }
コード例 #38
0
            //                clientProxy.
            //

            //                        o2WcfProxy.O2Messages("openAscxAsForm", new object[] { typeof(ascx_CirAnalysis).FullName, ascxControlName });

            //            o2WcfProxy.O2Messages("executeOnAscxSync", new object[] {ascxControlName, "loadO2CirDataFile" , new [] { DI.config.ExecutingAssembly }});

            //            }

            public void openAscx(Type controlType, O2DockState o2DockState, string ascxControlName)
            {
                o2WcfClient.invoke("O2AscxGUI", "openAscx",
                                   new object[] { controlType.FullName, o2DockState, ascxControlName });
            }