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()); }); } }
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()); }