예제 #1
0
        /// <summary>
        /// This button opens the controller settings option
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnControllerSettings(object sender, RoutedEventArgs e)
        {
            if (gameList.Items.Count == 0)
            {
                return;
            }

            _listIndex = gameList.SelectedIndex;
            Joystick.Listen();
            Application.Current.Windows.OfType <MainWindow>().Single().contentControl.Content = Joystick;
        }
예제 #2
0
 private void FlyoutSettings_OnIsOpenChanged(object sender, RoutedEventArgs e)
 {
     if (FlyoutSettings.IsOpen)
     {
         JoystickControl.Listen();
     }
     else
     {
         JoystickControl.StopListening();
     }
 }
예제 #3
0
 /// <summary>
 /// This button opens the controller settings option
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BtnControllerSettings(object sender, RoutedEventArgs e)
 {
     if (gameList.Items.Count == 0)
     {
         return;
     }
     Joystick = new JoystickControl(_contentControl, this);
     Joystick.LoadNewSettings(_gameNames[gameList.SelectedIndex], (ListBoxItem)gameList.SelectedItem);
     Joystick.Listen();
     Application.Current.Windows.OfType <MainWindow>().Single().contentControl.Content = Joystick;
 }
예제 #4
0
 /// <summary>
 /// This button opens the controller settings option
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     Joystick.Listen();
     Application.Current.Windows.OfType <MainWindow>().Single().contentControl.Content = Joystick;
 }