public bool update(double localTime)
            {
                if (this.btnCancel.Visible)
                {
                    if (this.m_army.localEndTime == 0.0)
                    {
                        return(false);
                    }
                    if ((this.m_army.localStartTime + (GameEngine.Instance.LocalWorldData.AttackCancelDuration * 60)) < localTime)
                    {
                        return(false);
                    }
                }
                else
                {
                    WorldMap.LocalArmyData data = GameEngine.Instance.World.getArmy(this.m_armyID);
                    if ((data == null) || (data.lootType != this.m_origLoot))
                    {
                        return(false);
                    }
                }
                DateTime time     = VillageMap.getCurrentServerTime();
                TimeSpan span     = (TimeSpan)(this.m_arrivalTime - time);
                int      secsLeft = (int)(span.TotalSeconds + 0.5);

                if (secsLeft < 1)
                {
                    secsLeft = 0;
                }
                this.lblArrivalTime.Text = VillageMap.createBuildTimeString(secsLeft);
                return(true);
            }
Exemplo n.º 2
0
 public bool showReinforcements(WorldMap.LocalArmyData army)
 {
     if (this.FilterActive && (InterfaceMgr.Instance.WorldMapMode == 0))
     {
         return(false);
     }
     return(true);
 }
Exemplo n.º 3
0
        public bool showArmy(WorldMap.LocalArmyData army)
        {
            WorldMap.VillageData data;
            if (!this.FilterActive || (InterfaceMgr.Instance.WorldMapMode != 0))
            {
                return(true);
            }
            switch (this.filterMode)
            {
            case 6:
                if (!GameEngine.Instance.World.isAttackingArmy(army.armyID))
                {
                    goto Label_00F2;
                }
                return(true);

            case 8:
                if (army.lootType >= 0)
                {
                    goto Label_00F2;
                }
                data = GameEngine.Instance.World.getVillageData(army.targetVillageID);
                if (data == null)
                {
                    goto Label_00F2;
                }
                switch (data.special)
                {
                case 3:
                case 5:
                case 7:
                case 9:
                case 11:
                case 13:
                case 15:
                case 0x11:
                    return(true);
                }
                break;

            case 3:
                if (!GameEngine.Instance.World.isForagingArmy(army.armyID))
                {
                    goto Label_00F2;
                }
                return(true);

            default:
                goto Label_00F2;
            }
            if (SpecialVillageTypes.IS_TREASURE_CASTLE(data.special))
            {
                return(true);
            }
Label_00F2:
            return(false);
        }
Exemplo n.º 4
0
 public long showArmy(long armyID)
 {
     if (!this.FilterActive || (InterfaceMgr.Instance.WorldMapMode != 0))
     {
         return(armyID);
     }
     WorldMap.LocalArmyData army = GameEngine.Instance.World.getArmy(armyID);
     if ((army != null) && this.showArmy(army))
     {
         return(armyID);
     }
     return(-1L);
 }
Exemplo n.º 5
0
 public long showReinforcements(long reinfID)
 {
     if (!this.FilterActive || (InterfaceMgr.Instance.WorldMapMode != 0))
     {
         return(reinfID);
     }
     WorldMap.LocalArmyData army = GameEngine.Instance.World.getReinforcement(reinfID);
     if ((army != null) && this.showReinforcements(army))
     {
         return(reinfID);
     }
     return(-1L);
 }
 public void reinforcementSelected(long reinforcementID)
 {
     WorldMap.LocalArmyData data = GameEngine.Instance.World.getReinforcement(reinforcementID);
     if (data != null)
     {
         this.selectedReinforcementID = reinforcementID;
         this.m_reinforcements        = data;
         this.lastState = -2;
         this.update();
     }
     else
     {
         InterfaceMgr.Instance.closeReinforcementSelectedPanel();
         this.m_reinforcements = null;
     }
 }
