Beispiel #1
0
        void ProcessBalance(string Res)
        {
            BEBalanceBase tmpResult = json.JsonDeserialize <BEBalanceBase>(Res);

            switch (CurrentCurrency.ToLower())
            {
            case "btc":
                Stats.Balance = tmpResult.user.balances.btc / 100000000m;
                Stats.Bets    = (int)tmpResult.user.stats.btc.bets;
                Stats.Wagered = tmpResult.user.stats.btc.wager / 100000000m;
                Stats.Profit  = tmpResult.user.stats.btc.profit / 100000000m;
                break;

            case "bxo":
                Stats.Balance = tmpResult.user.balances.bxo / 100000000m;
                Stats.Bets    = (int)tmpResult.user.stats.bxo.bets;
                Stats.Wagered = tmpResult.user.stats.bxo.wager / 100000000m;
                Stats.Profit  = tmpResult.user.stats.bxo.profit / 100000000m;
                break;

            case "clam":
                Stats.Balance = tmpResult.user.balances.clam / 100000000m;
                Stats.Bets    = (int)tmpResult.user.stats.clam.bets;
                Stats.Wagered = tmpResult.user.stats.clam.wager / 100000000m;
                Stats.Profit  = tmpResult.user.stats.clam.profit / 100000000m;
                break;

            case "doge":
                Stats.Balance = tmpResult.user.balances.doge / 100000000m;
                Stats.Bets    = (int)tmpResult.user.stats.doge.bets;
                Stats.Wagered = tmpResult.user.stats.doge.wager / 100000000m;
                Stats.Profit  = tmpResult.user.stats.doge.profit / 100000000m;
                break;

            case "eth":
                Stats.Balance = tmpResult.user.balances.eth / 100000000m;
                Stats.Bets    = (int)tmpResult.user.stats.eth.bets;
                Stats.Wagered = tmpResult.user.stats.eth.wager / 100000000m;
                Stats.Profit  = tmpResult.user.stats.eth.profit / 100000000m;
                break;

            case "flash":
                Stats.Balance = tmpResult.user.balances.flash / 100000000m;
                Stats.Bets    = (int)tmpResult.user.stats.flash.bets;
                Stats.Wagered = tmpResult.user.stats.flash.wager / 100000000m;
                Stats.Profit  = tmpResult.user.stats.flash.profit / 100000000m;
                break;

            case "ltc":
                Stats.Balance = tmpResult.user.balances.ltc / 100000000m;
                Stats.Bets    = (int)tmpResult.user.stats.ltc.bets;
                Stats.Wagered = tmpResult.user.stats.ltc.wager / 100000000m;
                Stats.Profit  = tmpResult.user.stats.ltc.profit / 100000000m;
                break;
            }
        }
Beispiel #2
0
        void ProcessBalance(string Res)
        {
            BEBalanceBase tmpResult = json.JsonDeserialize <BEBalanceBase>(Res);

            if (LoginStarted)
            {
                LoginTimer.Enabled = false;
                LoginStarted       = false;
                callLoginFinished(true);
            }
            switch (CurrentCurrency.ToLower())
            {
            case "btc":
                Stats.Balance = tmpResult.user.balances.btc / 100000000m;
                Stats.Bets    = (int)tmpResult.user.stats.btc.bets;
                Stats.Wagered = tmpResult.user.stats.btc.wager / 100000000m;
                Stats.Profit  = tmpResult.user.stats.btc.profit / 100000000m;
                break;

            case "bxo":
                Stats.Balance = tmpResult.user.balances.bxo / 100000000m;
                Stats.Bets    = (int)tmpResult.user.stats.bxo.bets;
                Stats.Wagered = tmpResult.user.stats.bxo.wager / 100000000m;
                Stats.Profit  = tmpResult.user.stats.bxo.profit / 100000000m;
                break;

            case "clam":
                Stats.Balance = tmpResult.user.balances.clam / 100000000m;
                Stats.Bets    = (int)tmpResult.user.stats.clam.bets;
                Stats.Wagered = tmpResult.user.stats.clam.wager / 100000000m;
                Stats.Profit  = tmpResult.user.stats.clam.profit / 100000000m;
                break;

            case "doge":
                Stats.Balance = tmpResult.user.balances.doge / 100000000m;
                Stats.Bets    = (int)tmpResult.user.stats.doge.bets;
                Stats.Wagered = tmpResult.user.stats.doge.wager / 100000000m;
                Stats.Profit  = tmpResult.user.stats.doge.profit / 100000000m;
                break;

            case "eth":
                Stats.Balance = tmpResult.user.balances.eth / 100000000m;
                Stats.Bets    = (int)tmpResult.user.stats.eth.bets;
                Stats.Wagered = tmpResult.user.stats.eth.wager / 100000000m;
                Stats.Profit  = tmpResult.user.stats.eth.profit / 100000000m;
                break;

            case "flash":
                Stats.Balance = tmpResult.user.balances.flash / 100000000m;
                Stats.Bets    = (int)tmpResult.user.stats.flash.bets;
                Stats.Wagered = tmpResult.user.stats.flash.wager / 100000000m;
                Stats.Profit  = tmpResult.user.stats.flash.profit / 100000000m;
                break;

            case "ltc":
                Stats.Balance = tmpResult.user.balances.ltc / 100000000m;
                Stats.Bets    = (int)tmpResult.user.stats.ltc.bets;
                Stats.Wagered = tmpResult.user.stats.ltc.wager / 100000000m;
                Stats.Profit  = tmpResult.user.stats.ltc.profit / 100000000m;
                break;
            }
            callStatsUpdated(Stats);
        }