| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- using cwebplusApp.Shared.ResourceFiles;
- using Microsoft.Extensions.Localization;
- using System.Collections.Generic;
-
- namespace cwebplusApp.Shared.Models {
- public class Defaults {
-
- private static readonly ColorItem[] ColorItems = {
- new ColorItem(0, "n_d", "#FFFFFF"),
- new ColorItem(1, "Red", "#FF0000"),
- new ColorItem(2, "Green", "#008000"),
- new ColorItem(3, "Blue", "#0000FF"),
- new ColorItem(4, "Yellow", "#FFFF00"),
- new ColorItem(5, "Black", "#000000"),
- new ColorItem(6, "Orange", "#FFA500"),
- new ColorItem(7, "White", "#FFFFFF"),
- new ColorItem(8, "Grey", "#808080"),
- new ColorItem(9, "Indigo", "#4B0082"),
- new ColorItem(10, "Violet", "#EE82EE"),
- new ColorItem(11, "Purple", "#800080"),
- new ColorItem(12, "Turquoise", "#40E0D0"),
- new ColorItem(13, "Pink", "#FFC0CB"),
- new ColorItem(14, "Brown", "#A52A2A"),
- new ColorItem(15, "Beige", "#D1BC8A"),
- new ColorItem(16, "Anthracite", "#373F43"),
- new ColorItem(17, "Gold", "#E2B007"),
- new ColorItem(18, "Rose", "#FF69B4"), //???
- new ColorItem(19, "Silver", "#C0C0C0")
- };
-
-
- private static readonly BicycleType[] BycicleTypes = {
- new BicycleType(0, "n_d"),
- new BicycleType(1, "City_Bike"),
- new BicycleType(2, "Mountain_Bike"),
- new BicycleType(3, "Touring_Bike"),
- new BicycleType(4, "Tricycle"),
- new BicycleType(5, "E_Bike"),
- new BicycleType(6, "Tandem"),
- new BicycleType(7, "Men_Bycicle"),
- new BicycleType(8, "Women_Bycicle"),
- new BicycleType(9, "Child_Bycicle"),
- new BicycleType(10, "Trailer"),
- new BicycleType(11, "Kickboard")
- };
-
- private static readonly Brand[] Brands = {
- new Brand(0, "n_d"),
- new Brand(1, "Mondia"),
- new Brand(2, "Cilo"),
- new Brand(3, "Cresta"),
- new Brand(4, "Stromer"),
- new Brand(5, "Ibex"),
- new Brand(6, "Bikester"),
- new Brand(7, "Tour de Suisse"),
- new Brand(8, "Cube"),
- new Brand(9, "Specialized"),
- new Brand(10, "Totem"),
- new Brand(11, "Apollo"),
- new Brand(12, "Avanti"),
- new Brand(13, "Bianchi"),
- new Brand(14, "Cannondale"),
- new Brand(15, "Felt"),
- new Brand(16, "Yeti"),
- new Brand(17, "Titan"),
- new Brand(18, "Giant"),
- new Brand(19, "Fuji"),
- new Brand(20, "Klein"),
- new Brand(21, "Raleigh"),
- new Brand(22, "Merida"),
- new Brand(23, "Trek"),
- new Brand(24, "Huffy"),
- new Brand(25, "Magna"),
- new Brand(26, "Scott"),
- new Brand(27, "Mongoose"),
- new Brand(28, "BMC"),
- new Brand(29, "Kona"),
- new Brand(30, "Schwinn"),
- new Brand(31, "Silverback"),
- new Brand(32, "Diamondback"),
- new Brand(33, "Pinarello"),
- new Brand(34, "Fox"),
- new Brand(35, "GT")
- };
-
- public static List<ColorItem> GetColorDefaults(IStringLocalizer<Resources> _i18n) {
- List<ColorItem> colors = new();
- foreach (ColorItem color in ColorItems) {
- colors.Add(new ColorItem(color.Id, _i18n.GetString("Color." + color.Bezeichnung), color.Code));
- }
- return colors;
- }
-
- public static List<BicycleType> GetBicycleTypeDefaults(IStringLocalizer<Resources> _i18n) {
- List<BicycleType> bicycleTypes = new();
- foreach (BicycleType bct in Defaults.BycicleTypes) {
- bicycleTypes.Add(new BicycleType(bct.Id, _i18n.GetString("Bike." + bct.Bezeichnung)));
- }
- return bicycleTypes;
- }
-
- public static List<Brand> GetBrandDefaults(IStringLocalizer<Resources> _i18n) {
- List<Brand> brands = new();
- foreach (Brand brand in Brands) {
- brands.Add(new Brand(brand.Id, brand.Id == 0 ? _i18n.GetString("Brand." + brand.Bezeichnung) : brand.Bezeichnung));
- }
- return brands;
- }
-
- }
-
- }
-
-
|