コード例 #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));
        }
コード例 #2
0
 private void DispatchMarketChanged(MarketChangedEventArgs args)
 {
     try
     {
         MarketChanged.Invoke(this, args);
     }
     catch (Exception e)
     {
         Trace.TraceError("Error dispatching event: {0}", e);
     }
 }
コード例 #3
0
 private void OnMarketChanged()
 {
     MarketChanged?.Invoke(Market);
 }
コード例 #4
0
 private void marketListBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     MarketChanged?.Invoke(Market);
 }
コード例 #5
0
 internal void RaiseMarketChanged()
 {
     MarketChanged?.Invoke(this, EventArgs.Empty);
 }