public override void init(IDockableControl parent, Size size, object back) { base.init(parent, size, back); this.valuesPanel = new ReportBattleValuesPanel(this, new Size((base.btnClose.X - base.btnForward.Rectangle.Right) - 4, 200)); this.valuesPanel.Position = new Point(base.btnForward.Rectangle.Right + 2, base.Height - this.valuesPanel.Height); string header = SK.Text("GENERIC_Reinforcements", "Reinforcements"); this.valuesPanel.init(header, false, true); if (base.imgBackground.Image != null) { base.imgBackground.addControl(this.valuesPanel); } else { base.addControl(this.valuesPanel); } }
public override void init(IDockableControl parent, Size size, object back) { base.init(parent, size, back); this.btnViewBattle.ImageNorm = (Image) GFXLibrary.button_132_normal; this.btnViewBattle.ImageOver = (Image) GFXLibrary.button_132_over; this.btnViewBattle.ImageClick = (Image) GFXLibrary.button_132_in; this.btnViewBattle.setSizeToImage(); this.btnViewBattle.Position = new Point((base.Width / 2) - (this.btnViewBattle.Width / 2), base.btnClose.Y); this.btnViewBattle.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.btnViewBattle.TextYOffset = -2; this.btnViewBattle.Text.Color = ARGBColors.Black; this.btnViewBattle.Enabled = true; this.btnViewBattle.Visible = true; this.btnViewBattle.Text.Text = SK.Text("Reports_View_Battle", "View Battle"); this.btnViewBattle.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.viewBattleClick), "Reports_View_Battle"); this.btnViewResult.ImageNorm = (Image) GFXLibrary.button_132_normal; this.btnViewResult.ImageOver = (Image) GFXLibrary.button_132_over; this.btnViewResult.ImageClick = (Image) GFXLibrary.button_132_in; this.btnViewResult.setSizeToImage(); this.btnViewResult.Position = new Point((base.Width / 2) - (this.btnViewResult.Width / 2), base.btnDelete.Y); this.btnViewResult.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.btnViewResult.TextYOffset = -2; this.btnViewResult.Text.Color = ARGBColors.Black; this.btnViewResult.Enabled = true; this.btnViewResult.Visible = true; this.btnViewResult.Text.Text = SK.Text("Reports_View_Reports", "View Result"); this.btnViewResult.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.viewResultClick), "Reports_View_Result"); this.btnShowResources.ImageNorm = (Image) GFXLibrary.button_132_normal; this.btnShowResources.ImageOver = (Image) GFXLibrary.button_132_over; this.btnShowResources.ImageClick = (Image) GFXLibrary.button_132_in; this.btnShowResources.setSizeToImage(); this.btnShowResources.Position = new Point((base.Width / 2) - (this.btnViewResult.Width / 2), base.btnDelete.Y); this.btnShowResources.Text.Font = FontManager.GetFont("Arial", 9f, FontStyle.Regular); this.btnShowResources.TextYOffset = -2; this.btnShowResources.Text.Color = ARGBColors.Black; this.btnShowResources.Enabled = true; this.btnShowResources.Visible = false; this.btnShowResources.Text.Text = SK.Text("Reports_Show_Resources", "Show Resources"); this.btnShowResources.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.showResourcesClick), "Reports_Show_Resources"); base.btnUtility.Text.Text = SK.Text("Reports_Show_On_Map", "Show On Map"); base.btnUtility.Visible = true; this.lblResult.Text = ""; this.lblResult.Color = ARGBColors.Black; this.lblResult.Font = FontManager.GetFont("Arial", 14f, FontStyle.Regular); this.lblResult.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.lblResult.Position = new Point(0, base.lblSecondaryText.Rectangle.Bottom); this.lblResult.Size = new Size(base.Width, 0x1a); base.lblDate.Y = this.lblResult.Rectangle.Bottom; string header = SK.Text("GENERIC_Attackers", "Attackers"); this.attackerValuesPanel = new ReportBattleValuesPanel(this, new Size((base.btnClose.X - base.btnForward.Rectangle.Right) - 4, 180)); this.attackerValuesPanel.Position = new Point(base.btnForward.X, base.lblDate.Rectangle.Bottom); this.attackerValuesPanel.init(header, true, true); header = SK.Text("GENERIC_Defenders", "Defenders"); this.defenderValuesPanel = new ReportBattleValuesPanel(this, new Size((base.btnClose.X - base.btnForward.Rectangle.Right) - 4, 180)); this.defenderValuesPanel.Position = new Point((base.btnClose.Rectangle.Right - 2) - this.defenderValuesPanel.Width, base.lblDate.Rectangle.Bottom); this.defenderValuesPanel.init(header, true, false); this.lblSpoils.Text = ""; this.lblSpoils.Color = ARGBColors.Black; this.lblSpoils.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblSpoils.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.lblSpoils.Position = new Point(0, this.attackerValuesPanel.Rectangle.Bottom); this.lblSpoils.Size = new Size(base.Width, 0x1a); this.lblTargetVillageInfo.Text = ""; this.lblTargetVillageInfo.Color = ARGBColors.Black; this.lblTargetVillageInfo.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblTargetVillageInfo.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.lblTargetVillageInfo.Position = new Point(0, this.lblSpoils.Rectangle.Bottom); this.lblTargetVillageInfo.Size = new Size(base.Width, 0x1a); this.lblHonour.Text = ""; this.lblHonour.Color = ARGBColors.Black; this.lblHonour.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblHonour.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.lblHonour.Position = new Point(0, this.lblTargetVillageInfo.Rectangle.Bottom); this.lblHonour.Size = new Size(base.Width, 0x1a); this.lblFlagCaptured.Text = ""; this.lblFlagCaptured.Color = ARGBColors.Black; this.lblFlagCaptured.Font = FontManager.GetFont("Arial", 12f, FontStyle.Regular); this.lblFlagCaptured.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER; this.lblFlagCaptured.Position = new Point(0, this.lblHonour.Rectangle.Bottom); this.lblFlagCaptured.Size = new Size(base.Width, 0x1a); this.resourcesPanel.Size = this.attackerValuesPanel.Size; this.resourcesPanel.Width *= 2; this.resourcesPanel.Position = this.attackerValuesPanel.Position; this.resourcesPanel.X = (base.Width / 2) - (this.resourcesPanel.Width / 2); this.resourcesPanel.init(); this.resourcesPanel.Visible = false; if (base.imgBackground.Image != null) { base.imgBackground.addControl(this.attackerValuesPanel); base.imgBackground.addControl(this.defenderValuesPanel); base.imgBackground.addControl(this.btnViewBattle); base.imgBackground.addControl(this.btnViewResult); base.imgBackground.addControl(this.btnShowResources); base.imgBackground.addControl(this.lblResult); base.imgBackground.addControl(this.lblSpoils); base.imgBackground.addControl(this.lblTargetVillageInfo); base.imgBackground.addControl(this.lblHonour); base.imgBackground.addControl(this.lblFlagCaptured); base.imgBackground.addControl(this.resourcesPanel); } else { base.addControl(this.attackerValuesPanel); base.addControl(this.defenderValuesPanel); base.addControl(this.btnViewBattle); base.addControl(this.btnViewResult); base.addControl(this.btnShowResources); base.addControl(this.lblResult); base.addControl(this.lblSpoils); base.addControl(this.lblTargetVillageInfo); base.addControl(this.lblHonour); base.addControl(this.lblFlagCaptured); base.addControl(this.resourcesPanel); } }