/// <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"); }
/// <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"); }
/// <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; } }