Ejemplo n.º 1
0
        void Client_LockPlayerCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <bool> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MyMessageBox.ShowInfo("锁定玩家失败,服务器返回错误,信息为:" + e.Error.Message);
                    return;
                }

                if (e.Result)
                {
                    MyMessageBox.ShowInfo("锁定玩家成功。");
                    //this.AsyncGetListPlayers();
                }
                else
                {
                    MyMessageBox.ShowInfo("锁定玩家失败。");
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("锁定玩家失败,回调处理异常,信息为:" + exc.Message);
            }
        }
Ejemplo n.º 2
0
        void Client_GetPlayerBuyVirtualShoppingItemRecordCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <MetaData.Shopping.PlayerBuyVirtualShoppingItemRecord[]> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MessageBox.Show("查询虚拟商品购买记录失败。" + e.Error.Message);
                    return;
                }

                this.ListVirtualShoppingBuyRecords.Clear();
                if (e.Result != null)
                {
                    foreach (var item in e.Result)
                    {
                        ListVirtualShoppingBuyRecords.Add(new PlayerBuyVirtualShoppingItemRecordUIModel(item));
                    }
                }
            }
            catch (Exception exc)
            {
                MessageBox.Show("查询虚拟商品购买记录回调处理异常。" + exc.Message);
            }
        }
Ejemplo n.º 3
0
        void Client_PayAwardCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <int> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MyMessageBox.ShowInfo("提交幸运大转盘中奖支付,服务器返回异常。异常信息:" + e.Error.Message);
                    return;
                }

                if (e.Result == OperResult.RESULTCODE_TRUE)
                {
                    MyMessageBox.ShowInfo("幸运大转盘中奖支付成功");
                    _syn.Post(o =>
                    {
                        this.DialogResult = true;
                    }, null);
                }
                else
                {
                    MyMessageBox.ShowInfo("幸运大转盘中奖支付失败,原因为:" + OperResult.GetMsg(e.Result));
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("提交幸运大转盘中奖支付,返回后处理异常。异常信息:" + exc.Message);
            }
        }
Ejemplo n.º 4
0
        void Client_GetFinishedGoldCoinRechargeRecordListCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <MetaData.GoldCoinRechargeRecord[]> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MessageBox.Show("查询金币充值记录失败。" + e.Error.Message);
                    return;
                }

                this.ListGoldCoinRechargeRecords.Clear();
                decimal sumRMB      = 0;
                decimal sumGoldCoin = 0;

                if (e.Result != null)
                {
                    foreach (var item in e.Result)
                    {
                        sumRMB      += item.SpendRMB;
                        sumGoldCoin += item.GainGoldCoin;
                        this.ListGoldCoinRechargeRecords.Add(new GoldCoinRechargeRecordUIModel(item));
                    }
                }

                this.SumListGoldCoinRechargeRecords_GotGoldCoin = sumGoldCoin;
                this.SumListGoldCoinRechargeRecords_SpendRMB    = sumRMB;
            }
            catch (Exception exc)
            {
                MessageBox.Show("查询金币充值记录回调处理异常。" + exc.Message);
            }
        }
Ejemplo n.º 5
0
        void Client_GetAllAlipayRechargeRecordsCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <AlipayRechargeRecord[]> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MessageBox.Show("查询支付宝付款记录失败。" + e.Error);
                    return;
                }

                ListAllAlipayRecords.Clear();
                decimal sumYuan = 0;
                decimal sumRMB  = 0;

                if (e.Result != null)
                {
                    foreach (var item in e.Result)
                    {
                        ListAllAlipayRecords.Add(new AlipayRechargeRecordUIModel(item));
                        sumYuan += item.total_fee;
                        sumRMB  += item.value_rmb;
                    }
                }

                this.SumListAllAlipayRecords_PayYuan = sumYuan;
                this.SumListAllAlipayRecords_RMB     = sumRMB;
            }
            catch (Exception exc)
            {
                MessageBox.Show("处理支付宝订单回调异常。" + exc.Message);
            }
        }
