aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs29
1 files changed, 28 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
index 246b86469..b413fee0d 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
@@ -86,6 +86,27 @@ namespace Tango.PPC.MachineSettings.ViewModels
set { _enableRemoteAssistance = value; RaisePropertyChangedAuto(); OnEnableRemoteAssistanceChanged(); }
}
+ private bool _enableLockScreen;
+ public bool EnableLockScreen
+ {
+ get { return _enableLockScreen; }
+ set { _enableLockScreen = value; RaisePropertyChangedAuto(); }
+ }
+
+ private int _lockScreenTimeoutMinutes;
+ public int LockScreenTimeoutMinutes
+ {
+ get { return _lockScreenTimeoutMinutes; }
+ set { _lockScreenTimeoutMinutes = value; RaisePropertyChangedAuto(); }
+ }
+
+ private String _lockScreenPassword;
+ public String LockScreenPassword
+ {
+ get { return _lockScreenPassword; }
+ set { _lockScreenPassword = value; RaisePropertyChangedAuto(); }
+ }
+
#endregion
#region Commands
@@ -119,12 +140,15 @@ namespace Tango.PPC.MachineSettings.ViewModels
{
Machine.SupportedJobTypes = SelectedJobTypes.SynchedSource.ToList();
Machine.SupportedColorSpaces = SelectedColorSpaces.SynchedSource.ToList();
- Machine.MapPrimitivesWithStringsNoNullsTo(MachineProvider.Machine);
+ Machine.MapPrimitivesWithStrings(MachineProvider.Machine);
Settings.EnableHotSpot = EnableHotSpot;
Settings.HotSpotPassword = HotSpotPassword;
Settings.EnableExternalBridge = EnableExternalBridge;
Settings.ExternalBridgePassword = ExternalBridgePassword;
+ Settings.EnableLockScreen = EnableLockScreen;
+ Settings.LockScreenTimeout = TimeSpan.FromMinutes(LockScreenTimeoutMinutes);
+ Settings.LockScreenPassword = LockScreenPassword;
Settings.Save();
await MachineProvider.SaveMachine();
@@ -166,6 +190,9 @@ namespace Tango.PPC.MachineSettings.ViewModels
_enableRemoteAssistance = RemoteAssistanceProvider.IsEnabled;
RaisePropertyChanged(nameof(EnableRemoteAssistance));
+ EnableLockScreen = Settings.EnableLockScreen;
+ LockScreenTimeoutMinutes = (int)Settings.LockScreenTimeout.TotalMinutes;
+ LockScreenPassword = Settings.LockScreenPassword;
SelectedJobTypes = new SelectedObjectCollection<JobTypes>(Enum.GetValues(typeof(JobTypes)).Cast<JobTypes>().ToObservableCollection(), Machine.SupportedJobTypes.ToObservableCollection());
SelectedColorSpaces = new SelectedObjectCollection<ColorSpaces>(Enum.GetValues(typeof(ColorSpaces)).Cast<ColorSpaces>().Where(x => x.IsUserSpace()).ToObservableCollection(), Machine.SupportedColorSpaces.ToObservableCollection());