Exemplo n.º 1
0
 public void init(bool resized)
 {
     int height = base.Height;
     NumberFormatInfo nFI = GameEngine.NFI;
     instance = this;
     this.inHouseVote = false;
     base.clearControls();
     if (GameEngine.Instance.World.testGloryPointsUpdate())
     {
         RemoteServices.Instance.set_GetHouseGloryPoints_UserCallBack(new RemoteServices.GetHouseGloryPoints_UserCallBack(this.GetHouseGloryPointsCallBack));
         RemoteServices.Instance.GetHouseGloryPoints();
     }
     this.sidebar.addSideBar(8, this);
     HouseData data = null;
     try
     {
         data = GameEngine.Instance.World.HouseInfo[SelectedHouse];
         this.m_houseLeaderFactionID = data.leadingFactionID;
     }
     catch (Exception)
     {
         data = new HouseData();
         this.m_houseLeaderFactionID = -1;
     }
     this.mainBackgroundImage.FillColor = Color.FromArgb(0x86, 0x99, 0xa5);
     this.mainBackgroundImage.Position = new Point(0, 0);
     this.mainBackgroundImage.Size = new Size(base.Width - 200, height);
     base.addControl(this.mainBackgroundImage);
     this.backgroundFade.Image = (Image) GFXLibrary.background_top;
     this.backgroundFade.Position = new Point(0, 0);
     this.backgroundFade.Size = new Size(base.Width - 200, this.backgroundFade.Image.Height);
     this.mainBackgroundImage.addControl(this.backgroundFade);
     this.backImage1.Image = (Image) GFXLibrary.faction_tanback;
     this.backImage1.Position = new Point((this.mainBackgroundImage.Size.Width - this.backImage1.Size.Width) - 0x19, 12);
     this.mainBackgroundImage.addControl(this.backImage1);
     this.backImage2.Image = (Image) GFXLibrary.faction_title_band;
     this.backImage2.Position = new Point(20, 20);
     this.mainBackgroundImage.addControl(this.backImage2);
     this.barImage1.Image = (Image) GFXLibrary.faction_bar_tan_1_heavier;
     this.barImage1.Position = new Point(0xc9, 70);
     this.mainBackgroundImage.addControl(this.barImage1);
     this.barImage2.Image = (Image) GFXLibrary.faction_bar_tan_1_lighter;
     this.barImage2.Position = new Point(0xc9, 0x5e);
     this.mainBackgroundImage.addControl(this.barImage2);
     this.barImage3.Image = (Image) GFXLibrary.faction_bar_tan_1_heavier;
     this.barImage3.Position = new Point(0xc9, 0x76);
     this.mainBackgroundImage.addControl(this.barImage3);
     this.barImage4.Image = (Image) GFXLibrary.faction_bar_tan_2_heavier;
     this.barImage4.Position = new Point(460, 70);
     this.mainBackgroundImage.addControl(this.barImage4);
     this.barImage5.Image = (Image) GFXLibrary.faction_bar_tan_2_lighter;
     this.barImage5.Position = new Point(460, 0x5e);
     this.mainBackgroundImage.addControl(this.barImage5);
     this.barImage6.Image = (Image) GFXLibrary.faction_bar_tan_2_heavier;
     this.barImage6.Position = new Point(460, 0x76);
     this.mainBackgroundImage.addControl(this.barImage6);
     this.houseNameLabel.Text = SK.Text("STATS_CATEGORY_TITLE_HOUSE", "House") + " " + SelectedHouse.ToString();
     this.houseNameLabel.Color = ARGBColors.Black;
     this.houseNameLabel.Position = new Point(0xcd, 10);
     this.houseNameLabel.Size = new Size(600, 40);
     this.houseNameLabel.Font = FontManager.GetFont("Arial", 20f, FontStyle.Regular);
     this.houseNameLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
     this.mainBackgroundImage.addControl(this.houseNameLabel);
     this.houseMottoLabel.Text = "\"" + CustomTooltipManager.getHouseMotto(SelectedHouse) + "\"";
     this.houseMottoLabel.Color = ARGBColors.Black;
     this.houseMottoLabel.Position = new Point(0xcd, 0x29);
     this.houseMottoLabel.Size = new Size(600, 40);
     this.houseMottoLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular);
     this.houseMottoLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
     this.mainBackgroundImage.addControl(this.houseMottoLabel);
     this.houseImage.Image = (Image) GFXLibrary.house_circles_large[SelectedHouse - 1];
     this.houseImage.Position = new Point(0x20, 0x18);
     this.mainBackgroundImage.addControl(this.houseImage);
     this.data1Label.Text = SK.Text("GENERIC_Factions", "Factions");
     this.data1Label.Color = ARGBColors.Black;
     this.data1Label.Position = new Point(210, 0x49);
     this.data1Label.Size = new Size(600, 40);
     this.data1Label.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular);
     this.data1Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
     this.mainBackgroundImage.addControl(this.data1Label);
     if (SelectedHouse == 0)
     {
         this.data1LabelValue.Text = GameEngine.Instance.World.countHouseMembers(SelectedHouse).ToString("N", nFI);
     }
     else
     {
         this.data1LabelValue.Text = data.numFactions.ToString("N", nFI);
     }
     this.data1LabelValue.Color = ARGBColors.Black;
     this.data1LabelValue.Position = new Point(200, 0x49);
     this.data1LabelValue.Size = new Size(230, 40);
     this.data1LabelValue.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular);
     this.data1LabelValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT;
     this.mainBackgroundImage.addControl(this.data1LabelValue);
     this.data2Label.Text = SK.Text("FactionInvites_Total_Points", "Total Points");
     this.data2Label.Color = ARGBColors.Black;
     this.data2Label.Position = new Point(210, 0x61);
     this.data2Label.Size = new Size(600, 40);
     this.data2Label.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular);
     this.data2Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
     this.mainBackgroundImage.addControl(this.data2Label);
     this.data2LabelValue.Text = data.points.ToString("N", nFI);
     this.data2LabelValue.Color = ARGBColors.Black;
     this.data2LabelValue.Position = new Point(200, 0x61);
     this.data2LabelValue.Size = new Size(230, 40);
     this.data2LabelValue.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular);
     this.data2LabelValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT;
     this.mainBackgroundImage.addControl(this.data2LabelValue);
     this.data3Label.Text = SK.Text("FactionInvites_Members", "Members");
     this.data3Label.Color = ARGBColors.Black;
     this.data3Label.Position = new Point(210, 0x79);
     this.data3Label.Size = new Size(600, 40);
     this.data3Label.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular);
     this.data3Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
     this.mainBackgroundImage.addControl(this.data3Label);
     this.data3LabelValue.Text = GameEngine.Instance.World.getNumHouseMembers(SelectedHouse).ToString("N", nFI);
     this.data3LabelValue.Color = ARGBColors.Black;
     this.data3LabelValue.Position = new Point(200, 0x79);
     this.data3LabelValue.Size = new Size(230, 40);
     this.data3LabelValue.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular);
     this.data3LabelValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT;
     this.mainBackgroundImage.addControl(this.data3LabelValue);
     this.data4Label.Text = SK.Text("FactionInvites_Marshall", "Marshall");
     this.data4Label.Color = ARGBColors.Black;
     this.data4Label.Position = new Point(0x1d3, 0x49);
     this.data4Label.Size = new Size(600, 40);
     this.data4Label.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular);
     this.data4Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
     this.mainBackgroundImage.addControl(this.data4Label);
     this.data4LabelValue.Text = data.leaderUserName;
     this.data4LabelValue.Color = ARGBColors.Black;
     this.data4LabelValue.Position = new Point(0x205, 0x49);
     this.data4LabelValue.Size = new Size(230, 40);
     this.data4LabelValue.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular);
     this.data4LabelValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT;
     this.mainBackgroundImage.addControl(this.data4LabelValue);
     this.data5Label.Text = SK.Text("STATS_CATEGORY_TITLE_FACTION", "Faction");
     this.data5Label.Color = ARGBColors.Black;
     this.data5Label.Position = new Point(0x1d3, 0x61);
     this.data5Label.Size = new Size(600, 40);
     this.data5Label.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular);
     this.data5Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
     this.mainBackgroundImage.addControl(this.data5Label);
     this.data5LabelValue.Text = "";
     if (data.leadingFactionID >= 0)
     {
         FactionData data2 = GameEngine.Instance.World.getFaction(data.leadingFactionID);
         if (data2 != null)
         {
             this.data5LabelValue.Text = data2.factionName;
         }
     }
     this.data5LabelValue.Color = ARGBColors.Black;
     this.data5LabelValue.Position = new Point(0x205, 0x4b);
     this.data5LabelValue.Size = new Size(230, 60);
     this.data5LabelValue.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular);
     this.data5LabelValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT;
     this.mainBackgroundImage.addControl(this.data5LabelValue);
     int num2 = GameEngine.Instance.World.getGloryRank(SelectedHouse);
     if (num2 >= 0)
     {
         this.gloryImage.Image = (Image) GFXLibrary.glory_frame;
         this.gloryImage.Position = new Point(490, 10);
         this.mainBackgroundImage.addControl(this.gloryImage);
         this.data6Label.Text = SK.Text("FactionInvites_Glory_Rank", "Glory Rank");
         this.data6Label.Color = ARGBColors.Black;
         this.data6Label.Position = new Point(0x1f9, 0x1b);
         this.data6Label.Size = new Size(600, 40);
         this.data6Label.Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold);
         this.data6Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
         this.mainBackgroundImage.addControl(this.data6Label);
         this.data6LabelValue.Text = (num2 + 1).ToString("N", nFI);
         this.data6LabelValue.Color = ARGBColors.Black;
         this.data6LabelValue.Position = new Point(0x2b6, 0x1b);
         this.data6LabelValue.Size = new Size(0x1d, 40);
         this.data6LabelValue.Font = FontManager.GetFont("Arial", 14f, FontStyle.Bold);
         this.data6LabelValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER;
         this.mainBackgroundImage.addControl(this.data6LabelValue);
     }
     this.data7Label.Text = SK.Text("FactionInvites_Glory Victories", "Glory Victories");
     this.data7Label.Color = ARGBColors.Black;
     this.data7Label.Position = new Point(0x1d3, 0x79);
     this.data7Label.Size = new Size(600, 40);
     this.data7Label.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular);
     this.data7Label.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
     this.mainBackgroundImage.addControl(this.data7Label);
     this.data7LabelValue.Text = data.numVictories.ToString("N", nFI);
     this.data7LabelValue.Color = ARGBColors.Black;
     this.data7LabelValue.Position = new Point(0x205, 0x79);
     this.data7LabelValue.Size = new Size(230, 40);
     this.data7LabelValue.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular);
     this.data7LabelValue.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT;
     this.mainBackgroundImage.addControl(this.data7LabelValue);
     this.headerLabelsImage.Size = new Size(((base.Width - 0x19) - 0x17) - 200, 0x1c);
     this.headerLabelsImage.Position = new Point(0x19, 0x9f);
     this.mainBackgroundImage.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(290, 0);
     this.headerLabelsImage.addControl(this.divider1Image);
     this.divider2Image.Image = (Image) GFXLibrary.mail2_field_bar_mail_divider;
     this.divider2Image.Position = new Point(440, 0);
     this.headerLabelsImage.addControl(this.divider2Image);
     this.factionLabel.Text = SK.Text("STATS_CATEGORY_TITLE_FACTION", "Faction");
     this.factionLabel.Color = ARGBColors.Black;
     this.factionLabel.Position = new Point(9, -2);
     this.factionLabel.Size = new Size(0x143, this.headerLabelsImage.Height);
     this.factionLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
     this.factionLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
     this.headerLabelsImage.addControl(this.factionLabel);
     this.pointsLabel.Text = SK.Text("FactionsPanel_Points", "Points");
     this.pointsLabel.Color = ARGBColors.Black;
     this.pointsLabel.Position = new Point(0x127, -2);
     this.pointsLabel.Size = new Size(140, this.headerLabelsImage.Height);
     this.pointsLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
     this.pointsLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
     this.headerLabelsImage.addControl(this.pointsLabel);
     InterfaceMgr.Instance.setVillageHeading(SK.Text("STATS_CATEGORY_TITLE_HOUSE", "House") + " " + SelectedHouse.ToString());
     FactionData yourFaction = GameEngine.Instance.World.YourFaction;
     int index = 0;
     if (yourFaction != null)
     {
         index = yourFaction.houseID;
     }
     bool flag = false;
     int num4 = GameEngine.Instance.World.getYourFactionRank();
     if ((index != 0) && (index == SelectedHouse))
     {
         this.leaderVisited();
         if ((GameEngine.Instance.World.HouseVoteInfo != null) && (GameEngine.Instance.World.HouseVoteInfo.appliedToHouseID > 0))
         {
             int appliedToHouseID = GameEngine.Instance.World.HouseVoteInfo.appliedToHouseID;
         }
         switch (num4)
         {
             case 1:
                 this.leaveHouseButton.ImageNorm = (Image) GFXLibrary.misc_button_blue_210wide_normal;
                 this.leaveHouseButton.ImageOver = (Image) GFXLibrary.misc_button_blue_210wide_over;
                 this.leaveHouseButton.ImageClick = (Image) GFXLibrary.misc_button_blue_210wide_pushed;
                 this.leaveHouseButton.Position = new Point(560, height - 30);
                 this.leaveHouseButton.Text.Text = SK.Text("FactionsPanel_Leave_House", "Leave House");
                 this.leaveHouseButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold);
                 this.leaveHouseButton.TextYOffset = -3;
                 this.leaveHouseButton.Text.Color = ARGBColors.Black;
                 this.leaveHouseButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.leaveHouseClick), "HouseInfoPanel_leave");
                 this.mainBackgroundImage.addControl(this.leaveHouseButton);
                 flag = true;
                 break;
             // TODO: case 1 должен включать case 2
             // case 1:
             case 2:
             {
                 string str = "";
                 TimeSpan span = (TimeSpan) (VillageMap.getCurrentServerTime() - yourFaction.lastHouseDate);
                 if ((span.TotalDays < 1.0) && (VillageMap.getCurrentServerTime().Day == yourFaction.lastHouseDate.Day))
                 {
                     str = SK.Text("FactionsPanel_Today", "Today");
                 }
                 else if ((span.TotalDays < 2.0) && (VillageMap.getCurrentServerTime().Day == yourFaction.lastHouseDate.AddDays(1.0).Day))
                 {
                     str = SK.Text("FactionsPanel_Yesterday", "Yesterday");
                 }
                 else
                 {
                     int totalDays = (int) span.TotalDays;
                     if (totalDays < 2)
                     {
                         totalDays = 2;
                     }
                     str = totalDays.ToString() + " " + SK.Text("FactionsPanel_X_Days_Ago", "Days ago");
                 }
                 this.lastVisitLabel.Text = SK.Text("FactionsPanel_Last_General_Visit", "Last General Visit") + " : " + str;
                 this.lastVisitLabel.Color = ARGBColors.Black;
                 this.lastVisitLabel.Position = new Point(10, height - 0x19);
                 this.lastVisitLabel.Size = new Size(400, 40);
                 this.lastVisitLabel.Font = FontManager.GetFont("Arial", 10f, FontStyle.Regular);
                 this.lastVisitLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
                 this.mainBackgroundImage.addControl(this.lastVisitLabel);
                 flag = true;
                 break;
             }
         }
         this.divider3Image.Image = (Image) GFXLibrary.mail2_field_bar_mail_divider;
         this.divider3Image.Position = new Point(610, 0);
         this.headerLabelsImage.addControl(this.divider3Image);
         this.membershipVoteLabel.Text = SK.Text("FactionsPanel_Membership_Vote", "Membership Vote");
         this.membershipVoteLabel.Color = ARGBColors.Black;
         this.membershipVoteLabel.Position = new Point(0x1bd, -2);
         this.membershipVoteLabel.Size = new Size(160, this.headerLabelsImage.Height);
         this.membershipVoteLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
         this.membershipVoteLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
         this.headerLabelsImage.addControl(this.membershipVoteLabel);
         this.leadershipVoteLabel.Text = SK.Text("FactionsPanel_Leadership_Vote", "Leadership Vote");
         this.leadershipVoteLabel.Color = ARGBColors.Black;
         this.leadershipVoteLabel.Position = new Point(0x253, -2);
         this.leadershipVoteLabel.Size = new Size(160, this.headerLabelsImage.Height);
         this.leadershipVoteLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
         this.leadershipVoteLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
         this.headerLabelsImage.addControl(this.leadershipVoteLabel);
         if ((GameEngine.Instance.World.getYourHouseRank() == 10) && (num4 == 1))
         {
             this.sendProclamationButton.ImageNorm = (Image) GFXLibrary.misc_button_blue_210wide_normal;
             this.sendProclamationButton.ImageOver = (Image) GFXLibrary.misc_button_blue_210wide_over;
             this.sendProclamationButton.ImageClick = (Image) GFXLibrary.misc_button_blue_210wide_pushed;
             this.sendProclamationButton.Position = new Point(330, height - 30);
             this.sendProclamationButton.Text.Text = SK.Text("Capitials_Proclamation", "Send Proclamation");
             this.sendProclamationButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold);
             this.sendProclamationButton.TextYOffset = -3;
             this.sendProclamationButton.Text.Color = ARGBColors.Black;
             this.sendProclamationButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.sendProclamation), "HouseInfoPanel_sendProclamation");
             this.mainBackgroundImage.addControl(this.sendProclamationButton);
             DateTime lastProclomationDate = GameEngine.Instance.World.HouseInfo[index].lastProclomationDate;
             TimeSpan span2 = (TimeSpan) (VillageMap.getCurrentServerTime() - lastProclomationDate);
             this.nextProclamationLabel.Text = SK.Text("FactionsPanel_Next_Proclamation_Time", "Next proclamation available in") + " : ";
             this.nextProclamationLabel.Color = ARGBColors.White;
             this.nextProclamationLabel.Position = new Point(330, height - 0x20);
             this.nextProclamationLabel.Size = new Size(160, this.headerLabelsImage.Height);
             this.nextProclamationLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold);
             this.nextProclamationLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
             this.mainBackgroundImage.addControl(this.nextProclamationLabel);
             if (span2.TotalDays >= 1.0)
             {
                 this.sendProclamationButton.Enabled = true;
                 this.sendProclamationButton.Visible = true;
                 this.nextProclamationLabel.Visible = false;
             }
             else
             {
                 TimeSpan span3 = TimeSpan.FromDays(1.0) - span2;
                 this.sendProclamationButton.Enabled = false;
                 this.sendProclamationButton.Visible = false;
                 this.nextProclamationLabel.Text = this.nextProclamationLabel.Text + TimeSpan.FromSeconds((double) ((((span3.Hours * 60) * 60) + (span3.Minutes * 60)) + span3.Seconds)).ToString();
                 this.nextProclamationLabel.Visible = true;
             }
         }
     }
     else if (index > 0)
     {
         bool flag2 = false;
         if ((num4 == 1) && (GameEngine.Instance.World.getYourHouseRank() == 10))
         {
             flag2 = true;
         }
         if (flag2)
         {
             this.diplomacyButton.ImageNorm = (Image) GFXLibrary.misc_button_blue_210wide_normal;
             this.diplomacyButton.ImageOver = (Image) GFXLibrary.misc_button_blue_210wide_over;
             this.diplomacyButton.ImageClick = (Image) GFXLibrary.misc_button_blue_210wide_pushed;
             this.diplomacyButton.Position = new Point(0x22f, height - 30);
             this.diplomacyButton.Text.Text = "";
             this.diplomacyButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
             this.diplomacyButton.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Bold);
             this.diplomacyButton.TextYOffset = -3;
             this.diplomacyButton.Text.Color = ARGBColors.Black;
             this.diplomacyButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.diplomacyClicked), "HouseInfoPanel_diplomacy");
             this.mainBackgroundImage.addControl(this.diplomacyButton);
             flag = true;
         }
         else
         {
             this.diplomacyLabel.Text = "";
             this.diplomacyLabel.Color = ARGBColors.Black;
             this.diplomacyLabel.Position = new Point(520, height - 0x19);
             this.diplomacyLabel.Size = new Size(240, 40);
             this.diplomacyLabel.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular);
             this.diplomacyLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_RIGHT;
             this.mainBackgroundImage.addControl(this.diplomacyLabel);
             flag = true;
         }
     }
     this.wallScrollArea.Position = new Point(0x19, 0xbc);
     if (flag)
     {
         this.wallScrollArea.Size = new Size(0x2c1, height - 240);
         this.wallScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x2c1, height - 240));
     }
     else
     {
         this.wallScrollArea.Size = new Size(0x2c1, height - 0xbc);
         this.wallScrollArea.ClipRect = new Rectangle(new Point(0, 0), new Size(0x2c1, height - 0xbc));
     }
     this.mainBackgroundImage.addControl(this.wallScrollArea);
     this.mouseWheelOverlay.Position = this.wallScrollArea.Position;
     this.mouseWheelOverlay.Size = this.wallScrollArea.Size;
     this.mouseWheelOverlay.setMouseWheelDelegate(new CustomSelfDrawPanel.CSDControl.CSD_MouseWheelDelegate(this.mouseWheelMoved));
     this.mainBackgroundImage.addControl(this.mouseWheelOverlay);
     int num11 = this.wallScrollBar.Value;
     this.wallScrollBar.Position = new Point(0x2dd, 0xbc);
     if (flag)
     {
         this.wallScrollBar.Size = new Size(0x18, height - 240);
     }
     else
     {
         this.wallScrollBar.Size = new Size(0x18, height - 0xbc);
     }
     this.mainBackgroundImage.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.addFactions();
 }
