Example #1
0
        protected override void OnGUIBoxPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            CGUIBox GUIBox = (CGUIBox)sender;


            if (e.PropertyName == "IsFORTSOnline")
            {
                FORTSBGColor = GenColorOKOrAlarm(GUIBox.IsFORTSOnline);
            }
            else if (e.PropertyName == "IsSessionActive")
            {
                string status = "";
                if (GUIBox.IsSessionActive == true)
                {
                    status = "Актив";
                }
                else
                {
                    status = "Неактив";
                }
                //TO DO normal
                GUIDispatcher.BeginInvoke(new Action(() => m_mainWindow.SessionTable.SessionStatusText.TextValue = status));
            }
            //   GUIDispatcher.Invoke(new Action(() => m_mainWindow.SessionTable.SessionStatusText.TextBlockLabel.Text = "Act"));
        }
        public CGUICandleBox(CGUIBox GUIBox)
        {
            m_GUIBox          = GUIBox;
            m_plaza2Connector = (IClientGUICandleBox)m_GUIBox.Plaza2Connector;

            LastDataAccepted = new Dictionary <string, Dictionary <string, bool> >();;

            CreateDataStruct();
        }
Example #3
0
        protected override void OnGUIBoxPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            CGUIBox GUIBox = (CGUIBox)sender;

            if (e.PropertyName == "IsServerTimeAvailable")
            {
                ServerTimeBGColor = GenColorOKOrAlarm(GUIBox.IsServerTimeAvailable);
            }
            if (e.PropertyName == "IsOnlineUserOrderLog")
            {
                this.UserOrderLogBGColor = GenColorOKOrAlarm(GUIBox.IsOnlineUserOrderLog);
            }
            if (e.PropertyName == "IsOnlineUserDeals")
            {
                this.UserDealsBGColor = GenColorOKOrAlarm(GUIBox.IsOnlineUserDeals);
            }
            if (e.PropertyName == "IsDealsOnline")
            {
                this.DealsBGColor = GenColorOKOrAlarm(GUIBox.IsDealsOnline);
            }
            if (e.PropertyName == "IsSessionOnline")

            {
                this.SessionBGColor = GenColorOKOrAlarm(GUIBox.IsSessionOnline);
            }
            if (e.PropertyName == "IsPositionOnline")
            {
                this.PositionBGColor = GenColorOKOrAlarm(GUIBox.IsPositionOnline);
            }
            if (e.PropertyName == "IsStockOnline")
            {
                this.StockBGColor = GenColorOKOrAlarm(GUIBox.IsStockOnline);
            }
            if (e.PropertyName == "IsOnlineVM")
            {
                this.VMBGColor = GenColorOKOrAlarm(GUIBox.IsOnlineVM);
            }
            if (e.PropertyName == "IsOrderControlAvailable")
            {
                this.OrderControlBGColor = GenColorOKOrAlarm(GUIBox.IsOrderControlAvailable);
            }
        }
        public CGUICandleCollection(/*CPlaza2Connector*/ IClientGUICandleBox plaza2Connector, string isin)
        {
            m_GUIBox          = plaza2Connector.GUIBox;
            m_plaza2Connector = plaza2Connector;
            Isin = isin;

            m_loggerTMP = new CLogger("Condlecollect_" + isin);


            /*  Add(new GUICandleObject { Date = new DateTime(2008, 8, 4), Open = 25, High = 26, Low = 24, Close = 25, Volume = 3002342 });
             * Add(new GUICandleObject { Date = new DateTime(2008, 8, 5), Open = 30, High = 31, Low = 28, Close = 29, Volume = 2000342 });
             *
             *
             * Add(new GUICandleObject { Date = new DateTime(2008, 8, 6), Open = 26, High = 28, Low = 25, Close = 27, Volume = 2000342 });
             * Add(new GUICandleObject { Date = new DateTime(2008, 8, 7), Open = 26, High = 27, Low = 23, Close = 25, Volume = 2003342 });
             * Add(new GUICandleObject { Date = new DateTime(2008, 8, 8), Open = 26, High = 26, Low = 24, Close = 26, Volume = 1000323 });
             * Add(new GUICandleObject { Date = new DateTime(2008, 8, 9), Open = 25, High = 25, Low = 24, Close = 24, Volume = 2040389 });
             *
             * Add(new GUICandleObject { Date = new DateTime(2008, 8, 10), Open = 23, High = 23, Low = 20, Close = 20, Volume = 2030341 });
             * */
            // CandleCollectionUpdate += new CandleCollecionUpdateDelegate(Dummy);
        }
        public CPosistionsBoxASTS(IClientPositionsBoxASTS client)
            : base(client)
        {
            _client      = client;
            _instruments = client.Instruments;
            _alarmer     = client;
            _guiBox      = client.GUIBox;

            //TODO to base class
            DictPos = new Dictionary <string, CRawPosition>();
            foreach (var kvp in _instruments)
            {
                DictPos[kvp.instrument] = new CRawPosition();
            }

            _onlineDetector = new COnlineDetector(client.TriggerRecalcAllBots, EnmBotEventCode.OnPositionOnline,
                                                  parTimeAfterUpdateMs: 500, parTimeAfterObjectCreated: 8000);



            CreateListPos(_client.StockExchId, _instruments);
        }
 public CDictTFArray(CTimeFrameAnalyzer timeFrameAnalyzer)
 {
     m_timeFrameAnalyzer = timeFrameAnalyzer;
     m_GUIBox            = m_timeFrameAnalyzer.Plaza2Connector.GUIBox;
 }
Example #7
0
 public CTableSysTime(string name, IDealingServerForTableSysTime client, CGUIBox guiBox)
     : base(name, client)
 {
     _guiBox = guiBox;
     _client = client;
 }