Exemplo n.º 7
0
 public void armySelected(long armyID)
 {
     WorldMap.LocalArmyData data = GameEngine.Instance.World.getArmy(armyID);
     if (data != null)
     {
         this.selectedArmyID = armyID;
         this.m_army         = data;
         this.lastState      = -2;
         this.update();
     }
     else
     {
         InterfaceMgr.Instance.closeArmySelectedPanel();
         this.m_army = null;
     }
 }
 public void armySelected(long armyID)
 {
     WorldMap.LocalArmyData data = GameEngine.Instance.World.getArmy(armyID);
     if (data != null)
     {
         this.selectedArmyID = armyID;
         this.m_army = data;
         this.lastState = -2;
         this.update();
     }
     else
     {
         InterfaceMgr.Instance.closeArmySelectedPanel();
         this.m_army = null;
     }
 }
 public void update()
 {
     this.backGround.update();
     this.m_reinforcements = GameEngine.Instance.World.getReinforcement(this.selectedReinforcementID);
     if (this.m_reinforcements != null)
     {
         if (this.m_reinforcements.dead)
         {
             this.m_reinforcements = null;
             InterfaceMgr.Instance.closeReinforcementSelectedPanel();
         }
         else
         {
             if (this.m_reinforcements.attackType != this.lastState)
             {
                 this.backGround.updateTravelButton(this.homeVillageButton, this.m_reinforcements.homeVillageID);
                 this.backGround.updateTravelButton(this.targetVillageButton, this.m_reinforcements.targetVillageID);
                 this.fromVillageID = this.m_reinforcements.homeVillageID;
                 this.toVillageID = this.m_reinforcements.targetVillageID;
                 this.lastState = this.m_reinforcements.attackType;
                 if (this.lastState == 20)
                 {
                     this.travelDirection.Image = (Image) GFXLibrary.mrhp_travelling_arrows[0];
                     if (GameEngine.Instance.World.isUserVillage(this.m_reinforcements.homeVillageID))
                     {
                         this.returnButton.Visible = true;
                     }
                     else
                     {
                         this.returnButton.Visible = false;
                     }
                     if (GameEngine.Instance.World.isUserVillage(this.m_reinforcements.homeVillageID))
                     {
                         this.returnButton.Text.TextDiffOnly = SK.Text("SelectArmyPanel_Retrieve", "Retrieve");
                     }
                     else
                     {
                         this.returnButton.Text.TextDiffOnly = SK.Text("SelectArmyPanel_Return", "Return");
                     }
                 }
                 else
                 {
                     this.travelDirection.Image = (Image) GFXLibrary.mrhp_travelling_arrows[1];
                     this.returnButton.Visible = false;
                 }
             }
             double num = DXTimer.GetCurrentMilliseconds() / 1000.0;
             double num2 = this.m_reinforcements.localEndTime - num;
             if (num2 < 0.0)
             {
                 this.backGround.updateSubHeading("");
             }
             else
             {
                 string subHeading = VillageMap.createBuildTimeString((int) num2);
                 this.backGround.updateSubHeading(subHeading);
             }
         }
     }
     else
     {
         InterfaceMgr.Instance.closeReinforcementSelectedPanel();
     }
 }
 public void reinforcementSelected(long reinforcementID)
 {
     WorldMap.LocalArmyData data = GameEngine.Instance.World.getReinforcement(reinforcementID);
     if (data != null)
     {
         this.selectedReinforcementID = reinforcementID;
         this.m_reinforcements = data;
         this.lastState = -2;
         this.update();
     }
     else
     {
         InterfaceMgr.Instance.closeReinforcementSelectedPanel();
         this.m_reinforcements = null;
     }
 }
 public void update()
 {
     this.backGround.update();
     this.m_reinforcements = GameEngine.Instance.World.getReinforcement(this.selectedReinforcementID);
     if (this.m_reinforcements != null)
     {
         if (this.m_reinforcements.dead)
         {
             this.m_reinforcements = null;
             InterfaceMgr.Instance.closeReinforcementSelectedPanel();
         }
         else
         {
             if (this.m_reinforcements.attackType != this.lastState)
             {
                 this.backGround.updateTravelButton(this.homeVillageButton, this.m_reinforcements.homeVillageID);
                 this.backGround.updateTravelButton(this.targetVillageButton, this.m_reinforcements.targetVillageID);
                 this.fromVillageID = this.m_reinforcements.homeVillageID;
                 this.toVillageID   = this.m_reinforcements.targetVillageID;
                 this.lastState     = this.m_reinforcements.attackType;
                 if (this.lastState == 20)
                 {
                     this.travelDirection.Image = (Image)GFXLibrary.mrhp_travelling_arrows[0];
                     if (GameEngine.Instance.World.isUserVillage(this.m_reinforcements.homeVillageID))
                     {
                         this.returnButton.Visible = true;
                     }
                     else
                     {
                         this.returnButton.Visible = false;
                     }
                     if (GameEngine.Instance.World.isUserVillage(this.m_reinforcements.homeVillageID))
                     {
                         this.returnButton.Text.TextDiffOnly = SK.Text("SelectArmyPanel_Retrieve", "Retrieve");
                     }
                     else
                     {
                         this.returnButton.Text.TextDiffOnly = SK.Text("SelectArmyPanel_Return", "Return");
                     }
                 }
                 else
                 {
                     this.travelDirection.Image = (Image)GFXLibrary.mrhp_travelling_arrows[1];
                     this.returnButton.Visible  = false;
                 }
             }
             double num  = DXTimer.GetCurrentMilliseconds() / 1000.0;
             double num2 = this.m_reinforcements.localEndTime - num;
             if (num2 < 0.0)
             {
                 this.backGround.updateSubHeading("");
             }
             else
             {
                 string subHeading = VillageMap.createBuildTimeString((int)num2);
                 this.backGround.updateSubHeading(subHeading);
             }
         }
     }
     else
     {
         InterfaceMgr.Instance.closeReinforcementSelectedPanel();
     }
 }
