Пример #1
0
 /// <summary>
 /// Initialises a new instance of the MainWindow class, and prepares it for display.
 /// </summary>
 public MainWindow()
 {
     InitializeComponent();
     Pages.RegisterAll();
     this.ChangeScreen(PageRegistry.GetDefaultPage());
     App.Settings["MainWindow"] = this;
     PlayerControls             = Player;
 }
Пример #2
0
 /// <summary>
 /// Registers all the UI views with the PageRegistry.
 /// </summary>
 public static void RegisterAll()
 {
     PageRegistry.Register(new AppPage("HomeScreen", new HomeScreen(), true));
 }
Пример #3
0
 /// <summary>
 /// Changes the view to another page.
 /// </summary>
 /// <param name="name">The name of the view to change to.</param>
 public void ChangeScreen(string name)
 {
     this.ChangeScreen(PageRegistry.GetPage(name));
 }