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();
         }
     }
 }
        private void sendProclamation()
        {
            StoredProvinceInfo info = (StoredProvinceInfo)this.provinceList[this.currentProvince];

            if (info != null)
            {
                info.m_lastUpdateTime = DateTime.MinValue;
            }
            GameEngine.Instance.playInterfaceSound("UserInfoScreen_send_mail");
            InterfaceMgr.Instance.getMainTabBar().selectDummyTabFast(0x15);
            InterfaceMgr.Instance.sendProclamation(6, GameEngine.Instance.World.getProvinceFromVillageID(this.m_currentVillage));
        }
        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);
                }
            }
        }
Exemple #4
0
        public void init()
        {
            int height = base.Height;

            instance = this;
            base.clearControls();
            int villageID  = InterfaceMgr.Instance.getSelectedMenuVillage();
            int provinceID = GameEngine.Instance.World.getProvinceFromVillageID(villageID);

            this.headerImage.Size     = new Size(base.Width, 40);
            this.headerImage.Position = new Point(0, 0);
            base.addControl(this.headerImage);
            this.headerImage.Create((Image)GFXLibrary.mail2_titlebar_left, (Image)GFXLibrary.mail2_titlebar_middle, (Image)GFXLibrary.mail2_titlebar_right);
            CustomSelfDrawPanel.WikiLinkControl.init(this.headerImage, 14, new Point(base.Width - 0x2c, 3));
            this.backgroundImage.Size     = new Size(base.Width, height - 40);
            this.backgroundImage.Position = new Point(0, 40);
            base.addControl(this.backgroundImage);
            this.backgroundImage.Create((Image)GFXLibrary.mail2_mail_panel_upper_left, (Image)GFXLibrary.mail2_mail_panel_upper_middle, (Image)GFXLibrary.mail2_mail_panel_upper_right, (Image)GFXLibrary.mail2_mail_panel_middle_left, (Image)GFXLibrary.mail2_mail_panel_middle_middle, (Image)GFXLibrary.mail2_mail_panel_middle_right, (Image)GFXLibrary.mail2_mail_panel_lower_left, (Image)GFXLibrary.mail2_mail_panel_lower_middle, (Image)GFXLibrary.mail2_mail_panel_lower_right);
            this.parishNameLabel.Text            = SK.Text("GENERIC_Province", "Province") + " : " + GameEngine.Instance.World.getProvinceName(provinceID) + " (" + GameEngine.Instance.World.getVillageName(villageID) + ")";
            this.parishNameLabel.Color           = ARGBColors.White;
            this.parishNameLabel.DropShadowColor = ARGBColors.Black;
            this.parishNameLabel.Position        = new Point(20, 0);
            this.parishNameLabel.Size            = new Size(base.Width - 40, 40);
            this.parishNameLabel.Font            = FontManager.GetFont("Arial", 18f, FontStyle.Regular);
            this.parishNameLabel.Alignment       = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
            this.headerImage.addControl(this.parishNameLabel);
            this.windowImage.Size     = new Size(400, 150);
            this.windowImage.Position = new Point(0x1ed, 130);
            this.backgroundImage.addControl(this.windowImage);
            this.windowImage.Create((Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_right, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_right, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_right);
            this.sheriffLabel.Text      = SK.Text("Provinces_Current_Governor", "Current Governor");
            this.sheriffLabel.Position  = new Point(30, 0x1a);
            this.sheriffLabel.Size      = new Size(250, 40);
            this.sheriffLabel.Color     = ARGBColors.Black;
            this.sheriffLabel.Font      = FontManager.GetFont("Arial", 12f, FontStyle.Regular);
            this.sheriffLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
            this.windowImage.addControl(this.sheriffLabel);
            this.goldLabel.Text      = SK.Text("GENERIC_Current_Gold", "Current Gold");
            this.goldLabel.Position  = new Point(30, 0x42);
            this.goldLabel.Size      = new Size(250, 40);
            this.goldLabel.Color     = ARGBColors.Black;
            this.goldLabel.Font      = FontManager.GetFont("Arial", 12f, FontStyle.Regular);
            this.goldLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
            this.windowImage.addControl(this.goldLabel);
            this.taxLabel.Text      = SK.Text("GENERIC_Tax_Rate", "Tax Rate");
            this.taxLabel.Position  = new Point(30, 0x6a);
            this.taxLabel.Size      = new Size(250, 40);
            this.taxLabel.Color     = ARGBColors.Black;
            this.taxLabel.Font      = FontManager.GetFont("Arial", 12f, FontStyle.Regular);
            this.taxLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
            this.windowImage.addControl(this.taxLabel);
            this.sheriffName.Text      = "";
            this.sheriffName.Position  = new Point(170, 0x1a);
            this.sheriffName.Size      = new Size(200, 40);
            this.sheriffName.Color     = ARGBColors.Black;
            this.sheriffName.Font      = FontManager.GetFont("Arial", 12f, FontStyle.Bold);
            this.sheriffName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT;
            this.windowImage.addControl(this.sheriffName);
            this.goldValue.Text      = "";
            this.goldValue.Position  = new Point(170, 0x42);
            this.goldValue.Size      = new Size(200, 40);
            this.goldValue.Color     = ARGBColors.Black;
            this.goldValue.Font      = FontManager.GetFont("Arial", 12f, FontStyle.Bold);
            this.goldValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT;
            this.windowImage.addControl(this.goldValue);
            this.taxValue.Text      = "";
            this.taxValue.Position  = new Point(170, 0x6a);
            this.taxValue.Size      = new Size(200, 40);
            this.taxValue.Color     = ARGBColors.Black;
            this.taxValue.Font      = FontManager.GetFont("Arial", 12f, FontStyle.Bold);
            this.taxValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT;
            this.windowImage.addControl(this.taxValue);
            this.activityLabel.Text      = SK.Text("WALL_recent_activity", "Recent Activity");
            this.activityLabel.Position  = new Point(8, -16);
            this.activityLabel.Size      = new Size(0x184, 40);
            this.activityLabel.Color     = ARGBColors.Black;
            this.activityLabel.Font      = FontManager.GetFont("Arial", 12f, FontStyle.Bold);
            this.activityLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.BOTTOM_CENTER;
            this.backgroundImage.addControl(this.activityLabel);
            this.wallInfoImage.Size     = new Size(0x18c, height - 80);
            this.wallInfoImage.Position = new Point(8, 0x1d);
            this.backgroundImage.addControl(this.wallInfoImage);
            this.wallInfoImage.Create((Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_right, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_right, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_right);
            this.wallScrollArea.Position = new Point(15, 15);
            this.wallScrollArea.Size     = new Size(0x151, height - 0x65);
            this.wallScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x151, height - 0x65));
            this.wallInfoImage.addControl(this.wallScrollArea);
            int num1 = this.wallScrollBar.Value;

            this.wallScrollBar.Visible  = false;
            this.wallScrollBar.Position = new Point(0x166, 15);
            this.wallScrollBar.Size     = new Size(0x18, height - 0x65);
            this.wallInfoImage.addControl(this.wallScrollBar);
            this.wallScrollBar.Value           = 0;
            this.wallScrollBar.Max             = 100;
            this.wallScrollBar.NumVisibleLines = 0x19;
            this.wallScrollBar.Create(null, null, null, (Image)GFXLibrary._24wide_thumb_top, (Image)GFXLibrary._24wide_thumb_middle, (Image)GFXLibrary._24wide_thumb_bottom);
            this.wallScrollBar.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.wallScrollBarMoved));
            StoredProvinceInfo info = (StoredProvinceInfo)this.provinceList[provinceID];
            bool flag = false;

            if (info != null)
            {
                TimeSpan span = (TimeSpan)(DateTime.Now - info.m_lastUpdateTime);
                if ((span.TotalMinutes <= 2.0) && (info.lastReturnData != null))
                {
                    goto Label_08B9;
                }
            }
            flag = true;
