Exemple #1
0
 private void OnPacketProcessed(UInt16 packet)
 {
     if (packet == (UInt16)SMSGPackets.AvailableCards)
     {
         Application.Current.Dispatcher.Invoke(() =>
         {
             GameFrame.Navigate(new SelectCards());
         });
     }
     else if (packet == (UInt16)SMSGPackets.SelectCards)
     {
         Application.Current.Dispatcher.Invoke(() =>
         {
             GameFrame.Navigate(new PlayingGame());
         });
     }
     else if (packet == (UInt16)SMSGPackets.Achievements)
     {
         Application.Current.Dispatcher.Invoke(() =>
         {
             GameFrame.Navigate(new AchievementsPage());
         });
     }
 }
Exemple #2
0
 public void RestartGame()
 {
     game = new Game();
     GameFrame.Navigate(typeof(Game), null, new DrillInNavigationTransitionInfo());
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 public MainWindow()
 {
     InitializeComponent();
     GameFrame.NavigationUIVisibility = System.Windows.Navigation.NavigationUIVisibility.Hidden;
     GameFrame.Navigate(new MainMenu());
 }