PWA Fundvelo der Caritas.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. using cwebplusApp.Shared.ResourceFiles;
  2. using Microsoft.Extensions.Localization;
  3. using System.Collections.Generic;
  4. namespace cwebplusApp.Shared.Models {
  5. public class Defaults {
  6. private static readonly ColorItem[] ColorItems = {
  7. new ColorItem(0, "n_d", "#FFFFFF"),
  8. new ColorItem(1, "Red", "#FF0000"),
  9. new ColorItem(2, "Green", "#008000"),
  10. new ColorItem(3, "Blue", "#0000FF"),
  11. new ColorItem(4, "Yellow", "#FFFF00"),
  12. new ColorItem(5, "Black", "#000000"),
  13. new ColorItem(6, "Orange", "#FFA500"),
  14. new ColorItem(7, "White", "#FFFFFF"),
  15. new ColorItem(8, "Grey", "#808080"),
  16. new ColorItem(9, "Indigo", "#4B0082"),
  17. new ColorItem(10, "Violet", "#EE82EE"),
  18. new ColorItem(11, "Purple", "#800080"),
  19. new ColorItem(12, "Turquoise", "#40E0D0"),
  20. new ColorItem(13, "Pink", "#FFC0CB"),
  21. new ColorItem(14, "Brown", "#A52A2A"),
  22. new ColorItem(15, "Beige", "#D1BC8A"),
  23. new ColorItem(16, "Anthracite", "#373F43"),
  24. new ColorItem(17, "Gold", "#E2B007"),
  25. new ColorItem(18, "Rose", "#FF69B4"), //???
  26. new ColorItem(19, "Silver", "#C0C0C0")
  27. };
  28. private static readonly BicycleType[] BycicleTypes = {
  29. new BicycleType(0, "n_d"),
  30. new BicycleType(1, "City_Bike"),
  31. new BicycleType(2, "Mountain_Bike"),
  32. new BicycleType(3, "Touring_Bike"),
  33. new BicycleType(4, "Tricycle"),
  34. new BicycleType(5, "E_Bike"),
  35. new BicycleType(6, "Tandem"),
  36. new BicycleType(7, "Men_Bycicle"),
  37. new BicycleType(8, "Women_Bycicle"),
  38. new BicycleType(9, "Child_Bycicle"),
  39. new BicycleType(10, "Trailer"),
  40. new BicycleType(11, "Kickboard")
  41. };
  42. private static readonly Brand[] Brands = {
  43. new Brand(0, "n_d"),
  44. new Brand(1, "Mondia"),
  45. new Brand(2, "Cilo"),
  46. new Brand(3, "Cresta"),
  47. new Brand(4, "Stromer"),
  48. new Brand(5, "Ibex"),
  49. new Brand(6, "Bikester"),
  50. new Brand(7, "Tour de Suisse"),
  51. new Brand(8, "Cube"),
  52. new Brand(9, "Specialized"),
  53. new Brand(10, "Totem"),
  54. new Brand(11, "Apollo"),
  55. new Brand(12, "Avanti"),
  56. new Brand(13, "Bianchi"),
  57. new Brand(14, "Cannondale"),
  58. new Brand(15, "Felt"),
  59. new Brand(16, "Yeti"),
  60. new Brand(17, "Titan"),
  61. new Brand(18, "Giant"),
  62. new Brand(19, "Fuji"),
  63. new Brand(20, "Klein"),
  64. new Brand(21, "Raleigh"),
  65. new Brand(22, "Merida"),
  66. new Brand(23, "Trek"),
  67. new Brand(24, "Huffy"),
  68. new Brand(25, "Magna"),
  69. new Brand(26, "Scott"),
  70. new Brand(27, "Mongoose"),
  71. new Brand(28, "BMC"),
  72. new Brand(29, "Kona"),
  73. new Brand(30, "Schwinn"),
  74. new Brand(31, "Silverback"),
  75. new Brand(32, "Diamondback"),
  76. new Brand(33, "Pinarello"),
  77. new Brand(34, "Fox"),
  78. new Brand(35, "GT")
  79. };
  80. public static List<ColorItem> GetColorDefaults(IStringLocalizer<Resources> _i18n) {
  81. List<ColorItem> colors = new();
  82. foreach (ColorItem color in ColorItems) {
  83. colors.Add(new ColorItem(color.Id, _i18n.GetString("Color." + color.Bezeichnung), color.Code));
  84. }
  85. return colors;
  86. }
  87. public static List<BicycleType> GetBicycleTypeDefaults(IStringLocalizer<Resources> _i18n) {
  88. List<BicycleType> bicycleTypes = new();
  89. foreach (BicycleType bct in Defaults.BycicleTypes) {
  90. bicycleTypes.Add(new BicycleType(bct.Id, _i18n.GetString("Bike." + bct.Bezeichnung)));
  91. }
  92. return bicycleTypes;
  93. }
  94. public static List<Brand> GetBrandDefaults(IStringLocalizer<Resources> _i18n) {
  95. List<Brand> brands = new();
  96. foreach (Brand brand in Brands) {
  97. brands.Add(new Brand(brand.Id, brand.Id == 0 ? _i18n.GetString("Brand." + brand.Bezeichnung) : brand.Bezeichnung));
  98. }
  99. return brands;
  100. }
  101. }
  102. }