Ejemplo n.º 6
0
        void Client_GetDeletedPlayersCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <PlayerInfo[]> e)
        {
            App.BusyToken.CloseBusyWindow();
            try
            {
                ListAllDeletedPlayers.Clear();
                if (e.Error != null)
                {
                    MyMessageBox.ShowInfo("查询已删除玩家,服务器返回异常。信息为:" + e.Error.Message);
                    return;
                }

                if (e.Result != null)
                {
                    foreach (var item in e.Result)
                    {
                        ListAllDeletedPlayers.Add(new PlayerInfoUIModel(new SuperMinersServerApplication.Model.PlayerInfoLoginWrap()
                        {
                            SimpleInfo  = item.SimpleInfo,
                            FortuneInfo = item.FortuneInfo
                        }));
                    }
                }
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message);
            }
        }
        void Client_UpdateVirtualShoppingItemCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <int> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MessageBox.Show("修改虚拟商品失败。" + e.Error.Message);
                    return;
                }

                if (e.Result == OperResult.RESULTCODE_TRUE)
                {
                    MessageBox.Show("虚拟商品修改成功。");
                    this._syn.Post((o) =>
                    {
                        this.Close();
                    }, null);
                }
                else
                {
                    MessageBox.Show("修改虚拟商品失败。原因为:" + OperResult.GetMsg(e.Result));
                }
            }
            catch (Exception exc)
            {
                MessageBox.Show("修改虚拟商品回调处理异常。" + exc.Message);
            }
        }
        void Client_PayWithdrawRMBRecordCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <int> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Cancelled)
                {
                    return;
                }

                if (e.Error != null)
                {
                    MessageBox.Show("操作失败,服务器返回异常,信息为:" + e.Error);
                    return;
                }

                if (e.Result == OperResult.RESULTCODE_TRUE)
                {
                    IsOK = true;
                    MessageBox.Show("操作成功。");
                    _syn.Post(o =>
                    {
                        this.Close();
                    }, null);
                }
                else
                {
                    MessageBox.Show("操作失败。原因:" + OperResult.GetMsg(e.Result));
                }
            }
            catch (Exception exc)
            {
                MessageBox.Show("操作异常。原因:" + exc.Message);
            }
        }
Ejemplo n.º 9
0
        void Client_CancelDelegateBuyStoneCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <int> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    LogHelper.Instance.AddErrorLog("Client_CancelDelegateBuyStoneCompleted server return Exception", e.Error);
                    MyMessageBox.ShowInfo("取消委托买单操作,服务返回异常");
                    return;
                }

                if (e.Result == OperResult.RESULTCODE_TRUE)
                {
                    MyMessageBox.ShowInfo("取消委托买单成功。");
                    AsyncGetAllNotFinishedBuyOrders();
                    App.UserVMObject.AsyncGetPlayerInfo();
                }
                else
                {
                    MyMessageBox.ShowInfo("取消委托买单失败。原因为:" + OperResult.GetMsg(e.Result));
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("取消委托买单操作,处理异常");
                LogHelper.Instance.AddErrorLog("Client_CancelDelegateBuyStoneCompleted Exception", exc);
            }
        }
Ejemplo n.º 10
0
        void Client_GambleStoneBetInCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <GambleStonePlayerBetInResult> e)
        {
            try
            {
                //App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MyMessageBox.ShowInfo("疯狂猜石下注失败。服务器返回错误。");
                    LogHelper.Instance.AddErrorLog("疯狂猜石下注失败。服务器返回错误。", e.Error);
                    return;
                }
                if (e.Result == null)
                {
                    MyMessageBox.ShowInfo("疯狂猜石下注失败。");
                    return;
                }
                if (e.Result.ResultCode != OperResult.RESULTCODE_TRUE)
                {
                    MyMessageBox.ShowInfo("赌石娱乐下注失败。原因为:" + OperResult.GetMsg(e.Result.ResultCode));
                    return;
                }

                this.CurrentInningPlayerBetRecord.ParentObject = e.Result.PlayerBetRecord;
                App.UserVMObject.AsyncGetPlayerInfo();
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("疯狂猜石下注失败。回调处理异常");
                LogHelper.Instance.AddErrorLog("疯狂猜石下注失败。回调处理异常。", exc);
            }
        }
Ejemplo n.º 11
0
        void Client_GetNoticesCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <NoticeInfo[]> e)
        {
            try
            {
                if (e.Cancelled)
                {
                    return;
                }

                if (e.Error != null || e.Result == null || e.Result.Length == 0)
                {
                    return;
                }

                this.ListNotices.Clear();

                var listOrdered = e.Result.OrderByDescending(n => n.Time);
                foreach (var item in listOrdered)
                {
                    this.ListNotices.Add(item);
                }

                this.LastedNotice = this.ListNotices[0];
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("服务器连接失败。");
                LogHelper.Instance.AddErrorLog("服务器连接失败。", exc);
            }
        }
Ejemplo n.º 12
0
        void Client_GetLastMonthGambleStonePlayerBetRecordCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <GambleStonePlayerBetRecord[]> e)
        {
            try
            {
                if (e.Error != null)
                {
                    LogHelper.Instance.AddErrorLog("查询下注记录失败,服务器返回失败。", e.Error);
                    return;
                }

                this.ListPlayerBetRecords.Clear();
                if (e.Result != null)
                {
                    foreach (var item in e.Result)
                    {
                        this.ListPlayerBetRecords.Add(new GambleStonePlayerBetRecordUIModel(item));
                    }
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("查询下注记录失败。");
                LogHelper.Instance.AddErrorLog("查询下注记录失败。", exc);
            }
        }
Ejemplo n.º 13
0
        void Client_GetPlayersCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <SuperMinersServerApplication.Model.PlayerInfoLoginWrap[]> e)
        {
            App.BusyToken.CloseBusyWindow();
            if (e.Cancelled)
            {
                return;
            }

            if (e.Error != null || e.Result == null)
            {
                MessageBox.Show("获取玩家信息失败。");
                return;
            }

            this.ListAllPlayers.Clear();
            this.ListFilteredPlayers.Clear();

            foreach (var item in e.Result)
            {
                var player = new PlayerInfoUIModel(item);
                this.ListAllPlayers.Add(player);
                this.ListFilteredPlayers.Add(player);
            }

            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs("PlayersCount"));
            }
        }
Ejemplo n.º 14
0
        void Client_ChangePlayerCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <int> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Cancelled)
                {
                    return;
                }

                if (e.Error != null)
                {
                    MessageBox.Show("保存玩家信息服务器返回失败,错误信息为:" + e.Error.Message);
                    return;
                }

                if (e.Result == OperResult.RESULTCODE_TRUE)
                {
                    MessageBox.Show("保存玩家信息成功。");
                }
                else
                {
                    MessageBox.Show("保存玩家信息失败。" + OperResult.GetMsg(e.Result));
                }
            }
            catch (Exception exc)
            {
            }
        }
Ejemplo n.º 15
0
        void Client_GetBuyMinerFinishedRecordListCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <MetaData.MinersBuyRecord[]> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MessageBox.Show("查询矿工购买记录失败。" + e.Error.Message);
                    return;
                }

                this.ListMinerBuyRecords.Clear();
                decimal sumMiner    = 0;
                decimal sumGoldCoin = 0;

                if (e.Result != null)
                {
                    foreach (var item in e.Result)
                    {
                        sumMiner    += item.GainMinersCount;
                        sumGoldCoin += item.SpendGoldCoin;
                        this.ListMinerBuyRecords.Add(new MinersBuyRecordUIModel(item));
                    }
                }

                this.SumListMinerBuyRecords_GotMiner      = sumMiner;
                this.SumListMinerBuyRecords_SpendGoldCoin = sumGoldCoin;
            }
            catch (Exception exc)
            {
                MessageBox.Show("查询矿工购买记录回调处理异常。" + exc.Message);
            }
        }
        void Client_ChangePlayerPasswordCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <bool> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MyMessageBox.ShowInfo("修改玩家密码失败。原因为:" + e.Error);
                    return;
                }

                if (e.Result)
                {
                    MyMessageBox.ShowInfo("修改玩家密码成功");
                }
                else
                {
                    MyMessageBox.ShowInfo("修改玩家密码失败。");
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("修改玩家密码失败。原因为:" + exc);
            }
        }
