示例#1
0
        public void getProvinceFrontPageInfoCallback(GetProvinceFrontPageInfo_ReturnType returnData)
        {
            if (returnData.Success)
            {
                StoredProvinceInfo info = (StoredProvinceInfo)this.provinceList[returnData.provinceID];
                if (info == null)
                {
                    info = new StoredProvinceInfo();
                    this.provinceList[returnData.provinceID] = info;
                }
                info.m_lastUpdateTime = DateTime.Now;
                info.lastReturnData   = returnData;
                if (this.currentProvince == returnData.provinceID)
                {
                    this.m_userIDOnCurrent = -1;
                    this.currentLeaderID   = returnData.leaderID;
                    this.currentLeaderName = returnData.leaderName;
                    this.updateLeaderInfo();
                    NumberFormatInfo nFI = GameEngine.NFI;
                    switch (returnData.taxRate)
                    {
                    case 0:
                        this.taxValue.Text = "0";
                        break;

                    case 1:
                        this.taxValue.Text = "x1";
                        break;

                    case 2:
                        this.taxValue.Text = "x2";
                        break;

                    case 3:
                        this.taxValue.Text = "x3";
                        break;

                    case 4:
                        this.taxValue.Text = "x4";
                        break;

                    case 5:
                        this.taxValue.Text = "x5";
                        break;

                    case 6:
                        this.taxValue.Text = "x6";
                        break;

                    case 7:
                        this.taxValue.Text = "x7";
                        break;

                    case 8:
                        this.taxValue.Text = "x8";
                        break;

                    case 9:
                        this.taxValue.Text = "x9";
                        break;
                    }
                    this.goldValue.Text = returnData.gold.ToString("N", nFI);
                    this.createParishWall(returnData.provinceWallInfo);
                }
            }
        }
        public void getProvinceFrontPageInfoCallback(GetProvinceFrontPageInfo_ReturnType returnData)
        {
            if (returnData.Success)
            {
                StoredProvinceInfo info = (StoredProvinceInfo) this.provinceList[returnData.provinceID];
                if (info == null)
                {
                    info = new StoredProvinceInfo();
                    this.provinceList[returnData.provinceID] = info;
                }
                info.m_lastUpdateTime = DateTime.Now;
                info.lastReturnData = returnData;
                if (this.currentProvince == returnData.provinceID)
                {
                    this.m_userIDOnCurrent = -1;
                    this.currentLeaderID = returnData.leaderID;
                    this.currentLeaderName = returnData.leaderName;
                    this.updateLeaderInfo();
                    NumberFormatInfo nFI = GameEngine.NFI;
                    switch (returnData.taxRate)
                    {
                        case 0:
                            this.taxValue.Text = "0";
                            break;

                        case 1:
                            this.taxValue.Text = "x1";
                            break;

                        case 2:
                            this.taxValue.Text = "x2";
                            break;

                        case 3:
                            this.taxValue.Text = "x3";
                            break;

                        case 4:
                            this.taxValue.Text = "x4";
                            break;

                        case 5:
                            this.taxValue.Text = "x5";
                            break;

                        case 6:
                            this.taxValue.Text = "x6";
                            break;

                        case 7:
                            this.taxValue.Text = "x7";
                            break;

                        case 8:
                            this.taxValue.Text = "x8";
                            break;

                        case 9:
                            this.taxValue.Text = "x9";
                            break;
                    }
                    this.goldValue.Text = returnData.gold.ToString("N", nFI);
                    this.createParishWall(returnData.provinceWallInfo);
                }
            }
        }
 public void OurRemoteAsyncCallBack_GetProvinceFrontPageInfo(IAsyncResult ar)
 {
     RemoteAsyncDelegate_GetProvinceFrontPageInfo asyncDelegate = (RemoteAsyncDelegate_GetProvinceFrontPageInfo) ((AsyncResult) ar).AsyncDelegate;
     try
     {
         this.storeRPCresult(ar, asyncDelegate.EndInvoke(ar));
     }
     catch (Exception exception)
     {
         GetProvinceFrontPageInfo_ReturnType returnData = new GetProvinceFrontPageInfo_ReturnType();
         this.manageRemoteExpection(ar, returnData, exception);
     }
 }