Example #1
0
        public CKernelTerminal()
        {
            CUtil.ThreadStart(ThreadWatchDog);

            //2018-03-28 moved up as it was after ViewDispatcher create line
            _evntGUIDispatcher = new CEvntDispTerminal(this);

            if (!IsUniqueProcess())
            {
                return;
            }

            CheckPreRunCondProcessed();

            ReadGlobalConfig();

            ReadTerminalConfig();

            ReadVisualStockConfig();
            SetMinThreads();

            Communicator        = new CCommunicator(this);
            ViewModelDispatcher = new CViewModelDispatcher(this);
            ViewDispatcher      = new CViewDispatcher(this);

            _passwordSaver = new CPasswordSaver(this);


            LoadColorList();

            //Bind connection trial and auth success events
            //for manual (GUI) and aftomatic(passwordsave) auth requesters.
            ConnectionTrial += Communicator.OnUserTryConnectToServer;
            ConnectionTrial += _passwordSaver.OnConnectionTrial;

            AuthSuccess += _passwordSaver.OnConnectedSuccess;
            AuthSuccess += SubscribeTickersFromConfig;
            AuthSuccess += SendTeminalInfoForDealingServer;
        }
Example #2
0
 public CCommuTradeManager(IClientCommuTradeManager client)
     : base(client)
 {
     _client        = client;
     _passwordSaver = new CPasswordSaver(this);
 }