MainWindow.xaml.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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.Effects;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. namespace InteractiveKiosk
  17. {
  18. /// <summary>
  19. /// Interaction logic for MainWindow.xaml
  20. /// </summary>
  21. public partial class MainWindow : Window
  22. {
  23. public MainWindow()
  24. {
  25. InitializeComponent();
  26. }
  27. private void Authorization(object sender, RoutedEventArgs e)
  28. {
  29. this.Opacity = 0.5;
  30. this.Effect = new BlurEffect();
  31. AuthorizationWindow aw = new AuthorizationWindow()
  32. {
  33. Owner = this,
  34. ShowInTaskbar = false,
  35. Topmost = true
  36. };
  37. aw.ShowDialog();
  38. this.Opacity = 1;
  39. this.Effect = null;
  40. }
  41. private void WindowLoaded(object sender, RoutedEventArgs e)
  42. {
  43. date.Content = DateTime.Now.ToString("dddd");
  44. time.Content = DateTime.Now.ToString("HH:mm");
  45. }
  46. private void More(object sender, RoutedEventArgs e)
  47. {
  48. this.Opacity = 0.5;
  49. this.Effect = new BlurEffect();
  50. AboutThePark atp = new AboutThePark()
  51. {
  52. Owner = this,
  53. ShowInTaskbar = false,
  54. Topmost = true
  55. };
  56. atp.ShowDialog();
  57. this.Opacity = 1;
  58. this.Effect = null;
  59. }
  60. private void Map(object sender, RoutedEventArgs e)
  61. {
  62. this.Opacity = 0.5;
  63. this.Effect = new BlurEffect();
  64. Map m = new Map()
  65. {
  66. Owner = this,
  67. ShowInTaskbar = false,
  68. Topmost = true
  69. };
  70. m.ShowDialog();
  71. this.Opacity = 1;
  72. this.Effect = null;
  73. }
  74. private void Attractions(object sender, RoutedEventArgs e)
  75. {
  76. this.Opacity = 0.5;
  77. this.Effect = new BlurEffect();
  78. Attraction a = new Attraction()
  79. {
  80. Owner = this,
  81. ShowInTaskbar = false,
  82. Topmost = true
  83. };
  84. a.ShowDialog();
  85. this.Opacity = 1;
  86. this.Effect = null;
  87. }
  88. }
  89. }