Exemplo n.º 12
0
 public void update()
 {
     this.backGround.update();
     this.m_army = GameEngine.Instance.World.getArmy(this.selectedArmyID);
     if (this.m_army == null)
     {
         InterfaceMgr.Instance.closeArmySelectedPanel();
     }
     else if (this.m_army.dead)
     {
         this.m_army = null;
         InterfaceMgr.Instance.closeArmySelectedPanel();
     }
     else
     {
         double num  = DXTimer.GetCurrentMilliseconds() / 1000.0;
         double num2 = this.m_army.localEndTime - num;
         if (num2 < 0.0)
         {
             num2 = 0.0;
         }
         string subHeading = VillageMap.createBuildTimeString((int)num2);
         if ((!GameEngine.Instance.World.isUserVillage(this.m_army.homeVillageID) || ((((this.m_army.localStartTime + (GameEngine.Instance.LocalWorldData.AttackCancelDuration * 60)) < num) && !this.m_army.isScouts()) && !this.targetIsAI(this.m_army.targetVillageID))) || ((this.m_army.lootType >= 0) || this.forceReturnOff))
         {
             this.returnButton.Visible = false;
         }
         else
         {
             this.returnButton.Visible = true;
         }
         if (this.m_army.lootType != this.lastState)
         {
             bool flag = false;
             if ((this.m_army.attackType == 30) || (this.m_army.attackType == 0x1f))
             {
                 this.backGround.updateHeading(SK.Text("SelectArmyPanel_Troops", "Troops"));
                 this.backGround.updatePanelType(0x3e8);
             }
             else if (this.m_army.attackType == 0x11)
             {
                 this.backGround.updateHeading(SK.Text("GENERIC_Invasion", "Invasion"));
                 this.backGround.updatePanelType(0x3e8);
             }
             else if (!this.m_army.isScouts())
             {
                 this.backGround.updateHeading(SK.Text("SelectArmyPanel_Army", "Army"));
                 this.backGround.updatePanelType(0x3e8);
             }
             else
             {
                 flag = true;
                 this.backGround.updatePanelType(0x3ea);
                 this.backGround.updateHeading(SK.Text("SelectArmyPanel_Scouts", "Scouts"));
             }
             this.lastState = this.m_army.lootType;
             if (this.lastState >= 0)
             {
                 this.travelDirection.Image = (Image)GFXLibrary.mrhp_travelling_arrows[1];
                 this.backGround.updatePanelText(SK.Text("SelectArmyPanel_Returning", "Returning"));
                 if (this.m_army.attackType != 13)
                 {
                     this.backGround.updateTravelButton(this.homeVillageButton, this.m_army.travelFromVillageID);
                 }
                 else
                 {
                     this.backGround.updateTravelButton(this.homeVillageButton, SK.Text("SelectArmyPanel_Tutorial", "Tutorial"));
                 }
                 this.backGround.updateTravelButton(this.targetVillageButton, this.m_army.targetVillageID);
                 if (flag && (this.homeVillageButton.Text.Text.Length == 0))
                 {
                     this.backGround.updateTravelButton(this.targetVillageButton, SK.Text("GENERIC_Unknown", "Unknown"));
                 }
                 this.fromVillageID        = this.m_army.travelFromVillageID;
                 this.toVillageID          = this.m_army.targetVillageID;
                 this.returnButton.Visible = false;
             }
             else
             {
                 this.travelDirection.Image = (Image)GFXLibrary.mrhp_travelling_arrows[0];
                 if ((this.m_army.attackType == 30) || (this.m_army.attackType == 0x1f))
                 {
                     this.backGround.updatePanelText(SK.Text("SelectArmyPanel_Stationing", "Stationing"));
                 }
                 else if (flag)
                 {
                     this.backGround.updatePanelText(SK.Text("SelectArmyPanel_Scouting", "Scouting"));
                 }
                 else if (!GameEngine.Instance.LocalWorldData.AIWorld || (this.m_army.attackType != 0x11))
                 {
                     this.backGround.updatePanelText(SK.Text("GENERIC_Attacking", "Attacking"));
                 }
                 else
                 {
                     bool flag2   = false;
                     int  special = GameEngine.Instance.World.getVillageData(this.m_army.travelFromVillageID).special;
                     int  num4    = GameEngine.Instance.World.getVillageData(this.m_army.targetVillageID).special;
                     if (special == 30)
                     {
                         switch (num4)
                         {
                         case 7:
                         case 8:
                         case 9:
                         case 10:
                         case 11:
                         case 12:
                         case 13:
                         case 14:
                             this.backGround.updatePanelText(SK.Text("BARRACKS_Reinforcing", "Reinforcing"));
                             flag2 = true;
                             break;
                         }
                     }
                     if (!flag2)
                     {
                         this.backGround.updatePanelText(SK.Text("GENERIC_Attacking", "Attacking"));
                     }
                 }
                 if (this.m_army.attackType != 13)
                 {
                     this.backGround.updateTravelButton(this.homeVillageButton, this.m_army.travelFromVillageID);
                 }
                 else
                 {
                     this.backGround.updateTravelButton(this.homeVillageButton, SK.Text("SelectArmyPanel_Tutorial", "Tutorial"));
                 }
                 this.backGround.updateTravelButton(this.targetVillageButton, this.m_army.targetVillageID);
                 if (flag && (this.homeVillageButton.Text.Text.Length == 0))
                 {
                     this.backGround.updateTravelButton(this.targetVillageButton, SK.Text("GENERIC_Unknown", "Unknown"));
                 }
                 this.fromVillageID = this.m_army.travelFromVillageID;
                 this.toVillageID   = this.m_army.targetVillageID;
             }
         }
         this.backGround.updateSubHeading(subHeading);
     }
 }
