ConnectMode.xaml.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace SportComplex.Program.Pages
  16. {
  17. /// <summary>
  18. /// Логика взаимодействия для ConnectMode.xaml
  19. /// </summary>
  20. public partial class ConnectMode : Page
  21. {
  22. public ConnectMode()
  23. {
  24. InitializeComponent();
  25. }
  26. // Вход за гостя
  27. private void user_guestBtn_Click(object sender, RoutedEventArgs e)
  28. {
  29. GlobalVaribles.type_user = -1;
  30. GlobalVaribles.name_user = "Гость";
  31. NavigationService.Navigate(new View());
  32. }
  33. // Вход за клиент
  34. private void user_clientBtn_Click(object sender, RoutedEventArgs e)
  35. {
  36. GlobalVaribles.type_user = 2;
  37. NavigationService.Navigate(new SignInOut());
  38. }
  39. // Вход за тренера
  40. private void user_trainerBtn_Click(object sender, RoutedEventArgs e)
  41. {
  42. GlobalVaribles.type_user = 1;
  43. NavigationService.Navigate(new SignInOut());
  44. }
  45. // Вход за админа
  46. private void user_adminBtn_Click(object sender, RoutedEventArgs e)
  47. {
  48. GlobalVaribles.type_user = 0;
  49. NavigationService.Navigate(new SignInOut());
  50. }
  51. }
  52. }