Shortened/fixed SummaryText for several block items

This commit is contained in:
Ben Wallis 2018-12-02 21:51:19 +00:00
parent 30e76e333c
commit 876e98437e
4 changed files with 10 additions and 10 deletions

View File

@ -27,7 +27,7 @@
}
public override string OutputText => PrefixText + " " + BooleanValue;
public override string SummaryText => PrefixText + " = " + BooleanValue;
public override string SummaryText => DisplayHeading + " = " + BooleanValue;
public override int MaximumAllowed => 1;
public void ToggleValue()

View File

@ -16,18 +16,18 @@ namespace Filtration.ObjectModel.BlockItemTypes
{
if (Items.Count > 0 && Items.Count < 4)
{
return "Item Base Types: " +
return "Base Types: " +
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
}
if (Items.Count >= 4)
{
var remaining = Items.Count - 3;
return "Item Base Types: " + Items.Take(3)
return "Base Types: " + Items.Take(3)
.Aggregate(string.Empty, (current, i) => current + i + ", ")
.TrimEnd(' ')
.TrimEnd(',') + " (+" + remaining + " more)";
}
return "Item Base Types: (none)";
return "Base Types: (none)";
}
}

View File

@ -16,18 +16,18 @@ namespace Filtration.ObjectModel.BlockItemTypes
{
if (Items.Count > 0 && Items.Count < 4)
{
return "Item Classes: " +
return "Classes: " +
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
}
if (Items.Count >= 4)
{
var remaining = Items.Count - 3;
return "Item Classes: " + Items.Take(3)
return "Classes: " + Items.Take(3)
.Aggregate(string.Empty, (current, i) => current + i + ", ")
.TrimEnd(' ')
.TrimEnd(',') + " (+" + remaining + " more)";
}
return "Item Classes: (none)";
return "Classes: (none)";
}
}

View File

@ -16,18 +16,18 @@ namespace Filtration.ObjectModel.BlockItemTypes
{
if (Items.Count > 0 && Items.Count < 4)
{
return "Item Explicit Mods: " +
return "Explicit Mods: " +
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
}
if (Items.Count >= 4)
{
var remaining = Items.Count - 3;
return "Item Explicit Mods: " + Items.Take(3)
return "Explicit Mods: " + Items.Take(3)
.Aggregate(string.Empty, (current, i) => current + i + ", ")
.TrimEnd(' ')
.TrimEnd(',') + " (+" + remaining + " more)";
}
return "Item Explicit Mods: (none)";
return "Explicit Mods: (none)";
}
}