Example #1
0
 public void SetExecution(int securityId, long price, long quantity)
 {
     EventType = XEventType.Execution;
     EventData.Execution.SecurityId = securityId;
     EventData.Execution.Price      = price;
     EventData.Execution.Quantity   = quantity;
 }
Example #2
0
 public void SetMarketData(int securityId, long bidPrice, long askPrice)
 {
     EventType             = XEventType.MarketData;
     MarketData.SecurityId = securityId;
     MarketData.BidPrice   = bidPrice;
     MarketData.AskPrice   = askPrice;
 }
Example #3
0
 private void ThrowXEvent(XEventType eventType, Dictionary <string, string> parameters)
 {
     if (OnXEventReceived != null)
     {
         OnXEventReceived(this, eventType, parameters);
     }
 }
Example #4
0
 public void SetMarketDataForBatching(int securityId, MarketDataUpdate update)
 {
     EventType = XEventType.MarketData;
     update.ApplyTo(MarketDataUpdate);
     EventData.MarketDataForBatching.SecurityId = securityId;
     EventData.MarketDataForBatching.Update     = MarketDataUpdate;
 }
Example #5
0
 public void Reset()
 {
     ProcessedMarketDataCount = 0;
     EventType = XEventType.None;
     EventData = default(EventInfo);
     MarketDataUpdate.Reset();
 }
Example #6
0
 public void SetTradingSignal1(int securityId, long value1, long value2, long value3, long value4)
 {
     EventType = XEventType.TradingSignal1;
     EventData.TradingSignal1.SecurityId = securityId;
     EventData.TradingSignal1.Value1     = value1;
     EventData.TradingSignal1.Value2     = value2;
     EventData.TradingSignal1.Value3     = value3;
     EventData.TradingSignal1.Value4     = value4;
 }
Example #7
0
 public void SetMarketData(int securityId, MarketDataUpdate update)
 {
     EventType = XEventType.MarketData;
     EventData.MarketData.SecurityId  = securityId;
     EventData.MarketData.BidOrZero   = update.Bid.GetValueOrDefault();
     EventData.MarketData.AskOrZero   = update.Ask.GetValueOrDefault();
     EventData.MarketData.LastOrZero  = update.Last.GetValueOrDefault();
     EventData.MarketData.UpdateCount = update.UpdateCount;
 }
Example #8
0
        private void eventListener_OnXEventReceived(object sender, XEventType type, Dictionary <string, string> parameters)
        {
            try
            {
                osae.AddToLog("EventListener captured event : " + type.ToString() + " - " + sender.ToString() + " - " + _ip, false);

                switch (type)
                {
                case XEventType.PlaybackPaused:
                    osae.ObjectStateSet(Name, "PAUSED");
                    break;

                case XEventType.PlaybackResumed:
                case XEventType.PlaybackStarted:
                    //if (_connection.System.GetActivePlayers() == xbmc_json_async.Player.XPlayerType.VideoPlayer)
                    //    osae.ObjectPropertySet(Name, "Current Player", "Video");
                    //else if (_connection.System.GetActivePlayers() == xbmc_json_async.Player.XPlayerType.AudioPlayer)
                    //    osae.ObjectPropertySet(Name, "Current Player", "Audio");
                    //else
                    //    osae.ObjectPropertySet(Name, "Current Player", "Picture");

                    osae.ObjectStateSet(Name, "PLAYING");
                    break;

                case XEventType.PlaybackStopped:
                case XEventType.PlaybackEnded:
                    osae.ObjectStateSet(Name, "STOPPED");
                    break;

                case XEventType.ConnectionSuccessful:
                    _connected = true;
                    break;

                case XEventType.ConnectionFailed:
                    _connected = false;
                    break;
                    //case XEventType.ApplicationStop:
                    //    _connected = false;
                    break;
                }
            }
            catch (Exception ex)
            {
                osae.AddToLog("Error receiving message: " + ex.Message, true);
            }
        }
Example #9
0
 private static extern bool XCheckTypedEvent(IntPtr display, XEventType event_type, IntPtr event_return);
Example #10
0
 public bool CheckTypedEvent(XEventType event_type)
 {
     return XCheckTypedEvent (display.Handle, event_type, Handle);
 }
Example #11
0
 public XftEvent(XEventType type, XftEventComponent owner)
 {
     m_type  = type;
     m_owner = owner;
 }
Example #12
0
 public void Reset()
 {
     EventType = XEventType.None;
     EventData = default(EventInfo);
 }
Example #13
0
 void eventListener_OnXEventReceived(object sender, XEventType type, Dictionary <string, string> parameters)
 {
     MessageBox.Show("EventListener captured event : " + type.ToString());
 }
Example #14
0
 public XftEvent(XEventType type, XftEventComponent owner)
 {
     m_type = type;
     m_owner = owner;
 }
Example #15
0
 public void SetMarketData(int securityId, MarketDataConflater marketDataConflater)
 {
     EventType = XEventType.MarketData;
     EventData.MarketData.SecurityId = securityId;
     EventData.MarketData.Conflater  = marketDataConflater;
 }