Esempio n. 1
0
        internal override void InitializeTab()
        {
            EventTabs          = new[] { tpHFEvents };
            EventTabTypes      = new[] { typeof(HistoricalFigure) };
            lnkMaxResults.Text = WorldObjectList.MaxResults.ToString();
            MaxResultsLabels.Add(lnkMaxResults);
            listHFSearch.ShowGroups = false;

            listHFSearch.AllColumns.Add(new OLVColumn {
                AspectName = "TitleRaceString", IsVisible = false, Text = "Race", TextAlign = HorizontalAlignment.Left
            });
            listHFSearch.AllColumns.Add(new OLVColumn {
                AspectName = "Caste", IsVisible = false, Text = "Caste", TextAlign = HorizontalAlignment.Left
            });
            listHFSearch.AllColumns.Add(new OLVColumn {
                AspectName = "PreviousRace", IsVisible = false, Text = "Previous Race", TextAlign = HorizontalAlignment.Left
            });
            listHFSearch.AllColumns.Add(new OLVColumn {
                AspectName = "Alive", IsVisible = false, Text = "Alive", TextAlign = HorizontalAlignment.Center, CheckBoxes = true
            });
            listHFSearch.AllColumns.Add(new OLVColumn {
                AspectName = "Skeleton", IsVisible = false, Text = "Skeleton", TextAlign = HorizontalAlignment.Center, CheckBoxes = true
            });
            listHFSearch.AllColumns.Add(new OLVColumn {
                AspectName = "Force", IsVisible = false, Text = "Force", TextAlign = HorizontalAlignment.Center, CheckBoxes = true
            });
            listHFSearch.AllColumns.Add(new OLVColumn {
                AspectName = "Zombie", IsVisible = false, Text = "Zombie", TextAlign = HorizontalAlignment.Center, CheckBoxes = true
            });
            listHFSearch.AllColumns.Add(new OLVColumn {
                AspectName = "Ghost", IsVisible = false, Text = "Ghost", TextAlign = HorizontalAlignment.Center, CheckBoxes = true
            });
            listHFSearch.AllColumns.Add(new OLVColumn {
                AspectName = "Animated", IsVisible = false, Text = "Animated", TextAlign = HorizontalAlignment.Center, CheckBoxes = true
            });
            listHFSearch.AllColumns.Add(new OLVColumn {
                AspectName = "Adventurer", IsVisible = false, Text = "Adventurer", TextAlign = HorizontalAlignment.Center, CheckBoxes = true
            });
            listHFSearch.AllColumns.Add(new OLVColumn
            {
                Text         = "Kills",
                TextAlign    = HorizontalAlignment.Right,
                IsVisible    = false,
                AspectGetter = rowObject => ((HistoricalFigure)rowObject).NotableKills.Count
            });
            listHFSearch.AllColumns.Add(new OLVColumn
            {
                Text         = "Events",
                TextAlign    = HorizontalAlignment.Right,
                IsVisible    = false,
                AspectGetter = rowObject => ((HistoricalFigure)rowObject).Events.Count
            });
        }
Esempio n. 2
0
        internal override void InitializeTab()
        {
            lnkMaxResults.Text = WorldObjectList.MaxResults.ToString();
            MaxResultsLabels.Add(lnkMaxResults);

            EventTabs     = new[] { tpSiteEvents, tpStructureEvents, tpWorldConstructionEvents };
            EventTabTypes = new[] { typeof(Site), typeof(Structure), typeof(WorldConstruction) };

            listSiteSearch.ShowGroups = false;
            listSiteSearch.AllColumns.Add(new OLVColumn
            {
                Text         = "Structures",
                TextAlign    = HorizontalAlignment.Right,
                IsVisible    = false,
                AspectGetter = item => ((Site)item).Structures.Count
            });
            listSiteSearch.AllColumns.Add(new OLVColumn
            {
                Text         = "Warfare",
                TextAlign    = HorizontalAlignment.Right,
                IsVisible    = false,
                AspectGetter = item => ((Site)item).Warfare.Count
            });
            listSiteSearch.AllColumns.Add(new OLVColumn
            {
                Text         = "Battles",
                TextAlign    = HorizontalAlignment.Right,
                IsVisible    = false,
                AspectGetter = item => ((Site)item).Battles.Count
            });
            listSiteSearch.AllColumns.Add(new OLVColumn
            {
                Text         = "Conquerings",
                TextAlign    = HorizontalAlignment.Right,
                IsVisible    = false,
                AspectGetter = item => ((Site)item).Conquerings.Count
            });
            listSiteSearch.AllColumns.Add(new OLVColumn
            {
                Text         = "Current Owner",
                TextAlign    = HorizontalAlignment.Right,
                IsVisible    = false,
                AspectGetter = item => ((Site)item).CurrentOwner?.ToLink(false)
            });
            listSiteSearch.AllColumns.Add(new OLVColumn
            {
                Text         = "Deaths",
                TextAlign    = HorizontalAlignment.Right,
                IsVisible    = false,
                AspectGetter = item => ((Site)item).Deaths.Count
            });
            listSiteSearch.AllColumns.Add(new OLVColumn
            {
                Text         = "Beast Attacks",
                TextAlign    = HorizontalAlignment.Right,
                IsVisible    = false,
                AspectGetter = item => ((Site)item).BeastAttacks.Count
            });
            listSiteSearch.AllColumns.Add(new OLVColumn
            {
                Text         = "Events",
                TextAlign    = HorizontalAlignment.Right,
                IsVisible    = false,
                AspectGetter = rowObject => ((Site)rowObject).Events.Count
            });

            listStructureSearch.ShowGroups          = false;
            listWorldConstructionsSearch.ShowGroups = false;
        }