public void getCountyElectionInfoCallback(GetCountyElectionInfo_ReturnType returnData)
 {
     if (returnData.Success)
     {
         StoredCountyInfo info = (StoredCountyInfo)this.countyList[returnData.countyID];
         if (info == null)
         {
             info = new StoredCountyInfo();
             this.countyList[returnData.countyID] = info;
         }
         info.m_lastUpdateTime = DateTime.Now;
         info.lastReturnData   = returnData;
         if (this.currentCounty == returnData.countyID)
         {
             this.votingAllowed = returnData.votingAllowed;
             if (this.countyMembers == null)
             {
                 this.countyMembers = new List <ParishMember>();
             }
             else
             {
                 this.countyMembers.Clear();
             }
             if (returnData.countyMembers == null)
             {
                 this.votesAvailableLabel.Text         = SK.Text("CountyPanel_More_Parishes_Needed", "More Parishes 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.countyMembers.AddRange(returnData.countyMembers);
                 int numSpareVotes = 0;
                 foreach (ParishMember member in this.countyMembers)
                 {
                     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_GetCountyElectionInfo(IAsyncResult ar)
 {
     RemoteAsyncDelegate_GetCountyElectionInfo asyncDelegate = (RemoteAsyncDelegate_GetCountyElectionInfo) ((AsyncResult) ar).AsyncDelegate;
     try
     {
         this.storeRPCresult(ar, asyncDelegate.EndInvoke(ar));
     }
     catch (Exception exception)
     {
         GetCountyElectionInfo_ReturnType returnData = new GetCountyElectionInfo_ReturnType();
         this.manageRemoteExpection(ar, returnData, exception);
     }
 }