-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
225 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<Window x:Class="MFIGamepadFeeder.OptionsWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="clr-namespace:MFIGamepadFeeder" | ||
mc:Ignorable="d" | ||
Title="OptionsWindow" Height="130" Width="300" ResizeMode="NoResize" | ||
WindowStartupLocation="CenterScreen" | ||
> | ||
<Grid Loaded="Grid_Loaded"> | ||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> | ||
<StackPanel Orientation="Horizontal" > | ||
<CheckBox x:Name="StartMinimizedCheckBox" VerticalAlignment="Center"></CheckBox> | ||
<Label Content="Start minimized" VerticalAlignment="Center" MouseDown="StartMinimized_MouseDown"></Label> | ||
</StackPanel> | ||
<StackPanel Orientation="Horizontal" > | ||
<CheckBox x:Name="AutoPlugInCheckBox" VerticalAlignment="Center"></CheckBox> | ||
<Label Content="Automatically plugin all controllers at launch" VerticalAlignment="Center" MouseDown="AutoPlugIn_MouseDown"></Label> | ||
</StackPanel> | ||
|
||
<Button x:Name="SaveButton" Content="Save" HorizontalAlignment="Center" Margin="0,10,0,0" Click="SaveButton_Click"></Button> | ||
</StackPanel> | ||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Shapes; | ||
using MFIGamepadFeeder.Properties; | ||
|
||
namespace MFIGamepadFeeder | ||
{ | ||
/// <summary> | ||
/// Interaction logic for OptionsWindow.xaml | ||
/// </summary> | ||
public partial class OptionsWindow : Window | ||
{ | ||
public OptionsWindow() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void Grid_Loaded(object sender, RoutedEventArgs e) | ||
{ | ||
AutoPlugInCheckBox.IsChecked = Settings.Default.AutoPlugIn; | ||
StartMinimizedCheckBox.IsChecked = Settings.Default.StartMinimized; | ||
} | ||
|
||
private void SaveButton_Click(object sender, RoutedEventArgs e) | ||
{ | ||
if (AutoPlugInCheckBox.IsChecked != null) Settings.Default.AutoPlugIn = AutoPlugInCheckBox.IsChecked.Value; | ||
if (StartMinimizedCheckBox.IsChecked != null) Settings.Default.StartMinimized = StartMinimizedCheckBox.IsChecked.Value; | ||
Settings.Default.Save(); | ||
Close(); | ||
} | ||
|
||
private void StartMinimized_MouseDown(object sender, MouseButtonEventArgs e) | ||
{ | ||
StartMinimizedCheckBox.IsChecked = !StartMinimizedCheckBox.IsChecked; | ||
} | ||
|
||
private void AutoPlugIn_MouseDown(object sender, MouseButtonEventArgs e) | ||
{ | ||
AutoPlugInCheckBox.IsChecked = !AutoPlugInCheckBox.IsChecked; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters