public void SetExecution(int securityId, long price, long quantity) { EventType = XEventType.Execution; EventData.Execution.SecurityId = securityId; EventData.Execution.Price = price; EventData.Execution.Quantity = quantity; }
public void SetMarketData(int securityId, long bidPrice, long askPrice) { EventType = XEventType.MarketData; MarketData.SecurityId = securityId; MarketData.BidPrice = bidPrice; MarketData.AskPrice = askPrice; }
private void ThrowXEvent(XEventType eventType, Dictionary <string, string> parameters) { if (OnXEventReceived != null) { OnXEventReceived(this, eventType, parameters); } }
public void SetMarketDataForBatching(int securityId, MarketDataUpdate update) { EventType = XEventType.MarketData; update.ApplyTo(MarketDataUpdate); EventData.MarketDataForBatching.SecurityId = securityId; EventData.MarketDataForBatching.Update = MarketDataUpdate; }
public void Reset() { ProcessedMarketDataCount = 0; EventType = XEventType.None; EventData = default(EventInfo); MarketDataUpdate.Reset(); }
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; }
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; }
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); } }
private static extern bool XCheckTypedEvent(IntPtr display, XEventType event_type, IntPtr event_return);
public bool CheckTypedEvent(XEventType event_type) { return XCheckTypedEvent (display.Handle, event_type, Handle); }
public XftEvent(XEventType type, XftEventComponent owner) { m_type = type; m_owner = owner; }
public void Reset() { EventType = XEventType.None; EventData = default(EventInfo); }
void eventListener_OnXEventReceived(object sender, XEventType type, Dictionary <string, string> parameters) { MessageBox.Show("EventListener captured event : " + type.ToString()); }
public void SetMarketData(int securityId, MarketDataConflater marketDataConflater) { EventType = XEventType.MarketData; EventData.MarketData.SecurityId = securityId; EventData.MarketData.Conflater = marketDataConflater; }