Label_08B9:
            this.m_currentVillage = villageID;
            if (this.currentProvince != provinceID)
            {
                this.currentLeaderID   = -1;
                this.currentLeaderName = "";
                this.m_userIDOnCurrent = -1;
            }
            this.currentProvince = provinceID;
            if (flag)
            {
                RemoteServices.Instance.set_GetProvinceFrontPageInfo_UserCallBack(new RemoteServices.GetProvinceFrontPageInfo_UserCallBack(this.getProvinceFrontPageInfoCallback));
                RemoteServices.Instance.GetProvinceFrontPageInfo(this.m_currentVillage);
            }
            this.updateLeaderInfo();
            if (!flag)
            {
                this.getProvinceFrontPageInfoCallback(info.lastReturnData);
            }
            this.btnChat.ImageNorm      = (Image)GFXLibrary.misc_button_blue_210wide_normal;
            this.btnChat.ImageOver      = (Image)GFXLibrary.misc_button_blue_210wide_over;
            this.btnChat.ImageClick     = (Image)GFXLibrary.misc_button_blue_210wide_pushed;
            this.btnChat.Position       = new Point(base.Width - 230, base.Height - 90);
            this.btnChat.Text.Text      = SK.Text("GENERIC_Chat", "Chat");
            this.btnChat.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
            this.btnChat.Text.Font      = FontManager.GetFont("Arial", 9f, FontStyle.Bold);
            this.btnChat.TextYOffset    = -3;
            this.btnChat.Text.Color     = ARGBColors.Black;
            this.btnChat.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.chatClick), "ProvinceFrontPagePanel2_chat");
            this.backgroundImage.addControl(this.btnChat);
        }
