aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-04-23 16:13:41 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-04-23 16:13:41 +0300
commitba4aec4c691476d68b3da383a70bff42341c7171 (patch)
treecff1ec9b2b4c6bc09ceb4d2a7a64f8cf1e6a8fc0 /Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
parent2c48f9ef5ee4978f531e18d0c5945f33705bfe46 (diff)
downloadTango-ba4aec4c691476d68b3da383a70bff42341c7171.tar.gz
Tango-ba4aec4c691476d68b3da383a70bff42341c7171.zip
Implemented screen lock for PPC.
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.cs27
1 files changed, 27 insertions, 0 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 c858e982e..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
@@ -125,6 +146,9 @@ namespace Tango.PPC.MachineSettings.ViewModels
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());