Ejemplo n.º 17
0
        void Client_BuyDiamondShoppingItemCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <int> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MessageBox.Show("购买商品失败。" + e.Error.Message);
                    return;
                }

                if (e.Result == OperResult.RESULTCODE_TRUE)
                {
                    MessageBox.Show("购买商品成功");
                    App.UserVMObject.AsyncGetPlayerInfo();
                }
                else
                {
                    MessageBox.Show("购买商品失败,原因为:" + OperResult.GetMsg(e.Result));
                }
            }
            catch (Exception exc)
            {
                MessageBox.Show("购买商品失败,回调处理异常。" + exc.Message);
            }
        }
Ejemplo n.º 18
0
        void Client_DeleteAddressCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <int> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MyMessageBox.ShowInfo("删除地址失败。" + e.Error.Message);
                    return;
                }

                if (e.Result == OperResult.RESULTCODE_TRUE)
                {
                    MyMessageBox.ShowInfo("删除地址成功");
                    this.AsyncGetPostAddressList();
                }
                else
                {
                    MyMessageBox.ShowInfo("删除地址失败。原因为:" + OperResult.GetMsg(e.Result));
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("删除地址失败。信息为:" + exc.Message);
            }
        }
        void Client_AdminSetStoneFactoryProfitRateCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <int> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MyMessageBox.ShowInfo("保存工厂昨日收益失败。原因为:" + e.Error.Message);
                    return;
                }

                if (e.Result == OperResult.RESULTCODE_TRUE)
                {
                    MyMessageBox.ShowInfo("保存成功");
                    this.Close();
                }
                else
                {
                    MyMessageBox.ShowInfo("保存失败,原因为:" + OperResult.GetMsg(e.Result));
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("保存工厂昨日收益返回处理异常1。原因为:" + exc.Message);
            }
        }
Ejemplo n.º 20
0
        void Client_GetPlayerPostAddressListCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <PostAddress[]> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();

                this.ListPostAddress.Clear();
                if (e.Error != null)
                {
                    MyMessageBox.ShowInfo("获取地址失败。" + e.Error.Message);
                    return;
                }

                if (e.Result != null)
                {
                    foreach (var item in e.Result)
                    {
                        this.ListPostAddress.Add(new PostAddressUIModel(item));
                    }
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("获取地址失败。信息为:" + exc.Message);
            }
        }
Ejemplo n.º 21
0
        void Client_GetAwardItemsCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <MetaData.Game.Roulette.RouletteAwardItem[]> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MyMessageBox.ShowInfo("查询幸运大转盘奖项,服务器返回异常。异常信息:" + e.Error.Message);
                    return;
                }

                this.ListAwardItems.Clear();
                if (e.Result != null)
                {
                    foreach (var item in e.Result)
                    {
                        this.ListAwardItems.Add(new RouletteAwardItemUIModel(item));
                    }
                }

                if (AwardItemsListChanged != null)
                {
                    AwardItemsListChanged();
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("查询幸运大转盘奖项,返回后处理异常。异常信息:" + exc.Message);
            }
        }
