コード例 #1
0
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (var tabpage in frm.MainTabEventCollectionTypes.TabPages.Cast <TabPage>().Where(tabpage => tabpage != frm.tabEventCollectionPurge))
            {
                frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionPurge))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionPurge);
            }

            if (StartTime != null || EndTime != null)
            {
                frm.lblPurgeTime.Text     = $"{StartTime} - {EndTime}";
                frm.lblPurgeDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblPurgeTime.Text     = "";
                frm.lblPurgeDuration.Text = "";
            }
            frm.lblPurgeOrdinal.Text   = Ordinal.ToString();
            frm.lblPurgeSite.Data      = Site;
            frm.lblPurgeAdjective.Text = Adjective;

            frm.lstPurgeEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstPurgeEvents.Items.AddRange(Event.ToArray());
            }

            SelectTab(frm);
        }
コード例 #2
0
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (var tabpage in frm.MainTabEventCollectionTypes.TabPages.Cast <TabPage>().Where(tabpage => tabpage != frm.tabEventCollectionAbduction))
            {
                frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionAbduction))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionAbduction);
            }

            frm.lblAbductionRegion.Data   = Subregion;
            frm.lblAbductionSite.Data     = Site;
            frm.lblAbductionCoords.Data   = new Coordinate(Coords);
            frm.lblAbductionAttacker.Data = AttackingEn;
            frm.lblAbductionDefender.Data = DefendingEn;
            frm.lblAbductionParent.Data   = ParentEventCol;
            if (StartTime != null || EndTime != null)
            {
                frm.lblAbductionTime.Text     = string.Format("{0} - {1}", StartTime, EndTime);
                frm.lblAbductionDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblAbductionTime.Text     = "";
                frm.lblAbductionDuration.Text = "";
            }
            frm.lblAbductionOrdinal.Text = Ordinal.ToString();

            frm.lstAbductionEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstAbductionEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpAbductionEvents.Visible = frm.lstAbductionEvents.Items.Count > 0;

            if (frm.lstAbductionEvents.Items.Count > 0)
            {
                frm.lstAbductionEvents.SelectedIndex = 0;
            }

            frm.lstAbductionEventCols.Items.Clear();
            if (EventCol != null)
            {
                frm.lstAbductionEventCols.Items.AddRange(EventCol.ToArray());
            }

            frm.grpAbductionEventCols.Visible = frm.lstAbductionEventCols.Items.Count > 0;

            SelectTab(frm);
        }
コード例 #3
0
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (var tabpage in frm.MainTabEventCollectionTypes.TabPages.Cast <TabPage>().Where(tabpage => tabpage != frm.tabEventCollectionTheft))
            {
                frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionTheft))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionTheft);
            }

            frm.lblTheftSite.Data     = Site;
            frm.lblTheftCoords.Data   = Site != null ? new Coordinate(Site.Coords) : null;
            frm.lblTheftAttacker.Data = AttackingEn;
            frm.lblTheftDefender.Data = DefendingEn;
            frm.lblTheftWar.Data      = WarEventCol;
            if (StartTime != null || EndTime != null)
            {
                frm.lblTheftTime.Text     = $"{StartTime} - {EndTime}";
                frm.lblTheftDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblTheftTime.Text     = "";
                frm.lblTheftDuration.Text = "";
            }
            frm.lblTheftOrdinal.Text = Ordinal.ToString();

            frm.lstTheftEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstTheftEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpTheftEvents.Visible = frm.lstTheftEvents.Items.Count > 0;

            if (frm.lstTheftEvents.Items.Count > 0)
            {
                frm.lstTheftEvents.SelectedIndex = 0;
            }

            frm.lstTheftEventCols.Items.Clear();
            if (EventCol != null)
            {
                frm.lstTheftEventCols.Items.AddRange(EventCol.ToArray());
            }

            frm.grpTheftEventCols.Visible = frm.lstTheftEventCols.Items.Count > 0;

            SelectTab(frm);
        }
