示例#1
0
        /// <summary>
        /// Shut down system, stop all services and components running
        /// </summary>
        private void ShutDownSystem()
        {
            try
            {
                //shutdown any process running
                RunTradeHubComponent.ShutdownProcess();

                //shut down all the services running
                CloseAllServices();
            }
            catch (Exception exception)
            {
                Logger.Error(exception, _type.FullName, "ShutDownSystem");
            }
        }
示例#2
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;
            }
        }