Ejemplo n.º 22
0
        void Client_MakeAVowToGodCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <MakeAVowToGodResult> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MyMessageBox.ShowInfo("神灵许愿失败。" + e.Error.Message);
                    return;
                }

                if (e.Result != null && e.Result.OperResultCode == OperResult.RESULTCODE_TRUE)
                {
                    MyMessageBox.ShowInfo("许愿显灵,获取" + e.Result.GravelResult + "碎片");
                    this.AsyncGetPlayerInfo();
                }
                else
                {
                    MyMessageBox.ShowInfo("神灵许愿失败,原因为:" + OperResult.GetMsg(e.Result.OperResultCode));
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("神灵许愿失败。原因为:" + exc.Message);
            }
        }
        void Client_TransferPlayerToCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <int> e)
        {
            //try
            //{
            //    string serverUri1 = System.Configuration.ConfigurationManager.AppSettings["ServerUri1"];
            //    GlobalData.Client.Init(serverUri1);

            //    GlobalData.Client.TransferPlayerToCompleted -= Client_TransferPlayerToCompleted;
            //    if (e.Error != null)
            //    {
            //        MyMessageBox.ShowInfo("转区失败1,原因为:" + e.Error.Message);
            //        return;
            //    }
            //    if (e.Result != OperResult.RESULTCODE_TRUE)
            //    {
            //        MyMessageBox.ShowInfo("转区失败2,原因为:" + OperResult.GetMsg(e.Result));
            //        return;
            //    }

            //    if (this.datagridPlayerInfos.SelectedItem is OldPlayerTransferRegisterInfoUIModel)
            //    {
            //        OldPlayerTransferRegisterInfoUIModel player = this.datagridPlayerInfos.SelectedItem as OldPlayerTransferRegisterInfoUIModel;

            //        GlobalData.Client.TransferPlayerFromCompleted += Client_TransferPlayerFromCompleted;
            //        GlobalData.Client.TransferPlayerFrom(player.ID, player.UserName, GlobalData.CurrentAdmin.UserName);

            //    }
            //}
            //catch (Exception exc)
            //{
            //    MyMessageBox.ShowInfo(exc.Message);
            //}
        }
Ejemplo n.º 24
0
        void Client_GetAgentUserInfoCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <MetaData.AgentUser.AgentUserInfo> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MyMessageBox.ShowInfo("获取代理信息失败。信息为:" + e.Error.Message);
                    return;
                }

                if (e.Result == null)
                {
                    MyMessageBox.ShowInfo("获取代理信息失败。");
                }
                else
                {
                    GlobalData.AgentUserInfo = e.Result;
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("获取代理信息失败。原因为:" + exc.Message);
            }
        }
Ejemplo n.º 25
0
        void Client_DelegateSellStoneCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <int> e)
        {
            App.BusyToken.CloseBusyWindow();
            if (e.Cancelled)
            {
                return;
            }

            if (e.Error != null)
            {
                MyMessageBox.ShowInfo("挂单出售矿石失败。");
                return;
            }
            if (e.Result != OperResult.RESULTCODE_TRUE)
            {
                MyMessageBox.ShowInfo("挂单出售矿石失败。原因为:" + OperResult.GetMsg(e.Result));
                return;
            }

            MyMessageBox.ShowInfo("挂单出售矿石成功。");
            App.UserVMObject.AsyncGetPlayerInfo();
            App.StackStoneVMObject.AsyncGetAllNotFinishedSellOrders();

            this._syn.Post((o) =>
            {
                this.Close();
            }, null);
        }
Ejemplo n.º 26
0
        void Client_GetPlayerInfoCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <PlayerInfo> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Cancelled)
                {
                    return;
                }

                if (e.Error != null || e.Result == null)
                {
                    App.BusyToken.CloseAllBusyWindow();
                    MyMessageBox.ShowInfo("获取用户信息失败。");
                    GlobalData.Client.Logout();
                    return;
                }

                GlobalData.InitUser(e.Result);

                if (GetPlayerInfoCompleted != null)
                {
                    GetPlayerInfoCompleted(null, null);
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("服务器连接失败。");
                LogHelper.Instance.AddErrorLog("服务器连接失败。", exc);
            }
        }
Ejemplo n.º 27
0
        void Client_GetDiamondShoppingItemsCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <DiamondShoppingItem[]> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MessageBox.Show("查询钻石商品失败。" + e.Error.Message);
                    return;
                }

                this.ListDiamondShoppingItems.Clear();
                if (e.Result != null)
                {
                    foreach (var item in e.Result)
                    {
                        ListDiamondShoppingItems.Add(new DiamondShoppingItemUIModel(item));
                    }
                }
            }
            catch (Exception exc)
            {
                MessageBox.Show("查询钻石商品回调处理异常。" + exc.Message);
            }
        }