コード例 #4
0
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (var tabpage in frm.MainTabEventCollectionTypes.TabPages.Cast <TabPage>().Where(tabpage => tabpage != frm.tabEventCollectionInsurrection))
            {
                frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionInsurrection))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionInsurrection);
            }


            frm.lblInsurrectionSite.Data   = Site;
            frm.lblInsurrectionParent.Data = ParentEventCol;

            frm.lblInsurrectionCoords.Data = new Coordinate(Site != null ? Site.Location : Point.Empty);

            if (StartTime != null || EndTime != null)
            {
                frm.lblInsurrectionTime.Text     = string.Format("{0} - {1}", StartTime, EndTime);
                frm.lblInsurrectionDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblInsurrectionTime.Text     = "";
                frm.lblInsurrectionDuration.Text = "";
            }
            frm.lblInsurrectionTargetEnt.Data = TargetEnt;

            frm.lblInsurrectionOutcome.Text = Outcome;

            frm.lblInsurrectionOrdinal.Text = Ordinal.ToString();

            frm.lstInsurrectionEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstInsurrectionEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpInsurrectionEvents.Visible = frm.lstInsurrectionEvents.Items.Count > 0;

            if (frm.lstInsurrectionEvents.Items.Count > 0)
            {
                frm.lstInsurrectionEvents.SelectedIndex = 0;
            }

            SelectTab(frm);
        }
コード例 #5
0
ファイル: EC_BeastAttack.cs プロジェクト: tier6tank/DFWV
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (TabPage tabpage in frm.MainTabEventCollectionTypes.TabPages)
            {
                if (tabpage != frm.tabEventCollectionBeastAttack)
                {
                    frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
                }
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionBeastAttack))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionBeastAttack);
            }

            frm.lblBeastAttackRegion.Data   = Subregion;
            frm.lblBeastAttackSite.Data     = Site;
            frm.lblBeastAttackCoords.Data   = new Coordinate(Coords);
            frm.lblBeastAttackDefender.Data = DefendingEn;
            frm.lblBeastAttackParent.Data   = ParentEventCol;
            frm.lblBeastAttackBeast.Data    = BeastHF;

            if (StartTime != null || EndTime != null)
            {
                frm.lblBeastAttackTime.Text     = StartTime.ToString() + " - " + EndTime.ToString();
                frm.lblBeastAttackDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblBeastAttackTime.Text     = "";
                frm.lblBeastAttackDuration.Text = "";
            }
            frm.lblBeastAttackOrdinal.Text = Ordinal.ToString();

            frm.lstBeastAttackEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstBeastAttackEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpBeastAttackEvents.Visible = frm.lstBeastAttackEvents.Items.Count > 0;

            if (frm.lstBeastAttackEvents.Items.Count > 0)
            {
                frm.lstBeastAttackEvents.SelectedIndex = 0;
            }

            base.SelectTab(frm);
        }
コード例 #6
0
ファイル: EC_Occasion.cs プロジェクト: tier6tank/DFWV
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (var tabpage in frm.MainTabEventCollectionTypes.TabPages.Cast <TabPage>().Where(tabpage => tabpage != frm.tabEventCollectionOccasion))
            {
                frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionOccasion))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionOccasion);
            }

            if (StartTime != null || EndTime != null)
            {
                frm.lblOccasionTime.Text     = $"{StartTime} - {EndTime}";
                frm.lblOccasionDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblOccasionTime.Text     = "";
                frm.lblOccasionDuration.Text = "";
            }
            frm.lblOccasionOrdinal.Text = Ordinal.ToString();
            frm.lblOccasionCiv.Data     = Civ;

            frm.lstOccasionEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstOccasionEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpOccasionEvents.Visible = frm.lstOccasionEvents.Items.Count > 0;

            if (frm.lstOccasionEvents.Items.Count > 0)
            {
                frm.lstOccasionEvents.SelectedIndex = 0;
            }

            frm.lstOccasionEventCols.Items.Clear();
            if (EventCol != null)
            {
                frm.lstOccasionEventCols.Items.AddRange(EventCol.ToArray());
            }

            frm.grpOccasionEventCols.Visible = frm.lstOccasionEventCols.Items.Count > 0;

            SelectTab(frm);
        }
