public void init(VillageReinforcementsPanel2 p, long reinforcementID, int totalPeasants, int totalArchers, int totalPikemen, int totalSwordsmen, int totalCatapults) { this.btnRetrieve.Text = SK.Text("ReinforcementsRetrieval_Retrieve", "Retrieve"); this.btnAll.Text = SK.Text("ReinforcementsRetrieval_Select_All", "Select All"); this.btnCancel.Text = SK.Text("GENERIC_Cancel", "Cancel"); this.label2.Text = SK.Text("GENERIC_Peasants", "Peasants"); this.label3.Text = SK.Text("GENERIC_Archers", "Archers"); this.label5.Text = SK.Text("GENERIC_Pikemen", "Pikemen"); this.label7.Text = SK.Text("GENERIC_Swordsmens", "Swordsmen"); this.label9.Text = SK.Text("GENERIC_Catapults", "Catapults"); base.Title = this.Text = SK.Text("ReinforcementsRetrieval_Retrieve_Reinforcements", "Retrieve Reinforcements"); this.parent = p; this.reinfID = reinforcementID; this.numPeasants = totalPeasants; this.numArchers = totalArchers; this.numPikemen = totalPikemen; this.numSwordsmen = totalSwordsmen; this.numCatapults = totalCatapults; this.drawing = false; this.tbPeasants.Value = 0; this.tbPeasants.Maximum = Math.Max(this.numPeasants, 0); this.tbPeasants.Value = this.tbPeasants.Maximum; this.tbArchers.Value = 0; this.tbArchers.Maximum = Math.Max(this.numArchers, 0); this.tbArchers.Value = this.tbArchers.Maximum; this.tbPikemen.Value = 0; this.tbPikemen.Maximum = Math.Max(this.numPikemen, 0); this.tbPikemen.Value = this.tbPikemen.Maximum; this.tbSwordsmen.Value = 0; this.tbSwordsmen.Maximum = Math.Max(this.numSwordsmen, 0); this.tbSwordsmen.Value = this.tbSwordsmen.Maximum; this.tbCatapults.Value = 0; this.tbCatapults.Maximum = Math.Max(this.numCatapults, 0); this.tbCatapults.Value = this.tbCatapults.Maximum; this.drawing = true; this.updateText(); }