Ejemplo n.º 28
0
        void Client_SaveRouletteLargeWinMultipleCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <bool> e)
        {
            App.BusyToken.CloseBusyWindow();
            GlobalData.Client.SaveRouletteLargeWinMultipleCompleted -= Client_SaveRouletteLargeWinMultipleCompleted;
            try
            {
                if (e.Error != null)
                {
                    MyMessageBox.ShowInfo("保存大奖中奖倍数,服务器返回异常。信息为:" + e.Error);
                    return;
                }

                if (e.Result)
                {
                    MyMessageBox.ShowInfo("保存大奖中奖倍数成功");
                    GlobalData.RouletteConfig.RouletteLargeWinMultiple = (decimal)numMultiple.Value;
                }
                else
                {
                    MyMessageBox.ShowInfo("保存大奖中奖倍数失败。");
                }
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("保存大奖中奖倍数,回调处理异常。信息为:" + exc.Message);
            }
        }
Ejemplo n.º 29
0
        void Client_GetLockedStonesOrderListCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <MetaData.Trade.LockSellStonesOrder[]> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Error != null)
                {
                    MessageBox.Show("查询未完成的矿石订单失败。" + e.Error.Message);
                    return;
                }

                this.ListLockedStoneOrderRecords.Clear();
                if (e.Result != null)
                {
                    foreach (var item in e.Result)
                    {
                        ListLockedStoneOrderRecords.Add(new LockSellStonesOrderUIModel(item));
                    }
                }
            }
            catch (Exception exc)
            {
                MessageBox.Show("查询未完成的矿石订单回调处理异常。" + exc.Message);
            }
        }
Ejemplo n.º 30
0
        //void Client_GetUserLoginLogCompleted(object sender, Wcf.Clients.WebInvokeEventArgs<PlayerLoginInfo[]> e)
        //{
        //    try
        //    {
        //        App.BusyToken.CloseBusyWindow();

        //        ListPlayerLoginInfo.Clear();

        //        if (e.Error != null)
        //        {
        //            MessageBox.Show("获取玩家登录日志失败。");
        //            return;
        //        }

        //        if (e.Result != null)
        //        {
        //            foreach (var item in e.Result)
        //            {
        //                var player = this.ListAllPlayers.FirstOrDefault(p => p.UserID == item.UserID);
        //                string userName = player == null ? "" : player.UserName;
        //                this.ListPlayerLoginInfo.Add(new PlayerLoginInfoUIModel(item, userName));
        //            }
        //        }
        //    }
        //    catch (Exception exc)
        //    {
        //        MyMessageBox.ShowInfo("获取玩家信息,服务器回调异常。信息为:" + exc.Message);
        //    }
        //}

        void Client_GetPlayerCompleted(object sender, Wcf.Clients.WebInvokeEventArgs <SuperMinersServerApplication.Model.PlayerInfoLoginWrap> e)
        {
            try
            {
                App.BusyToken.CloseBusyWindow();
                if (e.Cancelled)
                {
                    return;
                }

                if (e.Error != null || e.Result == null)
                {
                    MessageBox.Show("获取玩家信息失败。");
                    return;
                }

                var user = this.ListAllPlayers.FirstOrDefault(u => u.UserLoginName == e.Result.SimpleInfo.UserName);
                if (user != null)
                {
                    user.ParentObject = e.Result;
                }
                //user = this.ListFilteredPlayers.FirstOrDefault(u => u.UserName == e.Result.SimpleInfo.UserName);
                //if (user != null)
                //{
                //    user.ParentObject = e.Result;
                //}
            }
            catch (Exception exc)
            {
                MyMessageBox.ShowInfo("获取玩家信息,服务器回调异常。信息为:" + exc.Message);
            }
        }