コード例 #7
0
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (TabPage tabpage in frm.MainTabEventCollectionTypes.TabPages)
            {
                if (tabpage != frm.tabEventCollectionDuel)
                {
                    frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
                }
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionDuel))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionDuel);
            }

            frm.lblDuelRegion.Data   = Subregion;
            frm.lblDuelSite.Data     = Site;
            frm.lblDuelCoords.Data   = new Coordinate(Coords);
            frm.lblDuelAttacker.Data = AttackingHF != null ? AttackingHF[0] : null;
            frm.lblDuelDefender.Data = DefendingHF != null ? DefendingHF[0] : null;
            frm.lblDuelParent.Data   = ParentEventCol;
            if (StartTime != null || EndTime != null)
            {
                frm.lblDuelTime.Text     = StartTime.ToString() + " - " + EndTime.ToString();
                frm.lblDuelDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblDuelTime.Text     = "";
                frm.lblDuelDuration.Text = "";
            }
            frm.lblDuelOrdinal.Text = Ordinal.ToString();

            frm.lstDuelEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstDuelEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpDuelEvents.Visible = frm.lstDuelEvents.Items.Count > 0;

            if (frm.lstDuelEvents.Items.Count > 0)
            {
                frm.lstDuelEvents.SelectedIndex = 0;
            }

            base.SelectTab(frm);
        }
コード例 #8
0
ファイル: EC_SiteConquered.cs プロジェクト: tier6tank/DFWV
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (TabPage tabpage in frm.MainTabEventCollectionTypes.TabPages)
            {
                if (tabpage != frm.tabEventCollectionSiteConquered)
                {
                    frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
                }
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionSiteConquered))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionSiteConquered);
            }

            frm.lblSiteConqueredSite.Data     = Site;
            frm.lblSiteConqueredCoords.Data   = Site != null ? new Coordinate(Site.Coords) : null;
            frm.lblSiteConqueredAttacker.Data = AttackingEn;
            frm.lblSiteConqueredDefender.Data = DefendingEn;
            frm.lblSiteConqueredWar.Data      = WarEventCol;
            if (StartTime != null || EndTime != null)
            {
                frm.lblSiteConqueredTime.Text     = StartTime.ToString() + " - " + EndTime.ToString();
                frm.lblSiteConqueredDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblSiteConqueredTime.Text     = "";
                frm.lblSiteConqueredDuration.Text = "";
            }
            frm.lblSiteConqueredOrdinal.Text = Ordinal.ToString();

            frm.lstSiteConqueredEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstSiteConqueredEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpSiteConqueredEvents.Visible = frm.lstSiteConqueredEvents.Items.Count > 0;

            if (frm.lstSiteConqueredEvents.Items.Count > 0)
            {
                frm.lstSiteConqueredEvents.SelectedIndex = 0;
            }

            base.SelectTab(frm);
        }
コード例 #9
0
ファイル: EC_Journey.cs プロジェクト: tier6tank/DFWV
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (TabPage tabpage in frm.MainTabEventCollectionTypes.TabPages)
            {
                if (tabpage != frm.tabEventCollectionJourney)
                {
                    frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
                }
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionJourney))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionJourney);
            }

            if (StartTime != null || EndTime != null)
            {
                frm.lblJourneyTime.Text     = StartTime.ToString() + " - " + EndTime.ToString();
                frm.lblJourneyDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblJourneyTime.Text     = "";
                frm.lblJourneyDuration.Text = "";
            }
            frm.lblJourneyOrdinal.Text = Ordinal.ToString();

            frm.lstJourneyEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstJourneyEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpJourneyEvents.Visible = frm.lstJourneyEvents.Items.Count > 0;

            if (frm.lstJourneyEvents.Items.Count > 0)
            {
                frm.lstJourneyEvents.SelectedIndex = 0;
            }

            base.SelectTab(frm);
        }
