Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 4
0
 private void marketListBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     MarketChanged?.Invoke(Market);
 }
Exemplo n.º 5
0
 internal void RaiseMarketChanged()
 {
     MarketChanged?.Invoke(this, EventArgs.Empty);
 }