public void getProvinceElectionInfoCallback(GetProvinceElectionInfo_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.votingAllowed = returnData.votingAllowed;
             if (this.provinceMembers == null)
             {
                 this.provinceMembers = new List <ParishMember>();
             }
             else
             {
                 this.provinceMembers.Clear();
             }
             if (returnData.provinceMembers == null)
             {
                 this.votesAvailableLabel.Text         = SK.Text("ProvincePanel_Need_More_Counties", "More Counties need to be active before an election is held");
                 this.votesAvailableLabel.Position     = new Point(0x1f, 12);
                 this.votesAvailableLabel.Size         = new Size(400, 100);
                 this.votesAvailableLabel.Font         = FontManager.GetFont("Arial", 14f, FontStyle.Regular);
                 this.votesAvailableLabel.Alignment    = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
                 this.votesAvailableLabelValue.Visible = false;
                 this.wallInfoImage.invalidate();
             }
             else
             {
                 this.provinceMembers.AddRange(returnData.provinceMembers);
                 int numSpareVotes = 0;
                 foreach (ParishMember member in this.provinceMembers)
                 {
                     if (member.userID == RemoteServices.Instance.UserID)
                     {
                         numSpareVotes = member.numSpareVotes;
                         break;
                     }
                 }
                 this.votesAvailableLabelValue.Text = numSpareVotes.ToString();
             }
             this.m_userIDOnCurrent      = -1;
             this.electedLeaderID        = returnData.leaderID;
             this.electedLeaderName      = returnData.leaderName;
             this.lastProclamationTime   = returnData.lastProclamation;
             this.currentLeaderID        = returnData.leaderID;
             this.currentLeaderName      = returnData.leaderName;
             this.voteCapLabelValue.Text = returnData.voteCap.ToString();
             this.voteCap = returnData.voteCap;
             this.addPlayers();
         }
     }
 }
 public void OurRemoteAsyncCallBack_GetProvinceElectionInfo(IAsyncResult ar)
 {
     RemoteAsyncDelegate_GetProvinceElectionInfo asyncDelegate = (RemoteAsyncDelegate_GetProvinceElectionInfo) ((AsyncResult) ar).AsyncDelegate;
     try
     {
         this.storeRPCresult(ar, asyncDelegate.EndInvoke(ar));
     }
     catch (Exception exception)
     {
         GetProvinceElectionInfo_ReturnType returnData = new GetProvinceElectionInfo_ReturnType();
         this.manageRemoteExpection(ar, returnData, exception);
     }
 }