コード例 #10
0
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (var tabpage in frm.MainTabEventCollectionTypes.TabPages.Cast <TabPage>().Where(tabpage => tabpage != frm.tabEventCollectionWar))
            {
                frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionWar))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionWar);
            }

            frm.lblWarName.Text = ToString();
            if (StartTime != null || EndTime != null)
            {
                frm.lblWarTime.Text     = string.Format("{0} - {1}", StartTime, (EndTime == WorldTime.Present ? "" : EndTime.ToString()));
                frm.lblWarDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblWarTime.Text     = "";
                frm.lblWarDuration.Text = "";
            }

            frm.lblWarAggressor.Data = AggressorEnt;
            frm.lblWarDefender.Data  = DefenderEnt;

            frm.lstWarEventCols.Items.Clear();
            if (EventCol != null)
            {
                frm.lstWarEventCols.Items.AddRange(EventCol.ToArray());
            }

            frm.grpWarEventCols.Visible = frm.lstWarEventCols.Items.Count > 0;

            frm.lstWarEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstWarEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpWarEvents.Visible = frm.lstWarEvents.Items.Count > 0;
            if (frm.lstWarEvents.Items.Count > 0)
            {
                frm.lstWarEvents.SelectedIndex = 0;
            }

            frm.lblWarAggressorCombatants.Text = WarData.AttackingNumber.ToString();
            if (WarData.AttackingHFs > 0)
            {
                frm.lblWarAggressorCombatants.Text += string.Format(" + {0} HFs", WarData.AttackingHFs);
            }
            frm.lblWarAggressorLosses.Text = WarData.AttackingDeaths.ToString();
            if (WarData.AttackingHFDeaths > 0)
            {
                frm.lblWarAggressorLosses.Text += string.Format(" + {0} HFs", WarData.AttackingHFDeaths);
            }

            frm.lblWarDefenderCombatants.Text = WarData.DefendingNumber.ToString();
            if (WarData.DefendingHFs > 0)
            {
                frm.lblWarDefenderCombatants.Text += string.Format(" + {0} HFs", WarData.DefendingHFs);
            }
            frm.lblWarDefenderLosses.Text = WarData.DefendingDeaths.ToString();
            if (WarData.DefendingHFDeaths > 0)
            {
                frm.lblWarDefenderLosses.Text += string.Format(" + {0} HFs", WarData.DefendingHFDeaths);
            }



            frm.lblWarAggressorSquads.Text = WarData.AttackingSquads.ToString();
            frm.lblWarAggressorWins.Text   = WarData.AttackingWins.ToString();

            frm.lblWarDefenderSquads.Text = WarData.DefendingSquads.ToString();
            frm.lblWarDefenderWins.Text   = WarData.DefendingWins.ToString();

            SelectTab(frm);
        }
