Class2.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System.Collections.Generic;
  2. using System.Diagnostics;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Threading.Tasks;
  7. namespace wpf_data.models
  8. {
  9. interface IDataProvider
  10. {
  11. IEnumerable<People> getPeople();
  12. IEnumerable<PeopleGender> getGender();
  13. IEnumerable<PeopleAge> getAge();
  14. IEnumerable<PeoplePlace> getPlace();
  15. }
  16. class Globals
  17. {
  18. public static IDataProvider dataProvider;
  19. IEnumerable<PeopleGender> getPeopleGenders()
  20. {
  21. return new PeopleGender[] {
  22. new PeopleGender { title = "Ж"},
  23. new PeopleGender { title = "М"}
  24. };
  25. }
  26. IEnumerable<PeopleAge> getPeopleAges()
  27. {
  28. return new PeopleAge[] {
  29. new PeopleAge{title="Все возраста", AgeFrom=0, AgeTo=99},
  30. new PeopleAge{title="Подростки", AgeFrom=15, AgeTo = 18},
  31. new PeopleAge{title="Молодые", AgeFrom=18, AgeTo=30},
  32. new PeopleAge{title="В Возврасте", AgeFrom=30, AgeTo=99}
  33. };
  34. }
  35. IEnumerable<PeoplePlace> getPeoplePlace()
  36. {
  37. return new PeoplePlace[] {
  38. new PeoplePlace { title = "Набережная"},
  39. new PeoplePlace { title = "Бульвар"},
  40. new PeoplePlace { title = "Йолка"},
  41. new PeoplePlace { title = "Планета"},
  42. new PeoplePlace { title = "ЙОТК"},
  43. new PeoplePlace { title = "Ремзавод"},
  44. new PeoplePlace { title = "Медведево"},
  45. new PeoplePlace { title = "Пляж"},
  46. };
  47. }
  48. }
  49. }