Exemple #5
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 init(bool resized)
        {
            int villageID = InterfaceMgr.Instance.getSelectedMenuVillage();

            this.m_currentVillage = villageID;
            int provinceID = GameEngine.Instance.World.getProvinceFromVillageID(villageID);
            int height     = base.Height;

            instance = this;
            base.clearControls();
            this.headerImage.Size     = new Size(base.Width, 40);
            this.headerImage.Position = new Point(0, 0);
            base.addControl(this.headerImage);
            this.headerImage.Create((Image)GFXLibrary.mail2_titlebar_left, (Image)GFXLibrary.mail2_titlebar_middle, (Image)GFXLibrary.mail2_titlebar_right);
            this.backgroundImage.Size     = new Size(base.Width, height - 40);
            this.backgroundImage.Position = new Point(0, 40);
            base.addControl(this.backgroundImage);
            this.backgroundImage.Create((Image)GFXLibrary.mail2_mail_panel_upper_left, (Image)GFXLibrary.mail2_mail_panel_upper_middle, (Image)GFXLibrary.mail2_mail_panel_upper_right, (Image)GFXLibrary.mail2_mail_panel_middle_left, (Image)GFXLibrary.mail2_mail_panel_middle_middle, (Image)GFXLibrary.mail2_mail_panel_middle_right, (Image)GFXLibrary.mail2_mail_panel_lower_left, (Image)GFXLibrary.mail2_mail_panel_lower_middle, (Image)GFXLibrary.mail2_mail_panel_lower_right);
            CustomSelfDrawPanel.WikiLinkControl.init(this.backgroundImage, 15, new Point(base.Width - 0x2c, 3));
            this.headerLabelsImage.Size     = new Size((base.Width - 0x19) - 0x17, 0x1c);
            this.headerLabelsImage.Position = new Point(0x19, 0x81);
            this.backgroundImage.addControl(this.headerLabelsImage);
            this.headerLabelsImage.Create((Image)GFXLibrary.mail2_field_bar_mail_left, (Image)GFXLibrary.mail2_field_bar_mail_middle, (Image)GFXLibrary.mail2_field_bar_mail_right);
            this.divider1Image.Image    = (Image)GFXLibrary.mail2_field_bar_mail_divider;
            this.divider1Image.Position = new Point(0x5f, 0);
            this.headerLabelsImage.addControl(this.divider1Image);
            this.divider2Image.Image    = (Image)GFXLibrary.mail2_field_bar_mail_divider;
            this.divider2Image.Position = new Point(0x16e, 0);
            this.headerLabelsImage.addControl(this.divider2Image);
            this.divider3Image.Image    = (Image)GFXLibrary.mail2_field_bar_mail_divider;
            this.divider3Image.Position = new Point(0x273, 0);
            this.headerLabelsImage.addControl(this.divider3Image);
            this.parishNameLabel.Text            = GameEngine.Instance.World.getVillageName(this.m_currentVillage) + " (" + GameEngine.Instance.World.getProvinceName(provinceID) + ")";
            this.parishNameLabel.Color           = ARGBColors.White;
            this.parishNameLabel.DropShadowColor = ARGBColors.Black;
            this.parishNameLabel.Position        = new Point(20, 0);
            this.parishNameLabel.Size            = new Size(base.Width - 40, 40);
            this.parishNameLabel.Font            = FontManager.GetFont("Arial", 18f, FontStyle.Regular);
            this.parishNameLabel.Alignment       = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
            this.headerImage.addControl(this.parishNameLabel);
            this.illustrationImage.Image    = (Image)GFXLibrary.parishwall_village_illlustration_03;
            this.illustrationImage.Position = new Point(0x11, 5);
            this.backgroundImage.addControl(this.illustrationImage);
            this.stewardLabel.Text      = SK.Text("ParishWallPanel_Governor", "Governor") + " : ";
            this.stewardLabel.Color     = ARGBColors.Black;
            this.stewardLabel.Position  = new Point(5, 5);
            this.stewardLabel.Size      = new Size(this.illustrationImage.Width - 6, 30);
            this.stewardLabel.Font      = FontManager.GetFont("Arial", 12f, FontStyle.Regular);
            this.stewardLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
            this.illustrationImage.addControl(this.stewardLabel);
            this.proclamationButton.ImageNorm      = (Image)GFXLibrary.misc_button_blue_210wide_normal;
            this.proclamationButton.ImageOver      = (Image)GFXLibrary.misc_button_blue_210wide_over;
            this.proclamationButton.ImageClick     = (Image)GFXLibrary.misc_button_blue_210wide_pushed;
            this.proclamationButton.Position       = new Point(base.Width - 220, 7);
            this.proclamationButton.Text.Text      = SK.Text("Capitials_Proclamation", "Send Proclamation");
            this.proclamationButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
            this.proclamationButton.Text.Font      = FontManager.GetFont("Arial", 9f, FontStyle.Bold);
            this.proclamationButton.TextYOffset    = -3;
            this.proclamationButton.Text.Color     = ARGBColors.Black;
            this.proclamationButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sendProclamation));
            this.proclamationButton.Visible         = false;
            this.proclamationButton.CustomTooltipID = 0x106a;
            this.headerImage.addControl(this.proclamationButton);
            this.proclamationLabel.Text            = "";
            this.proclamationLabel.Color           = ARGBColors.White;
            this.proclamationLabel.DropShadowColor = ARGBColors.Black;
            this.proclamationLabel.Position        = new Point(20, 0);
            this.proclamationLabel.Size            = new Size((base.Width - 40) - 220, 40);
            this.proclamationLabel.Font            = FontManager.GetFont("Arial", 8f, FontStyle.Regular);
            this.proclamationLabel.Alignment       = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT;
            this.proclamationLabel.Visible         = false;
            this.headerImage.addControl(this.proclamationLabel);
            this.wallInfoImage.Size     = new Size(440, 0x55);
            this.wallInfoImage.Position = new Point(460, 20);
            this.backgroundImage.addControl(this.wallInfoImage);
            this.wallInfoImage.Create((Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_upper_right, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_middle_right, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_left, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_middle, (Image)GFXLibrary.mail2_rounded_rectangle_tan_bottom_right);
            this.wallScrollArea.Position = new Point(0x19, 0x9e);
            this.wallScrollArea.Size     = new Size(0x393, height - 0xd4);
            this.wallScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x393, height - 0xd4));
            this.backgroundImage.addControl(this.wallScrollArea);
            int num1 = this.wallScrollBar.Value;

            this.wallScrollBar.Position = new Point(0x3af, 0x9e);
            this.wallScrollBar.Size     = new Size(0x18, height - 0xd4);
            this.backgroundImage.addControl(this.wallScrollBar);
            this.wallScrollBar.Value           = 0;
            this.wallScrollBar.Max             = 100;
            this.wallScrollBar.NumVisibleLines = 0x19;
            this.wallScrollBar.Create(null, null, null, (Image)GFXLibrary._24wide_thumb_top, (Image)GFXLibrary._24wide_thumb_middle, (Image)GFXLibrary._24wide_thumb_bottom);
            this.wallScrollBar.setValueChangeDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ValueChangedDelegate(this.wallScrollBarMoved));
            this.votesAvailableLabel.Text      = SK.Text("GENERIC_Votes_Available", "Votes Available") + " :";
            this.votesAvailableLabel.Color     = ARGBColors.Black;
            this.votesAvailableLabel.Position  = new Point(0x1f, 0x1b);
            this.votesAvailableLabel.Size      = new Size(300, 40);
            this.votesAvailableLabel.Font      = FontManager.GetFont("Arial", 18f, FontStyle.Regular);
            this.votesAvailableLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
            this.wallInfoImage.addControl(this.votesAvailableLabel);
            this.votesAvailableLabelValue.Text      = "0";
            this.votesAvailableLabelValue.Color     = ARGBColors.Black;
            this.votesAvailableLabelValue.Position  = new Point(0x133, 0x1b);
            this.votesAvailableLabelValue.Size      = new Size(100, 40);
            this.votesAvailableLabelValue.Font      = FontManager.GetFont("Arial", 18f, FontStyle.Regular);
            this.votesAvailableLabelValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT;
            this.votesAvailableLabelValue.Visible   = true;
            this.wallInfoImage.addControl(this.votesAvailableLabelValue);
            if (GameEngine.Instance.World.SecondAgeWorld)
            {
                this.votesAvailableLabel.Position      = new Point(0x1f, 12);
                this.votesAvailableLabelValue.Position = new Point(0x133, 12);
                this.voteCapLabel.Text      = SK.Text("ParishPanel_Current_Vote_cap", "Current Vote Cap") + " :";
                this.voteCapLabel.Color     = ARGBColors.Black;
                this.voteCapLabel.Position  = new Point(0x1f, 0x2a);
                this.voteCapLabel.Size      = new Size(300, 40);
                this.voteCapLabel.Font      = FontManager.GetFont("Arial", 18f, FontStyle.Regular);
                this.voteCapLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
                this.voteCapLabel.Visible   = true;
                this.wallInfoImage.addControl(this.voteCapLabel);
                this.voteCapLabelValue.Text      = "0";
                this.voteCapLabelValue.Color     = ARGBColors.Black;
                this.voteCapLabelValue.Position  = new Point(0x133, 0x2a);
                this.voteCapLabelValue.Size      = new Size(100, 40);
                this.voteCapLabelValue.Font      = FontManager.GetFont("Arial", 18f, FontStyle.Regular);
                this.voteCapLabelValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT;
                this.voteCapLabelValue.Visible   = true;
                this.wallInfoImage.addControl(this.voteCapLabelValue);
            }
            this.voteLabel.Text      = SK.Text("GENERIC_Vote", "Vote");
            this.voteLabel.Color     = ARGBColors.Black;
            this.voteLabel.Position  = new Point(15, -2);
            this.voteLabel.Size      = new Size(0x51, this.headerLabelsImage.Height);
            this.voteLabel.Font      = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
            this.voteLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
            this.headerLabelsImage.addControl(this.voteLabel);
            this.eligibleLabel.Text      = SK.Text("GENERIC_Eligible_Candidates", "Eligible Candidates");
            this.eligibleLabel.Color     = ARGBColors.Black;
            this.eligibleLabel.Position  = new Point(0x6a, -2);
            this.eligibleLabel.Size      = new Size(250, this.headerLabelsImage.Height);
            this.eligibleLabel.Font      = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
            this.eligibleLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
            this.headerLabelsImage.addControl(this.eligibleLabel);
            this.FactionsLabel.Text      = SK.Text("STATS_CATEGORY_TITLE_FACTION", "Faction");
            this.FactionsLabel.Color     = ARGBColors.Black;
            this.FactionsLabel.Position  = new Point(0x178, -2);
            this.FactionsLabel.Size      = new Size(0xf7, this.headerLabelsImage.Height);
            this.FactionsLabel.Font      = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
            this.FactionsLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
            this.headerLabelsImage.addControl(this.FactionsLabel);
            this.votesReceivedLabel.Text      = SK.Text("GENERIC_Votes_Received", "Votes Received");
            this.votesReceivedLabel.Color     = ARGBColors.Black;
            this.votesReceivedLabel.Position  = new Point(0x27b, -2);
            this.votesReceivedLabel.Size      = new Size(300, this.headerLabelsImage.Height);
            this.votesReceivedLabel.Font      = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
            this.votesReceivedLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
            this.headerLabelsImage.addControl(this.votesReceivedLabel);
            if (resized)
            {
                this.addPlayers();
                return;
            }
            StoredProvinceInfo info = (StoredProvinceInfo)this.provinceList[provinceID];
            bool flag = false;

            if (info != null)
            {
                TimeSpan span = (TimeSpan)(DateTime.Now - info.m_lastUpdateTime);
                if ((span.TotalMinutes <= 2.0) && (info.lastReturnData != null))
                {
                    goto Label_0CCD;
                }
            }
            flag = true;
Label_0CCD:
            this.m_currentVillage = villageID;
            if (this.currentProvince != provinceID)
            {
                this.provinceMembers.Clear();
                this.currentLeaderID   = -1;
                this.electedLeaderID   = -1;
                this.currentLeaderName = "";
                this.electedLeaderName = "";
                this.m_userIDOnCurrent = -1;
            }
            this.currentProvince = provinceID;
            if (flag)
            {
                RemoteServices.Instance.set_GetProvinceElectionInfo_UserCallBack(new RemoteServices.GetProvinceElectionInfo_UserCallBack(this.getProvinceElectionInfoCallback));
                RemoteServices.Instance.GetProvinceElectionInfo(this.m_currentVillage);
            }
            this.nextElectionTime = DateTime.MinValue;
            this.votingAllowed    = false;
            this.addPlayers();
            if (!flag)
            {
                this.getProvinceElectionInfoCallback(info.lastReturnData);
            }
        }