aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-04-23 22:25:54 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-04-23 22:25:54 +0300
commitebcb9ce27131e4bbd14c96b5f897a67bc752aaeb (patch)
tree293aee8b1751ce7fce542645722c0f1a96b73097 /Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
parent52967e858bd52621208f6360e84f4c47ec435816 (diff)
parent636ad730569dfef1a4ee04c8d716d510bcc47ee1 (diff)
downloadTango-ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb.tar.gz
Tango-ebcb9ce27131e4bbd14c96b5f897a67bc752aaeb.zip
merge alarm handling from remote
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());