diff --git a/TemplateGenerator/Models/Th095/Definitions.cs b/TemplateGenerator/Models/Th095/Definitions.cs index 66aab5e5..1b9ebeba 100644 --- a/TemplateGenerator/Models/Th095/Definitions.cs +++ b/TemplateGenerator/Models/Th095/Definitions.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using TemplateGenerator.Extensions; using ThScoreFileConverter.Core.Extensions; using ThScoreFileConverter.Core.Helpers; using ThScoreFileConverter.Core.Models.Th095; @@ -15,18 +14,20 @@ public static class Definitions public static IReadOnlyDictionary LevelNames { get; } = new[] { - (Level.One, ("Level1", "Level 1")), - (Level.Two, ("Level2", "Level 2")), - (Level.Three, ("Level3", "Level 3")), - (Level.Four, ("Level4", "Level 4")), - (Level.Five, ("Level5", "Level 5")), - (Level.Six, ("Level6", "Level 6")), - (Level.Seven, ("Level7", "Level 7")), - (Level.Eight, ("Level8", "Level 8")), - (Level.Nine, ("Level9", "Level 9")), - (Level.Ten, ("Level10", "Level 10")), - (Level.Extra, ("Extra", "Level Extra")), - }.ToPatternKeyedDictionary(); + (Level.One, "Level1"), + (Level.Two, "Level2"), + (Level.Three, "Level3"), + (Level.Four, "Level4"), + (Level.Five, "Level5"), + (Level.Six, "Level6"), + (Level.Seven, "Level7"), + (Level.Eight, "Level8"), + (Level.Nine, "Level9"), + (Level.Ten, "Level10"), + (Level.Extra, "Extra"), + }.ToDictionary( + static pair => pair.Item1.ToPattern(), + static pair => (pair.Item2, pair.Item1.ToDisplayName())); public static IReadOnlyDictionary NumScenesPerLevel { get; } = EnumHelper.Enumerable.ToDictionary( diff --git a/ThScoreFileConverter.Core/Models/Th095/Level.cs b/ThScoreFileConverter.Core/Models/Th095/Level.cs index 02edd3d0..03b3d6f7 100644 --- a/ThScoreFileConverter.Core/Models/Th095/Level.cs +++ b/ThScoreFileConverter.Core/Models/Th095/Level.cs @@ -5,6 +5,8 @@ // //----------------------------------------------------------------------- +using System.ComponentModel.DataAnnotations; + namespace ThScoreFileConverter.Core.Models.Th095; /// @@ -15,66 +17,77 @@ public enum Level /// /// Represents level 1. /// + [Display(Name = "Level 1")] [Pattern("1")] One, /// /// Represents level 2. /// + [Display(Name = "Level 2")] [Pattern("2")] Two, /// /// Represents level 3. /// + [Display(Name = "Level 3")] [Pattern("3")] Three, /// /// Represents level 4. /// + [Display(Name = "Level 4")] [Pattern("4")] Four, /// /// Represents level 5. /// + [Display(Name = "Level 5")] [Pattern("5")] Five, /// /// Represents level 6. /// + [Display(Name = "Level 6")] [Pattern("6")] Six, /// /// Represents level 7. /// + [Display(Name = "Level 7")] [Pattern("7")] Seven, /// /// Represents level 8. /// + [Display(Name = "Level 8")] [Pattern("8")] Eight, /// /// Represents level 9. /// + [Display(Name = "Level 9")] [Pattern("9")] Nine, /// /// Represents level 10. /// + [Display(Name = "Level 10")] [Pattern("0")] Ten, /// /// Represents level Extra. /// + [Display(Name = "Level Extra")] [Pattern("X")] Extra, }