コード例 #11
0
        public override void Select(MainForm frm)
        {
            base.Select(frm);

            foreach (var tabpage in frm.MainTabEventCollectionTypes.TabPages.Cast <TabPage>().Where(tabpage => tabpage != frm.tabEventCollectionBattle))
            {
                frm.MainTabEventCollectionTypes.TabPages.Remove(tabpage);
            }
            if (!frm.MainTabEventCollectionTypes.TabPages.Contains(frm.tabEventCollectionBattle))
            {
                frm.MainTabEventCollectionTypes.TabPages.Add(frm.tabEventCollectionBattle);
            }

            frm.lblBattleName.Text = ToString();
            if (StartTime != null || EndTime != null)
            {
                frm.lblBattleTime.Text     = $"{StartTime} - {EndTime}";
                frm.lblBattleDuration.Text = WorldTime.Duration(EndTime, StartTime);
            }
            else
            {
                frm.lblBattleTime.Text     = "";
                frm.lblBattleDuration.Text = "";
            }
            frm.lblBattleWar.Data    = WarEventCol;
            frm.lblBattleRegion.Data = Subregion;
            frm.lblBattleSite.Data   = Site;
            frm.lblBattleCoord.Data  = new Coordinate(Coords);

            frm.lblBattleAttackerCombatants.Text = BattleData.AttackingNumber.ToString();
            if (BattleData.AttackingHFs > 0)
            {
                frm.lblBattleAttackerCombatants.Text += $" + {BattleData.AttackingHFs} HFs";
            }
            frm.lblBattleAttackerLosses.Text = BattleData.AttackingDeaths.ToString();
            if (BattleData.AttackingHfDeaths > 0)
            {
                frm.lblBattleAttackerLosses.Text += $" + {BattleData.AttackingHfDeaths} HFs";
            }

            frm.lblBattleDefenderCombatants.Text = BattleData.DefendingNumber.ToString();
            if (BattleData.DefendingHFs > 0)
            {
                frm.lblBattleDefenderCombatants.Text += $" + {BattleData.DefendingHFs} HFs";
            }
            frm.lblBattleDefenderLosses.Text = BattleData.DefendingDeaths.ToString();
            if (BattleData.DefendingHfDeaths > 0)
            {
                frm.lblBattleDefenderLosses.Text += $" + {BattleData.DefendingHfDeaths} HFs";
            }



            if (Outcome == "attacker won")
            {
                frm.lblBattleAttackerOutcome.Text = @"Attacker Won";
                frm.lblBattleDefenderOutcome.Text = @"Defender Lost";
            }
            else
            {
                frm.lblBattleAttackerOutcome.Text = @"Attacker Lost";
                frm.lblBattleDefenderOutcome.Text = @"Defender Won";
            }
            frm.lstBattleAttackingHF.Items.Clear();
            frm.lstBattleAttackingHF.Tag = this;
            if (AttackingHf != null)
            {
                frm.lstBattleAttackingHF.Items.AddRange(AttackingHf.ToArray());
            }

            frm.grpBattleAttackingHF.Text = $"Historical Figures ({frm.lstBattleAttackingHF.Items.Count})";

            frm.lstBattleDefendingHF.Items.Clear();
            frm.lstBattleDefendingHF.Tag = this;
            if (DefendingHf != null)
            {
                frm.lstBattleDefendingHF.Items.AddRange(DefendingHf.ToArray());
            }

            frm.grpBattleDefendingHF.Text = $"Historical Figures ({frm.lstBattleDefendingHF.Items.Count})";

            frm.lstBattleAttackingSquad.Items.Clear();
            if (AttackingSquad != null)
            {
                frm.lstBattleAttackingSquad.Items.AddRange(AttackingSquad.ToArray());
            }

            if (frm.lstBattleAttackingSquad.Items.Count > 0)
            {
                frm.lstBattleAttackingSquad.SelectedIndex = 0;
            }
            else
            {
                frm.lblBattleAttackingSquadDeaths.Text = "";
                frm.lblBattleAttackingSquadEntPop.Data = null;
                frm.lblBattleAttackingSquadNumber.Text = "";
                frm.lblBattleAttackingSquadRace.Data   = null;
                frm.lblBattleAttackingSquadSite.Data   = null;
            }
            frm.grpBattleAttackingSquad.Text = $"Squads ({frm.lstBattleAttackingSquad.Items.Count})";


            frm.lstBattleDefendingSquad.Items.Clear();
            if (DefendingSquad != null)
            {
                frm.lstBattleDefendingSquad.Items.AddRange(DefendingSquad.ToArray());
            }

            if (frm.lstBattleDefendingSquad.Items.Count > 0)
            {
                frm.lstBattleDefendingSquad.SelectedIndex = 0;
            }
            else
            {
                frm.lblBattleDefendingSquadDeaths.Text = "";
                frm.lblBattleDefendingSquadEntPop.Data = null;
                frm.lblBattleDefendingSquadNumber.Text = "";
                frm.lblBattleDefendingSquadRace.Data   = null;
                frm.lblBattleDefendingSquadSite.Data   = null;
            }
            frm.grpBattleDefendingSquad.Text = $"Squads ({frm.lstBattleDefendingSquad.Items.Count})";

            frm.lstBattleEventCols.Items.Clear();
            if (EventCol != null)
            {
                frm.lstBattleEventCols.Items.AddRange(EventCol.ToArray());
            }

            frm.grpBattleEventCols.Visible = frm.lstBattleEventCols.Items.Count > 0;

            frm.lstBattleEvents.Items.Clear();
            if (Event != null)
            {
                frm.lstBattleEvents.Items.AddRange(Event.ToArray());
            }

            frm.grpBattleEvents.Visible = frm.lstBattleEvents.Items.Count > 0;
            if (frm.lstBattleEvents.Items.Count > 0)
            {
                frm.lstBattleEvents.SelectedIndex = 0;
            }

            frm.lstBattleNonComHFs.Items.Clear();
            if (_nonComHf != null)
            {
                frm.lstBattleNonComHFs.Items.AddRange(_nonComHf.ToArray());
            }

            frm.grpBattleNonComHFs.Visible = frm.lstBattleNonComHFs.Items.Count > 0;

            SelectTab(frm);
        }