Пример #1
0
        /// <summary>
        /// Open Clerk
        /// </summary>
        public void OpenClerk()
        {
            LaunchComponent component = new LaunchComponent()
            {
                Command = "Run", Component = TradeHubComponent.Clerk
            };

            EventSystem.Publish <LaunchComponent>(component);
            Logger.Info("Event Published to run Clerk", _type.FullName, "OpenClerk");
        }
Пример #2
0
        /// <summary>
        /// Run the Strategy Runner
        /// </summary>
        public void OpenStrategyRunner()
        {
            LaunchComponent component = new LaunchComponent()
            {
                Command = "Run", Component = TradeHubComponent.StrategyRunner
            };

            EventSystem.Publish <LaunchComponent>(component);
            Logger.Info("Event Published to run StrategyRunner", _type.FullName, "OpenStrategyRunner");
        }
Пример #3
0
        /// <summary>
        /// Event Listener for launching the components
        /// </summary>
        /// <param name="component"></param>
        private void LaunchTradeHubComponent(LaunchComponent component)
        {
            Logger.Info("Recieved event to launch component:" + component.Component, _type.FullName,
                        "LaunchTradeHubComponent");
            string path = "";

            switch (component.Component)
            {
            case TradeHubComponent.StrategyRunner:
                path = @"..\Strategy Runner\TradeHub.StrategyRunner.UserInterface.exe";
                RunTradeHubComponent.RunComponent(path);
                break;

            case TradeHubComponent.Clerk:
                path = @"..\Clerk\ClerkUI.exe";
                RunTradeHubComponent.RunComponent(path);
                break;
            }
        }