diff --git a/FModel/Properties/Settings.Designer.cs b/FModel/Properties/Settings.Designer.cs index 68eae981..4dab1138 100644 --- a/FModel/Properties/Settings.Designer.cs +++ b/FModel/Properties/Settings.Designer.cs @@ -95,6 +95,18 @@ namespace FModel.Properties { } } + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string AudioPlayerDevice { + get { + return ((string)(this["AudioPlayerDevice"])); + } + set { + this["AudioPlayerDevice"] = value; + } + } + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] diff --git a/FModel/Properties/Settings.settings b/FModel/Properties/Settings.settings index 6b790654..b4b4864a 100644 --- a/FModel/Properties/Settings.settings +++ b/FModel/Properties/Settings.settings @@ -17,9 +17,12 @@ True - - True - + + True + + + + diff --git a/FModel/Utils/Keys.cs b/FModel/Utils/Keys.cs index 69872aec..2910a99d 100644 --- a/FModel/Utils/Keys.cs +++ b/FModel/Utils/Keys.cs @@ -52,7 +52,7 @@ namespace FModel.Utils { // i can use TestAesKey here but that means it's gonna test here then right after to set the key // so a try catch when setting the key seems better - menuItem.PakFile.AesKey = sKey.ToBytesKey(); + menuItem.PakFile.AesKey = sKey.Trim().ToBytesKey(); } catch (System.Exception e) { @@ -72,7 +72,7 @@ namespace FModel.Utils { // i can use TestAesKey here but that means it's gonna test here then right after to set the key // so a try catch when setting the key seems better - menuItem.PakFile.AesKey = dKey.ToBytesKey(); + menuItem.PakFile.AesKey = dKey.Trim().ToBytesKey(); } catch (System.Exception e) { diff --git a/FModel/ViewModels/SoundPlayer/InputFileViewModel.cs b/FModel/ViewModels/SoundPlayer/InputFileViewModel.cs index ea7ffa41..2213e7ac 100644 --- a/FModel/ViewModels/SoundPlayer/InputFileViewModel.cs +++ b/FModel/ViewModels/SoundPlayer/InputFileViewModel.cs @@ -1,4 +1,5 @@ using FModel.Windows.SoundPlayer.Visualization; +using System.Collections.ObjectModel; using System.Windows; namespace FModel.ViewModels.SoundPlayer @@ -32,18 +33,18 @@ namespace FModel.ViewModels.SoundPlayer public class InputFileViewModel : PropertyChangedBase { - private Device _device = Device.GetDefaultDevice(); + private ObservableCollection _devices = new ObservableCollection(Device.GetOutputDevices()); private bool _isEnabled = true; private string _content; private string _bytes; private string _duration; private float _volume = 0.5f; - public Device Device + public ObservableCollection Devices { - get { return _device; } + get { return _devices; } - set { this.SetProperty(ref this._device, value); } + set { this.SetProperty(ref this._devices, value); } } public bool IsEnabled { diff --git a/FModel/Windows/SoundPlayer/AudioPlayer.xaml b/FModel/Windows/SoundPlayer/AudioPlayer.xaml index 4b05994c..0f8f8148 100644 --- a/FModel/Windows/SoundPlayer/AudioPlayer.xaml +++ b/FModel/Windows/SoundPlayer/AudioPlayer.xaml @@ -81,8 +81,8 @@