summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wpspec/wpspec/Settings.cs89
-rw-r--r--wpspec/wpspec/SettingsPage.xaml89
-rw-r--r--wpspec/wpspec/SettingsPage.xaml.cs25
-rw-r--r--wpspec/wpspec/Spectrum/SpectrumKeySymbol.cs8
-rw-r--r--wpspec/wpspec/ViewModels/SettingsViewModel.cs207
-rw-r--r--wpspec/wpspec/wpspec.csproj1
6 files changed, 345 insertions, 74 deletions
diff --git a/wpspec/wpspec/Settings.cs b/wpspec/wpspec/Settings.cs
index 45d8a90..90be72d 100644
--- a/wpspec/wpspec/Settings.cs
+++ b/wpspec/wpspec/Settings.cs
@@ -19,7 +19,7 @@ namespace wpspec
/// <summary>
/// Holds global settings
/// </summary>
- public class Settings : BaseViewModel
+ public class Settings
{
/// <summary>
/// Get/set whether sound is enabled.
@@ -76,6 +76,60 @@ namespace wpspec
}
/// <summary>
+ /// Get/set the joystick up key.
+ /// </summary>
+ public SpectrumKeySymbol JoystickKeyUp
+ {
+ get {return joystickKeyUp.Setting;}
+ set {joystickKeyUp.Setting = value;}
+ }
+
+ /// <summary>
+ /// Get/set the joystick down key.
+ /// </summary>
+ public SpectrumKeySymbol JoystickKeyDown
+ {
+ get {return joystickKeyDown.Setting;}
+ set {joystickKeyDown.Setting = value;}
+ }
+
+ /// <summary>
+ /// Get/set the joystick left key.
+ /// </summary>
+ public SpectrumKeySymbol JoystickKeyLeft
+ {
+ get {return joystickKeyLeft.Setting;}
+ set {joystickKeyLeft.Setting = value;}
+ }
+
+ /// <summary>
+ /// Get/set the joystick right key.
+ /// </summary>
+ public SpectrumKeySymbol JoystickKeyRight
+ {
+ get {return joystickKeyRight.Setting;}
+ set {joystickKeyRight.Setting = value;}
+ }
+
+ /// <summary>
+ /// Get/set the joystick fire 1 key.
+ /// </summary>
+ public SpectrumKeySymbol JoystickKeyFire1
+ {
+ get {return joystickKeyFire1.Setting;}
+ set {joystickKeyFire1.Setting = value;}
+ }
+
+ /// <summary>
+ /// Get/set the joystick fire 2 key.
+ /// </summary>
+ public SpectrumKeySymbol JoystickKeyFire2
+ {
+ get {return joystickKeyFire2.Setting;}
+ set {joystickKeyFire2.Setting = value;}
+ }
+
+ /// <summary>
/// Get singleton instance of this class.
/// </summary>
public static Settings Instance
@@ -89,22 +143,22 @@ namespace wpspec
private Settings()
{
- sound = new SettingValue<bool>("Sound", true, this);
- kempstonJoystick = new SettingValue<bool>("KempstonJoystick", true, this);
- fullerJoystick = new SettingValue<bool>("FullerJoystick", true, this);
- keyboardJoystick = new SettingValue<bool>("KeyboardJoystick", false, this);
- joystickKeyUp = new SettingValue<SpectrumKeySymbol>("JoystickKeyUp", SpectrumKeySymbol.Key7, this);
- joystickKeyDown = new SettingValue<SpectrumKeySymbol>("JoystickKeyDown", SpectrumKeySymbol.Key6, this);
- joystickKeyLeft = new SettingValue<SpectrumKeySymbol>("JoystickKeyLeft", SpectrumKeySymbol.Key5, this);
- joystickKeyRight = new SettingValue<SpectrumKeySymbol>("JoystickKeyRight", SpectrumKeySymbol.Key8, this);
- joystickKeyFire1 = new SettingValue<SpectrumKeySymbol>("JoystickKeyFire1", SpectrumKeySymbol.Key0, this);
- joystickKeyFire2 = new SettingValue<SpectrumKeySymbol>("JoystickKeyFire2", SpectrumKeySymbol.Key0, this);
- joystickLock = new SettingValue<JoystickLock>("JoystickLock", JoystickLock.EightWay, this);
+ sound = new SettingValue<bool>("Sound", true);
+ kempstonJoystick = new SettingValue<bool>("KempstonJoystick", true);
+ fullerJoystick = new SettingValue<bool>("FullerJoystick", true);
+ keyboardJoystick = new SettingValue<bool>("KeyboardJoystick", false);
+ joystickKeyUp = new SettingValue<SpectrumKeySymbol>("JoystickKeyUp", SpectrumKeySymbol.Key7);
+ joystickKeyDown = new SettingValue<SpectrumKeySymbol>("JoystickKeyDown", SpectrumKeySymbol.Key6);
+ joystickKeyLeft = new SettingValue<SpectrumKeySymbol>("JoystickKeyLeft", SpectrumKeySymbol.Key5);
+ joystickKeyRight = new SettingValue<SpectrumKeySymbol>("JoystickKeyRight", SpectrumKeySymbol.Key8);
+ joystickKeyFire1 = new SettingValue<SpectrumKeySymbol>("JoystickKeyFire1", SpectrumKeySymbol.Key0);
+ joystickKeyFire2 = new SettingValue<SpectrumKeySymbol>("JoystickKeyFire2", SpectrumKeySymbol.Key0);
+ joystickLock = new SettingValue<JoystickLock>("JoystickLock", JoystickLock.EightWay);
#if DEBUG
- tapeUrl = new SettingValue<string>("tapeurl", "http://noddybox.co.uk/spec", this);
+ tapeUrl = new SettingValue<string>("tapeurl", "http://noddybox.co.uk/spec");
#else
- tapeUrl = new SettingValue<string>("tapeurl", "http://enter-a-url.here/possible-path", this);
+ tapeUrl = new SettingValue<string>("tapeurl", "http://enter-a-url.here/possible-path");
#endif
}
@@ -112,7 +166,6 @@ namespace wpspec
{
private string name;
private T setting;
- private Settings parent;
public T Setting
{
@@ -137,15 +190,13 @@ namespace wpspec
}
IsolatedStorageSettings.ApplicationSettings.Save();
- parent.NotifyPropertyChanged(name);
}
}
}
- public SettingValue(string name, T defaultValue, Settings parent)
+ public SettingValue(string name, T defaultValue)
{
this.name = name;
- this.parent = parent;
try
{
@@ -155,8 +206,6 @@ namespace wpspec
{
setting = defaultValue;
}
-
- parent.NotifyPropertyChanged(name);
}
}
diff --git a/wpspec/wpspec/SettingsPage.xaml b/wpspec/wpspec/SettingsPage.xaml
index 6c12dda..a3857b1 100644
--- a/wpspec/wpspec/SettingsPage.xaml
+++ b/wpspec/wpspec/SettingsPage.xaml
@@ -40,20 +40,16 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<toolkit:ListPicker Header="{Binding SettingsJoystickLock, Source={StaticResource Strings}}"
+ ItemsSource="{Binding JoystickLockValues, Mode=OneWay}"
SelectedIndex="{Binding JoystickLock, Mode=TwoWay, Converter={StaticResource IntToEnum}}"
- Grid.Row="0">
- <toolkit:ListPickerItem>Eight Way</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Four Way</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Two Way Horizontal</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Two Way Vertical</toolkit:ListPickerItem>
- </toolkit:ListPicker>
- <toolkit:ToggleSwitch IsChecked="{Binding KempstonJoystick, Mode=TwoWay}"
+ Grid.Row="0" />
+ <CheckBox IsChecked="{Binding KempstonJoystick, Mode=TwoWay}"
Content="{Binding SettingsKempstonJoystick, Source={StaticResource Strings}}"
Grid.Row="1" />
- <toolkit:ToggleSwitch IsChecked="{Binding FullerJoystick, Mode=TwoWay}"
+ <CheckBox IsChecked="{Binding FullerJoystick, Mode=TwoWay}"
Content="{Binding SettingsFullerJoystick, Source={StaticResource Strings}}"
Grid.Row="2" />
- <toolkit:ToggleSwitch IsChecked="{Binding KeyboardJoystick, Mode=TwoWay}"
+ <CheckBox IsChecked="{Binding KeyboardJoystick, Mode=TwoWay}"
Content="{Binding SettingsKeyboardJoystick, Source={StaticResource Strings}}"
Grid.Row="3" />
<Grid Grid.Row="4" Visibility="{Binding KeyboardJoystick, Mode=OneWay, Converter={StaticResource BoolToVisibility}}">
@@ -64,49 +60,47 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<toolkit:ListPicker Header="{Binding SettingsKeyUp, Source={StaticResource Strings}}"
- Grid.Row="0">
- <toolkit:ListPickerItem>Test 1</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 2</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 3</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 4</toolkit:ListPickerItem>
- </toolkit:ListPicker>
+ ItemsSource="{Binding KeySymbolValues}"
+ SelectedIndex="{Binding JoystickKeyUp, Mode=TwoWay, Converter={StaticResource IntToEnum}}"
+ Grid.Row="0"/>
<toolkit:ListPicker Header="{Binding SettingsKeyDown, Source={StaticResource Strings}}"
- Grid.Row="1">
- <toolkit:ListPickerItem>Test 1</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 2</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 3</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 4</toolkit:ListPickerItem>
- </toolkit:ListPicker>
+ ItemsSource="{Binding KeySymbolValues}"
+ SelectedIndex="{Binding JoystickKeyDown, Mode=TwoWay, Converter={StaticResource IntToEnum}}"
+ Grid.Row="1"/>
<toolkit:ListPicker Header="{Binding SettingsKeyLeft, Source={StaticResource Strings}}"
- Grid.Row="2">
- <toolkit:ListPickerItem>Test 1</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 2</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 3</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 4</toolkit:ListPickerItem>
- </toolkit:ListPicker>
+ ItemsSource="{Binding KeySymbolValues}"
+ SelectedIndex="{Binding JoystickKeyLeft, Mode=TwoWay, Converter={StaticResource IntToEnum}}"
+ Grid.Row="2"/>
<toolkit:ListPicker Header="{Binding SettingsKeyRight, Source={StaticResource Strings}}"
- Grid.Row="3">
- <toolkit:ListPickerItem>Test 1</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 2</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 3</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 4</toolkit:ListPickerItem>
- </toolkit:ListPicker>
+ ItemsSource="{Binding KeySymbolValues}"
+ SelectedIndex="{Binding JoystickKeyRight, Mode=TwoWay, Converter={StaticResource IntToEnum}}"
+ Grid.Row="3"/>
<toolkit:ListPicker Header="{Binding SettingsKeyFire1, Source={StaticResource Strings}}"
- Grid.Row="4">
- <toolkit:ListPickerItem>Test 1</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 2</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 3</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 4</toolkit:ListPickerItem>
- </toolkit:ListPicker>
+ ItemsSource="{Binding KeySymbolValues}"
+ SelectedIndex="{Binding JoystickKeyFire1, Mode=TwoWay, Converter={StaticResource IntToEnum}}"
+ Grid.Row="4"/>
<toolkit:ListPicker Header="{Binding SettingsKeyFire2, Source={StaticResource Strings}}"
- Grid.Row="5">
- <toolkit:ListPickerItem>Test 1</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 2</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 3</toolkit:ListPickerItem>
- <toolkit:ListPickerItem>Test 4</toolkit:ListPickerItem>
- </toolkit:ListPicker>
+ ItemsSource="{Binding KeySymbolValues}"
+ SelectedIndex="{Binding JoystickKeyFire2, Mode=TwoWay, Converter={StaticResource IntToEnum}}"
+ Grid.Row="5"/>
+ <Grid Grid.Row="6">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Button Content="{Binding SettingsCursorJoystick, Source={StaticResource Strings}}"
+ Grid.Row="0" Grid.Column="0"
+ Click="CursorClick"/>
+ <Button Content="{Binding SettingsManicJoystick, Source={StaticResource Strings}}"
+ Grid.Row="0" Grid.Column="1"
+ Click="MinerWillyClick" />
+ </Grid>
</Grid>
</Grid>
</ScrollViewer>
@@ -115,7 +109,10 @@
<!-- Sound Settings -->
<controls:PanoramaItem Header="{Binding SettingsPageTitleSound, Source={StaticResource Strings}}">
<Grid>
- <toolkit:ToggleSwitch IsChecked="{Binding Sound, Mode=TwoWay}"
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <CheckBox IsChecked="{Binding Sound, Mode=TwoWay}"
Content="{Binding SettingsSoundText, Source={StaticResource Strings}}"
Grid.Row="2" />
</Grid>
diff --git a/wpspec/wpspec/SettingsPage.xaml.cs b/wpspec/wpspec/SettingsPage.xaml.cs
index 301bcf8..98854fa 100644
--- a/wpspec/wpspec/SettingsPage.xaml.cs
+++ b/wpspec/wpspec/SettingsPage.xaml.cs
@@ -10,15 +10,38 @@ using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
+using wpspec.ViewModels;
+using wpspec.Spectrum;
namespace wpspec
{
public partial class SettingsPage : PhoneApplicationPage
{
+ private SettingsViewModel model = new SettingsViewModel();
public SettingsPage()
{
InitializeComponent();
- DataContext = Settings.Instance;
+ DataContext = model;
+ }
+
+ private void CursorClick(object sender, RoutedEventArgs e)
+ {
+ model.JoystickKeyLeft = SpectrumKeySymbol.Key5;
+ model.JoystickKeyUp = SpectrumKeySymbol.Key6;
+ model.JoystickKeyDown = SpectrumKeySymbol.Key7;
+ model.JoystickKeyRight = SpectrumKeySymbol.Key8;
+ model.JoystickKeyFire1 = SpectrumKeySymbol.Key0;
+ model.JoystickKeyFire2 = SpectrumKeySymbol.Key0;
+ }
+
+ private void MinerWillyClick(object sender, RoutedEventArgs e)
+ {
+ model.JoystickKeyLeft = SpectrumKeySymbol.KeyQ;
+ model.JoystickKeyUp = SpectrumKeySymbol.KeyEnter;
+ model.JoystickKeyDown = SpectrumKeySymbol.KeyEnter;
+ model.JoystickKeyRight = SpectrumKeySymbol.KeyW;
+ model.JoystickKeyFire1 = SpectrumKeySymbol.KeyEnter;
+ model.JoystickKeyFire2 = SpectrumKeySymbol.KeySpace;
}
}
} \ No newline at end of file
diff --git a/wpspec/wpspec/Spectrum/SpectrumKeySymbol.cs b/wpspec/wpspec/Spectrum/SpectrumKeySymbol.cs
index ec3ecdf..8869d99 100644
--- a/wpspec/wpspec/Spectrum/SpectrumKeySymbol.cs
+++ b/wpspec/wpspec/Spectrum/SpectrumKeySymbol.cs
@@ -36,12 +36,6 @@ namespace wpspec.Spectrum
Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key0,
KeyQ, KeyW, KeyE, KeyR, KeyT, KeyY, KeyU, KeyI, KeyO, KeyP,
KeyA, KeyS, KeyD, KeyF, KeyG, KeyH, KeyJ, KeyK, KeyL, KeyEnter,
- KeyCapsShift, KeyZ, KeyX, KeyC, KeyV, KeyB, KeyN, KeyM, KeySymbolShift, KeySpace,
- KeyReset, KeyJoystick, KeyKeypad, KeyKeyboard,
- KeyJoystickLeft, KeyJoystickRight,
- KeyJoystickUp, KeyJoystickDown,
- KeyJoystickLeftUp, KeyJoystickLeftDown,
- KeyJoystickRightUp, KeyJoystickRightDown,
- KeyJoystickFire1, KeyJoystickFire2
+ KeyCapsShift, KeyZ, KeyX, KeyC, KeyV, KeyB, KeyN, KeyM, KeySymbolShift, KeySpace
}
}
diff --git a/wpspec/wpspec/ViewModels/SettingsViewModel.cs b/wpspec/wpspec/ViewModels/SettingsViewModel.cs
new file mode 100644
index 0000000..fd03223
--- /dev/null
+++ b/wpspec/wpspec/ViewModels/SettingsViewModel.cs
@@ -0,0 +1,207 @@
+using System;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using Noddybox.Emulation.Xna.Input.Joystick;
+using System.Collections.Generic;
+using System.Reflection;
+using wpspec.Converters;
+using wpspec.Spectrum;
+
+namespace wpspec.ViewModels
+{
+ public class SettingsViewModel : BaseViewModel
+ {
+ #region Private
+
+ private T[] GetEnumeratedValues<T>()
+ {
+ Type t = typeof(T);
+
+ return t.GetFields(BindingFlags.Static | BindingFlags.Public).Where(r => r.IsLiteral).Select(r => (T)r.GetValue(null)).ToArray();
+ }
+
+ #endregion
+
+ #region Bindings
+
+ /// <summary>
+ /// Get a list of the Joystick lock values.
+ /// </summary>
+ public IEnumerable<string> JoystickLockValues
+ {
+ get
+ {
+ ConvertCamelToHuman conv = new ConvertCamelToHuman();
+ List<string> l = new List<string>();
+
+ foreach (JoystickLock i in GetEnumeratedValues<JoystickLock>())
+ {
+ l.Add((string)conv.Convert(i, typeof(string), null, null));
+ }
+
+ return l;
+ }
+ }
+
+ /// <summary>
+ /// Get a list of the Keyboard symbol values.
+ /// </summary>
+ public IEnumerable<string> KeySymbolValues
+ {
+ get
+ {
+ ConvertCamelToHuman conv = new ConvertCamelToHuman();
+ List<string> l = new List<string>();
+
+ foreach (SpectrumKeySymbol i in GetEnumeratedValues<SpectrumKeySymbol>())
+ {
+ l.Add((string)conv.Convert(i, typeof(string), null, null));
+ }
+
+ return l;
+ }
+ }
+
+ /// <summary>
+ /// Get/set whether sound is enabled.
+ /// </summary>
+ public bool Sound
+ {
+ get {return sound;}
+ set {SetValue(ref sound, value, "Sound"); Settings.Instance.Sound = value;}
+ }
+
+ private bool sound = Settings.Instance.Sound;
+
+ /// <summary>
+ /// Get/set URL to load tapes from.
+ /// </summary>
+ public string TapeUrl
+ {
+ get {return tapeUrl;}
+ set {SetValue(ref tapeUrl, value, "TapeUrl"); Settings.Instance.TapeUrl = value;}
+ }
+
+ private string tapeUrl = Settings.Instance.TapeUrl;
+
+ /// <summary>
+ /// Get/set whether Kempston joystick emulation is enabled.
+ /// </summary>
+ public bool KempstonJoystick
+ {
+ get {return kempstonJoystick;}
+ set {SetValue(ref kempstonJoystick, value, "KempstonJoystick"); Settings.Instance.KempstonJoystick = value;}
+ }
+
+ private bool kempstonJoystick = Settings.Instance.KempstonJoystick;
+
+ /// <summary>
+ /// Get/set whether Fuller joystick emulation is enabled.
+ /// </summary>
+ public bool FullerJoystick
+ {
+ get {return fullerJoystick;}
+ set {SetValue(ref fullerJoystick, value, "FullerJoystick"); Settings.Instance.FullerJoystick = value;}
+ }
+
+ private bool fullerJoystick = Settings.Instance.FullerJoystick;
+
+ /// <summary>
+ /// Get/set whether a keyboard-based joystick emulation is enabled.
+ /// </summary>
+ public bool KeyboardJoystick
+ {
+ get {return keyboardJoystick;}
+ set {SetValue(ref keyboardJoystick, value, "KeyboardJoystick"); Settings.Instance.KeyboardJoystick = value;}
+ }
+
+ private bool keyboardJoystick = Settings.Instance.KeyboardJoystick;
+
+ /// <summary>
+ /// Get/set the joystick lock type.
+ /// </summary>
+ public JoystickLock JoystickLock
+ {
+ get {return joystickLock;}
+ set {SetValue(ref joystickLock, value, "JoystickLock"); Settings.Instance.JoystickLock = value;}
+ }
+
+ private JoystickLock joystickLock = Settings.Instance.JoystickLock;
+
+ /// <summary>
+ /// Get/set the joystick up key.
+ /// </summary>
+ public SpectrumKeySymbol JoystickKeyUp
+ {
+ get {return joystickKeyUp;}
+ set {SetValue(ref joystickKeyUp, value, "JoystickKeyUp"); Settings.Instance.JoystickKeyUp = value;}
+ }
+
+ private SpectrumKeySymbol joystickKeyUp = Settings.Instance.JoystickKeyUp;
+
+ /// <summary>
+ /// Get/set the joystick down key.
+ /// </summary>
+ public SpectrumKeySymbol JoystickKeyDown
+ {
+ get {return joystickKeyDown;}
+ set {SetValue(ref joystickKeyDown, value, "JoystickKeyDown"); Settings.Instance.JoystickKeyDown = value;}
+ }
+
+ private SpectrumKeySymbol joystickKeyDown = Settings.Instance.JoystickKeyDown;
+
+ /// <summary>
+ /// Get/set the joystick left key.
+ /// </summary>
+ public SpectrumKeySymbol JoystickKeyLeft
+ {
+ get {return joystickKeyLeft;}
+ set {SetValue(ref joystickKeyLeft, value, "JoystickKeyLeft"); Settings.Instance.JoystickKeyLeft = value;}
+ }
+
+ private SpectrumKeySymbol joystickKeyLeft = Settings.Instance.JoystickKeyLeft;
+
+ /// <summary>
+ /// Get/set the joystick right key.
+ /// </summary>
+ public SpectrumKeySymbol JoystickKeyRight
+ {
+ get {return joystickKeyRight;}
+ set {SetValue(ref joystickKeyRight, value, "JoystickKeyRight"); Settings.Instance.JoystickKeyRight = value;}
+ }
+
+ private SpectrumKeySymbol joystickKeyRight = Settings.Instance.JoystickKeyRight;
+
+ /// <summary>
+ /// Get/set the joystick fire 1 key.
+ /// </summary>
+ public SpectrumKeySymbol JoystickKeyFire1
+ {
+ get {return joystickKeyFire1;}
+ set {SetValue(ref joystickKeyFire1, value, "JoystickKeyFire1"); Settings.Instance.JoystickKeyFire1 = value;}
+ }
+
+ private SpectrumKeySymbol joystickKeyFire1 = Settings.Instance.JoystickKeyFire1;
+
+ /// <summary>
+ /// Get/set the joystick fire 2 key.
+ /// </summary>
+ public SpectrumKeySymbol JoystickKeyFire2
+ {
+ get {return joystickKeyFire2;}
+ set {SetValue(ref joystickKeyFire2, value, "JoystickKeyFire2"); Settings.Instance.JoystickKeyFire2 = value;}
+ }
+
+ private SpectrumKeySymbol joystickKeyFire2 = Settings.Instance.JoystickKeyFire2;
+
+ #endregion
+ }
+}
diff --git a/wpspec/wpspec/wpspec.csproj b/wpspec/wpspec/wpspec.csproj
index 5795046..e1f20ee 100644
--- a/wpspec/wpspec/wpspec.csproj
+++ b/wpspec/wpspec/wpspec.csproj
@@ -127,6 +127,7 @@
<Compile Include="ViewModels\DisassemblerLine.cs" />
<Compile Include="ViewModels\DisassemblerViewModel.cs" />
<Compile Include="ViewModels\OpenRemoteTapeViewModel.cs" />
+ <Compile Include="ViewModels\SettingsViewModel.cs" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">