Exemplo n.º 13
0
 public void update()
 {
     this.backGround.update();
     this.m_army = GameEngine.Instance.World.getArmy(this.selectedArmyID);
     if (this.m_army == null)
     {
         InterfaceMgr.Instance.closeArmySelectedPanel();
     }
     else if (this.m_army.dead)
     {
         this.m_army = null;
         InterfaceMgr.Instance.closeArmySelectedPanel();
     }
     else
     {
         double num = DXTimer.GetCurrentMilliseconds() / 1000.0;
         double num2 = this.m_army.localEndTime - num;
         if (num2 < 0.0)
         {
             num2 = 0.0;
         }
         string subHeading = VillageMap.createBuildTimeString((int) num2);
         if ((!GameEngine.Instance.World.isUserVillage(this.m_army.homeVillageID) || ((((this.m_army.localStartTime + (GameEngine.Instance.LocalWorldData.AttackCancelDuration * 60)) < num) && !this.m_army.isScouts()) && !this.targetIsAI(this.m_army.targetVillageID))) || ((this.m_army.lootType >= 0) || this.forceReturnOff))
         {
             this.returnButton.Visible = false;
         }
         else
         {
             this.returnButton.Visible = true;
         }
         if (this.m_army.lootType != this.lastState)
         {
             bool flag = false;
             if ((this.m_army.attackType == 30) || (this.m_army.attackType == 0x1f))
             {
                 this.backGround.updateHeading(SK.Text("SelectArmyPanel_Troops", "Troops"));
                 this.backGround.updatePanelType(0x3e8);
             }
             else if (this.m_army.attackType == 0x11)
             {
                 this.backGround.updateHeading(SK.Text("GENERIC_Invasion", "Invasion"));
                 this.backGround.updatePanelType(0x3e8);
             }
             else if (!this.m_army.isScouts())
             {
                 this.backGround.updateHeading(SK.Text("SelectArmyPanel_Army", "Army"));
                 this.backGround.updatePanelType(0x3e8);
             }
             else
             {
                 flag = true;
                 this.backGround.updatePanelType(0x3ea);
                 this.backGround.updateHeading(SK.Text("SelectArmyPanel_Scouts", "Scouts"));
             }
             this.lastState = this.m_army.lootType;
             if (this.lastState >= 0)
             {
                 this.travelDirection.Image = (Image) GFXLibrary.mrhp_travelling_arrows[1];
                 this.backGround.updatePanelText(SK.Text("SelectArmyPanel_Returning", "Returning"));
                 if (this.m_army.attackType != 13)
                 {
                     this.backGround.updateTravelButton(this.homeVillageButton, this.m_army.travelFromVillageID);
                 }
                 else
                 {
                     this.backGround.updateTravelButton(this.homeVillageButton, SK.Text("SelectArmyPanel_Tutorial", "Tutorial"));
                 }
                 this.backGround.updateTravelButton(this.targetVillageButton, this.m_army.targetVillageID);
                 if (flag && (this.homeVillageButton.Text.Text.Length == 0))
                 {
                     this.backGround.updateTravelButton(this.targetVillageButton, SK.Text("GENERIC_Unknown", "Unknown"));
                 }
                 this.fromVillageID = this.m_army.travelFromVillageID;
                 this.toVillageID = this.m_army.targetVillageID;
                 this.returnButton.Visible = false;
             }
             else
             {
                 this.travelDirection.Image = (Image) GFXLibrary.mrhp_travelling_arrows[0];
                 if ((this.m_army.attackType == 30) || (this.m_army.attackType == 0x1f))
                 {
                     this.backGround.updatePanelText(SK.Text("SelectArmyPanel_Stationing", "Stationing"));
                 }
                 else if (flag)
                 {
                     this.backGround.updatePanelText(SK.Text("SelectArmyPanel_Scouting", "Scouting"));
                 }
                 else if (!GameEngine.Instance.LocalWorldData.AIWorld || (this.m_army.attackType != 0x11))
                 {
                     this.backGround.updatePanelText(SK.Text("GENERIC_Attacking", "Attacking"));
                 }
                 else
                 {
                     bool flag2 = false;
                     int special = GameEngine.Instance.World.getVillageData(this.m_army.travelFromVillageID).special;
                     int num4 = GameEngine.Instance.World.getVillageData(this.m_army.targetVillageID).special;
                     if (special == 30)
                     {
                         switch (num4)
                         {
                             case 7:
                             case 8:
                             case 9:
                             case 10:
                             case 11:
                             case 12:
                             case 13:
                             case 14:
                                 this.backGround.updatePanelText(SK.Text("BARRACKS_Reinforcing", "Reinforcing"));
                                 flag2 = true;
                                 break;
                         }
                     }
                     if (!flag2)
                     {
                         this.backGround.updatePanelText(SK.Text("GENERIC_Attacking", "Attacking"));
                     }
                 }
                 if (this.m_army.attackType != 13)
                 {
                     this.backGround.updateTravelButton(this.homeVillageButton, this.m_army.travelFromVillageID);
                 }
                 else
                 {
                     this.backGround.updateTravelButton(this.homeVillageButton, SK.Text("SelectArmyPanel_Tutorial", "Tutorial"));
                 }
                 this.backGround.updateTravelButton(this.targetVillageButton, this.m_army.targetVillageID);
                 if (flag && (this.homeVillageButton.Text.Text.Length == 0))
                 {
                     this.backGround.updateTravelButton(this.targetVillageButton, SK.Text("GENERIC_Unknown", "Unknown"));
                 }
                 this.fromVillageID = this.m_army.travelFromVillageID;
                 this.toVillageID = this.m_army.targetVillageID;
             }
         }
         this.backGround.updateSubHeading(subHeading);
     }
 }
 private void initText(int position, int villageID, int numPeasants, int numArchers, int numPikemen, int numSwordsmen, int numCatapults, int numScouts, DateTime arrivalTime, long armyID, bool showButton, VillageArmiesPanel2 parent, bool returning, bool showTroops, bool tutorial, int attackType)
 {
     this.m_parent      = parent;
     this.m_position    = position;
     this.ClipVisible   = true;
     this.m_army        = GameEngine.Instance.World.getArmy(armyID);
     this.m_origLoot    = this.m_army.lootType;
     this.m_armyID      = armyID;
     this.m_villageID   = villageID;
     this.m_arrivalTime = arrivalTime;
     this.m_returning   = returning;
     this.clearControls();
     if ((position & 1) == 0)
     {
         this.backgroundImage.Image = (Image)GFXLibrary.brown_lineitem_strip_02_light;
     }
     else
     {
         this.backgroundImage.Image = (Image)GFXLibrary.brown_lineitem_strip_02_dark;
     }
     this.backgroundImage.Position = new Point(0, 0);
     base.addControl(this.backgroundImage);
     this.Size = this.backgroundImage.Size;
     if (!tutorial)
     {
         this.lblVillage.Text = GameEngine.Instance.World.getVillageNameOrType(villageID);
     }
     else
     {
         this.lblVillage.Text = SK.Text("GENERIC_TUTORIAL", "Tutorial");
     }
     this.lblVillage.Color         = ARGBColors.Black;
     this.lblVillage.RolloverColor = ARGBColors.White;
     this.lblVillage.Position      = new Point(9, 0);
     this.lblVillage.Size          = new Size(0xdf, this.backgroundImage.Height);
     this.lblVillage.Font          = FontManager.GetFont("Arial", 8.25f, FontStyle.Regular);
     this.lblVillage.Alignment     = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
     this.lblVillage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.lblVillage_Click), "VillageArmiesPanel2_village");
     this.backgroundImage.addControl(this.lblVillage);
     this.lblReturning.Text      = SK.Text("VillageArmySentLine_Returning", "Returning");
     this.lblReturning.Color     = ARGBColors.Black;
     this.lblReturning.Position  = new Point(0x335, 0);
     this.lblReturning.Size      = new Size(110, this.backgroundImage.Height);
     this.lblReturning.Font      = FontManager.GetFont("Arial", 8.25f, FontStyle.Regular);
     this.lblReturning.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
     this.backgroundImage.addControl(this.lblReturning);
     this.lblReturning.Visible = !showButton;
     if (!showButton)
     {
         if (this.m_returning)
         {
             this.lblReturning.Text = SK.Text("VillageArmySentLine_Returning", "Returning");
         }
         else
         {
             this.lblReturning.Text = SK.Text("GENERIC_Attacking", "Attacking");
         }
     }
     this.leftVillageID            = villageID;
     this.lblArrivalTime.Text      = "";
     this.lblArrivalTime.Color     = ARGBColors.Black;
     this.lblArrivalTime.Position  = new Point(0x2ab, 0);
     this.lblArrivalTime.Size      = new Size(0x72, this.backgroundImage.Height);
     this.lblArrivalTime.Font      = FontManager.GetFont("Arial", 8.25f, FontStyle.Regular);
     this.lblArrivalTime.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
     this.backgroundImage.addControl(this.lblArrivalTime);
     if (showTroops)
     {
         this.lblPeasants.Text      = numPeasants.ToString();
         this.lblPeasants.Color     = ARGBColors.Black;
         this.lblPeasants.Position  = new Point(0x131, 0);
         this.lblPeasants.Size      = new Size(0x37, this.backgroundImage.Height);
         this.lblPeasants.Font      = FontManager.GetFont("Arial", 8.25f, FontStyle.Regular);
         this.lblPeasants.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
         this.backgroundImage.addControl(this.lblPeasants);
         this.lblArchers.Text      = numArchers.ToString();
         this.lblArchers.Color     = ARGBColors.Black;
         this.lblArchers.Position  = new Point(0x16d, 0);
         this.lblArchers.Size      = new Size(0x37, this.backgroundImage.Height);
         this.lblArchers.Font      = FontManager.GetFont("Arial", 8.25f, FontStyle.Regular);
         this.lblArchers.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
         this.backgroundImage.addControl(this.lblArchers);
         this.lblPikemen.Text      = numPikemen.ToString();
         this.lblPikemen.Color     = ARGBColors.Black;
         this.lblPikemen.Position  = new Point(0x1a9, 0);
         this.lblPikemen.Size      = new Size(0x37, this.backgroundImage.Height);
         this.lblPikemen.Font      = FontManager.GetFont("Arial", 8.25f, FontStyle.Regular);
         this.lblPikemen.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
         this.backgroundImage.addControl(this.lblPikemen);
         this.lblSwordsmen.Text      = numSwordsmen.ToString();
         this.lblSwordsmen.Color     = ARGBColors.Black;
         this.lblSwordsmen.Position  = new Point(0x1e5, 0);
         this.lblSwordsmen.Size      = new Size(0x37, this.backgroundImage.Height);
         this.lblSwordsmen.Font      = FontManager.GetFont("Arial", 8.25f, FontStyle.Regular);
         this.lblSwordsmen.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
         this.backgroundImage.addControl(this.lblSwordsmen);
         this.lblCatapults.Text      = numCatapults.ToString();
         this.lblCatapults.Color     = ARGBColors.Black;
         this.lblCatapults.Position  = new Point(0x221, 0);
         this.lblCatapults.Size      = new Size(0x37, this.backgroundImage.Height);
         this.lblCatapults.Font      = FontManager.GetFont("Arial", 8.25f, FontStyle.Regular);
         this.lblCatapults.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
         this.backgroundImage.addControl(this.lblCatapults);
         this.lblScouts.Text      = numScouts.ToString();
         this.lblScouts.Color     = ARGBColors.Black;
         this.lblScouts.Position  = new Point(0x25d, 0);
         this.lblScouts.Size      = new Size(0x37, this.backgroundImage.Height);
         this.lblScouts.Font      = FontManager.GetFont("Arial", 8.25f, FontStyle.Regular);
         this.lblScouts.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
         this.backgroundImage.addControl(this.lblScouts);
     }
     if (attackType == 30)
     {
         this.lblPeasants.Text      = SK.Text("AllArmiesSentLine_Vassal_Support", "Vassal Support");
         this.lblPeasants.Color     = ARGBColors.Black;
         this.lblPeasants.Position  = new Point(0x131, 0);
         this.lblPeasants.Size      = new Size(250, this.backgroundImage.Height);
         this.lblPeasants.Font      = FontManager.GetFont("Arial", 8.25f, FontStyle.Regular);
         this.lblPeasants.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
         this.backgroundImage.addControl(this.lblPeasants);
     }
     if (attackType == 0x1f)
     {
         this.lblPeasants.Text      = SK.Text("AllArmiesSentLine_Capital_Support", "Capital Support");
         this.lblPeasants.Color     = ARGBColors.Black;
         this.lblPeasants.Position  = new Point(0x131, 0);
         this.lblPeasants.Size      = new Size(250, this.backgroundImage.Height);
         this.lblPeasants.Font      = FontManager.GetFont("Arial", 8.25f, FontStyle.Regular);
         this.lblPeasants.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
         this.backgroundImage.addControl(this.lblPeasants);
     }
     if (showButton)
     {
         this.btnCancel.ImageNorm      = (Image)GFXLibrary.brown_mail2_button_blue_141wide_normal;
         this.btnCancel.ImageOver      = (Image)GFXLibrary.brown_mail2_button_blue_141wide_over;
         this.btnCancel.ImageClick     = (Image)GFXLibrary.brown_mail2_button_blue_141wide_pushed;
         this.btnCancel.Position       = new Point(760, 3);
         this.btnCancel.Text.Text      = SK.Text("GENERIC_Cancel", "Cancel");
         this.btnCancel.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
         this.btnCancel.Text.Font      = FontManager.GetFont("Arial", 9f, FontStyle.Bold);
         this.btnCancel.TextYOffset    = -3;
         this.btnCancel.Text.Color     = ARGBColors.Black;
         this.btnCancel.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.cancelClick), "VillageArmiesPanel2_cancel");
         this.backgroundImage.addControl(this.btnCancel);
     }
     if (!this.update(DXTimer.GetCurrentMilliseconds() / 1000.0))
     {
         this.btnCancel.Visible = false;
     }
     base.invalidate();
 }