diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-05-16 18:22:47 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-05-16 18:22:47 +0300 |
| commit | b9ff3e2b899b22090b5d206c1f95189aa7fd7ecb (patch) | |
| tree | 2e2851d21fbf8304ff2ada7e3089c342547dd95d /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | |
| parent | 62600b93f932aa2751d6f0c00f4699a7eb2d7c7b (diff) | |
| download | Tango-b9ff3e2b899b22090b5d206c1f95189aa7fd7ecb.tar.gz Tango-b9ff3e2b899b22090b5d206c1f95189aa7fd7ecb.zip | |
New Settings Library.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs index 04b973f23..d3d90c0cc 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -53,6 +53,7 @@ namespace Tango.MachineStudio.UI.ViewModels private Thread _updateCheckThread; private IEventLogger _eventLogger; private IHtmlPresenter _htmlPresenter; + private MachineStudioSettings _settings; /// <summary> /// Gets or sets the current loaded module. @@ -281,6 +282,8 @@ namespace Tango.MachineStudio.UI.ViewModels SpeechProvider = speechProvider; _htmlPresenter = htmlPresenter; + _settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>(); + StartModuleCommand = new RelayCommand<IStudioModule>(StartModule); HomeCommand = new RelayCommand(Home); @@ -473,8 +476,8 @@ namespace Tango.MachineStudio.UI.ViewModels PostMessage(new MachineConnectionChangedMessage() { Machine = x.SelectedMachine }); _eventLogger.Log(String.Format("Successfully connected to machine {0} via USB", x.SelectedMachine.SerialNumber)); - SettingsManager.Default.MachineStudio.LastVirtualMachineSerialNumber = vm.SelectedMachine.SerialNumber; - SettingsManager.SaveDefaultSettings(); + _settings.LastVirtualMachineSerialNumber = vm.SelectedMachine.SerialNumber; + _settings.Save(); } catch (Exception ex) { |
