예제 #1
0
        void newGameImg_Tapped(object sender, TappedRoutedEventArgs e)
        {
            NavigationParams parameters = new NavigationParams();

            parameters.mode = gameMode;
            this.Frame.Navigate(typeof(GamePage), parameters);
        }
예제 #2
0
        private void MultiplayerBtn_Click(object sender, RoutedEventArgs e)
        {
            NavigationParams parameters = new NavigationParams();

            parameters.mode = GameMode.TwoPlayer;
            this.Frame.Navigate(typeof(GamePage), parameters);
        }
예제 #3
0
        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.
        /// This parameter is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            NavigationParams parameters = e.Parameter as NavigationParams;

            if (parameters != null)
            {
                gameMode = parameters.mode;
            }
        }