+ public class Settings\r
+ {\r
+ public string Mode { get; set; }\r
+ public ShipCategory ShipCategories { get; set; }\r
+ public bool ShipType { get; set; }\r
+ public bool ShowHpInPercent { get; set; }\r
+ public SortOrder SortOrder { get; set; }\r
+\r
+ public static Settings FromShipListConfig(ShipListConfig config)\r
+ {\r
+ return new Settings\r
+ {\r
+ Mode = config.Mode ?? "全艦",\r
+ ShipCategories = config.ShipCategories,\r
+ ShipType = config.ShipType,\r
+ ShowHpInPercent = config.ShowHpInPercent,\r
+ SortOrder = config.SortOrder\r
+ };\r
+ }\r
+\r
+ public void SetToShipListConfig(ShipListConfig config)\r
+ {\r
+ config.Mode = Mode;\r
+ config.ShipCategories = ShipCategories;\r
+ config.ShipType = ShipType;\r
+ config.ShowHpInPercent = ShowHpInPercent;\r
+ config.SortOrder = SortOrder;\r
+ }\r
+ }\r
+\r
+ private object[] PanelNames => new object[] {"全艦", "A", "B", "C", "D", "分類", "修復", "装備", "艦隊", "対空", "戦況", "情報"}\r
+ .Where(n => IsMaster || (string)n != "分類").ToArray();\r
+\r
+ private char[] PanelKeys => new[] {'Z', 'A', 'B', 'C', 'D', 'G', 'R', 'W', 'X', 'Y', 'S', 'I'}\r
+ .Where(key => IsMaster || key != 'G').ToArray();\r
+\r
+ public bool IsMaster\r
+ {\r
+ get => _isMaster;\r
+ set\r
+ {\r
+ _isMaster = value;\r
+ Text = _isMaster ? "一覧 プライマリ" : "一覧";\r
+ comboBoxGroup.Items.Clear();\r
+ comboBoxGroup.Items.AddRange(PanelNames);\r
+ }\r
+ }\r
+\r