SplashPage.xaml.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. }
  31. /// <author>Jannick van Ballegooijen</author>
  32. /// <desc>Temporary method to navigate to the main screen</desc>
  33. private void Button_Click(object sender, RoutedEventArgs e)
  34. {
  35. f.Navigate(typeof(MainPage));
  36. }
  37. /// <summary>
  38. /// <author>Bart Reedijk</author>
  39. /// Go to MainPage with English as the language
  40. /// </summary>
  41. private void Button_English_Click(object sender, RoutedEventArgs e)
  42. {
  43. App.Language = "en-US";
  44. ApplicationLanguages.PrimaryLanguageOverride = "en-US";
  45. Debug.WriteLine("my language is:" + ApplicationLanguages.ManifestLanguages.First());
  46. f.Navigate(typeof(MainPage));
  47. }
  48. /// <summary>
  49. /// <author>Bart Reedijk</author>
  50. /// Go to MainPage with Dutch as the language
  51. /// </summary>
  52. private void Button_Dutch_Click(object sender, RoutedEventArgs e)
  53. {
  54. App.Language = "nl-NL";
  55. ApplicationLanguages.PrimaryLanguageOverride = "nl-NL";
  56. Debug.WriteLine("my language is:" + ApplicationLanguages.ManifestLanguages.First());
  57. f.Navigate(typeof(MainPage));
  58. }
  59. }
  60. }