Exemplo n.º 2
0
 public void init(FactionData factionData, int position, HouseInfoPanel parent)
 {
     this.m_parent = parent;
     this.m_position = position;
     this.m_factionData = factionData;
     this.m_application = false;
     this.clearControls();
     if ((position & 1) == 0)
     {
         this.backgroundImage.Image = (Image) GFXLibrary.lineitem_strip_02_light;
     }
     else
     {
         this.backgroundImage.Image = (Image) GFXLibrary.lineitem_strip_02_dark;
     }
     this.backgroundImage.Position = new Point(60, 0);
     base.addControl(this.backgroundImage);
     this.Size = this.backgroundImage.Size;
     this.flagImage.createFromFlagData(factionData.flagData);
     this.flagImage.Position = new Point(0, 0);
     this.flagImage.Scale = 0.25;
     this.flagImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine));
     base.addControl(this.flagImage);
     NumberFormatInfo nFI = GameEngine.NFI;
     this.factionName.Text = factionData.factionName;
     this.factionName.Color = ARGBColors.Black;
     this.factionName.Position = new Point(9, 0);
     this.factionName.Size = new Size(220, this.backgroundImage.Height);
     this.factionName.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
     this.factionName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
     this.factionName.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine));
     this.backgroundImage.addControl(this.factionName);
     this.pointsLabel.Text = factionData.points.ToString("N", nFI);
     this.pointsLabel.Color = ARGBColors.Black;
     this.pointsLabel.Position = new Point(0xeb, 0);
     this.pointsLabel.Size = new Size(100, this.backgroundImage.Height);
     this.pointsLabel.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
     this.pointsLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT;
     this.pointsLabel.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine));
     this.backgroundImage.addControl(this.pointsLabel);
     base.invalidate();
 }