public Market(string marketName, Player player1, Player player2, string eventId, TypeDBO typeDbo) { MarketName = marketName; Player1 = player1; Player2 = player2; switch (typeDbo) { case TypeDBO.SkyBet: SkyBetEventId = eventId; break; case TypeDBO.Bet365: Bet365EventId = eventId; break; case TypeDBO.BetFair: BetfairEventId = eventId; break; } Player1.PlayerHanlder += Player1OnPlayerHanlder; Player2.PlayerHanlder += Player2OnPlayerHanlder; MarketChanged?.Invoke(new MarketUpdEventArgs(this)); }
private void DispatchMarketChanged(MarketChangedEventArgs args) { try { MarketChanged.Invoke(this, args); } catch (Exception e) { Trace.TraceError("Error dispatching event: {0}", e); } }
private void OnMarketChanged() { MarketChanged?.Invoke(Market); }
private void marketListBox_SelectedIndexChanged(object sender, EventArgs e) { MarketChanged?.Invoke(Market); }
internal void RaiseMarketChanged() { MarketChanged?.Invoke(this, EventArgs.Empty); }