SplashPage.xaml.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. using System.IO;
  5. using System.Linq;
  6. using System.Runtime.InteropServices.WindowsRuntime;
  7. using Windows.Foundation;
  8. using Windows.Foundation.Collections;
  9. using Windows.UI.Xaml;
  10. using Windows.UI.Xaml.Controls;
  11. using Windows.UI.Xaml.Controls.Primitives;
  12. using Windows.UI.Xaml.Data;
  13. using Windows.UI.Xaml.Input;
  14. using Windows.UI.Xaml.Media;
  15. using Windows.UI.Xaml.Navigation;
  16. using Windows.Globalization;
  17. // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
  18. namespace Breda_Tour.SplashScreen
  19. {
  20. /// <summary>
  21. /// An empty page that can be used on its own or navigated to within a Frame.
  22. /// </summary>
  23. public sealed partial class SplashPage : Page
  24. {
  25. //get current frame
  26. Frame f = (Frame)Window.Current.Content;
  27. public SplashPage()
  28. {
  29. this.InitializeComponent();
  30. new Notification("Hallo", "Test");
  31. }
  32. /// <author>Jannick van Ballegooijen</author>
  33. /// <desc>Temporary method to navigate to the main screen</desc>
  34. private void Button_Click(object sender, RoutedEventArgs e)
  35. {
  36. f.Navigate(typeof(MainPage));
  37. }
  38. /// <summary>
  39. /// <author>Bart Reedijk</author>
  40. /// Go to MainPage with English as the language
  41. /// </summary>
  42. private void Button_English_Click(object sender, RoutedEventArgs e)
  43. {
  44. App.Language = "en-US";
  45. ApplicationLanguages.PrimaryLanguageOverride = "en-US";
  46. Debug.WriteLine("my language is:" + ApplicationLanguages.ManifestLanguages.First());
  47. f.Navigate(typeof(MainPage));
  48. }
  49. /// <summary>
  50. /// <author>Bart Reedijk</author>
  51. /// Go to MainPage with Dutch as the language
  52. /// </summary>
  53. private void Button_Dutch_Click(object sender, RoutedEventArgs e)
  54. {
  55. App.Language = "nl-NL";
  56. ApplicationLanguages.PrimaryLanguageOverride = "nl-NL";
  57. Debug.WriteLine("my language is:" + ApplicationLanguages.ManifestLanguages.First());
  58. f.Navigate(typeof(MainPage));
  59. }
  60. }
  61. }