예제 #1
0
        private void Application_ContinueStartupAfterExtraction()
        {
            if (options.LRBackendOverride != null)
            {
                bundledBackendDir = options.LRBackendOverride;
                logWriter.WriteLine("LRBackendOverride = \"" + options.LRBackendOverride + "\"");
            }
            if (options.LRBundledPluginsOverride != null)
            {
                Environment.SetEnvironmentVariable("LRBundledPluginsOverride", options.LRBundledPluginsOverride);
                logWriter.WriteLine("LRBundledPluginsOverride = \"" + options.LRBundledPluginsOverride + "\"");
            }
            else
            {
                Environment.SetEnvironmentVariable("LRBundledPluginsOverride", bundledPluginsDir);
            }

            window.gridProgress.Visibility = Visibility.Hidden;

            nodeFoo = new NodeRPC(bundledNodeDir, bundledBackendDir, logWriter);
            nodeFoo.NodeMessageEvent += HandleNodeMessageEvent;
            nodeFoo.NodeStartedEvent += HandleNodeStartedEvent;
            nodeFoo.NodeCrash        += HandleNodeCrash;
            nodeFoo.Start();

            rpcRoot = new ObjectRPC.RootEntity();
            ObjectRPC.WPF.UIFacets.Register(rpcRoot);
            rpcRoot.OutgoingUpdate += (payload => nodeFoo.Send("rpc", payload));

            rpcRoot.Expose("app", this);
            rpcRoot.Expose("mainwnd", window);
        }
예제 #2
0
        private void Application_ContinueStartupAfterExtraction()
        {
            if (options.LRBackendOverride != null)
            {
                bundledBackendDir = options.LRBackendOverride;
                logWriter.WriteLine("LRBackendOverride = \"" + options.LRBackendOverride + "\"");
            }
            if (options.LRBundledPluginsOverride != null) {
                Environment.SetEnvironmentVariable("LRBundledPluginsOverride", options.LRBundledPluginsOverride);
                logWriter.WriteLine("LRBundledPluginsOverride = \"" + options.LRBundledPluginsOverride + "\"");
            } else {
                Environment.SetEnvironmentVariable("LRBundledPluginsOverride", bundledPluginsDir);
            }

            window.gridProgress.Visibility = Visibility.Hidden;

            nodeFoo = new NodeRPC(bundledNodeDir, bundledBackendDir, logWriter);
            nodeFoo.NodeMessageEvent += HandleNodeMessageEvent;
            nodeFoo.NodeStartedEvent += HandleNodeStartedEvent;
            nodeFoo.NodeCrash += HandleNodeCrash;
            nodeFoo.Start();

            rpcRoot = new ObjectRPC.RootEntity();
            ObjectRPC.WPF.UIFacets.Register(rpcRoot);
            rpcRoot.OutgoingUpdate += (payload => nodeFoo.Send("rpc", payload));

            rpcRoot.Expose("app", this);
            rpcRoot.Expose("mainwnd", window);
        }
예제 #3
0
 public void SendCommand(string command, object arg)
 {
     nodeFoo.Send(command, arg);
 }