Class2.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System.Collections.Generic;
  2. using System.Linq;
  3. using System.Text;
  4. using System.Threading.Tasks;
  5. using System.Threading.Tasks;
  6. namespace wpf_template.models
  7. {
  8. interface IDataProvider
  9. {
  10. IEnumerable<People> getPeople();
  11. IEnumerable<PeopleGender> getGender();
  12. IEnumerable<PeopleAge> getAge();
  13. IEnumerable<PeoplePlace> getPlace();
  14. }
  15. class Globals
  16. {
  17. public static IDataProvider dataProvider;
  18. IEnumerable<PeopleGender> getPeopleGenders()
  19. {
  20. return new PeopleGender[] {
  21. new PeopleGender { title = "Ж"},
  22. new PeopleGender { title = "М"}
  23. };
  24. }
  25. IEnumerable<PeopleAge> getPeopleAges()
  26. {
  27. return new PeopleAge[] {
  28. new PeopleAge{title="Все возраста", AgeFrom=0, AgeTo=99},
  29. new PeopleAge{title="Подростки", AgeFrom=15, AgeTo = 18},
  30. new PeopleAge{title="Молодые", AgeFrom=18, AgeTo=30},
  31. new PeopleAge{title="В Возврасте", AgeFrom=30, AgeTo=99}
  32. };
  33. }
  34. IEnumerable<PeoplePlace> getPeoplePlace()
  35. {
  36. return new PeoplePlace[] {
  37. new PeoplePlace { title = "Набережная"},
  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. };
  46. }
  47. }
  48. }