aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-03-03 08:43:14 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-03-03 08:43:14 +0200
commit76c7cd55ecff7c282761d7a9bdce899c8113ffc0 (patch)
treed60e7cfb9a1c5ee8cb3cc63766e84141219d3141 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
parent1f003378a385fdc603ac6fc0e2cde6ab57deeaf2 (diff)
parentf3dd7087a42cb16bf19da0de998cf7052171d596 (diff)
downloadTango-76c7cd55ecff7c282761d7a9bdce899c8113ffc0.tar.gz
Tango-76c7cd55ecff7c282761d7a9bdce899c8113ffc0.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
index 8ac8e6acd..35aca807c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
@@ -65,7 +65,6 @@ namespace Tango.MachineStudio.Developer.ViewModels
private DeveloperNavigationManager _navigation;
private INavigationManager _msNavigation;
private bool _blockInvalidateCommands;
- private IAuthenticationProvider _authentication;
private ObservablesContext _machineDbContext;
private ObservablesContext _activeJobDbContext;
private IEventLogger _eventLogger;
@@ -549,6 +548,8 @@ namespace Tango.MachineStudio.Developer.ViewModels
set { _enableColorConversion = value; RaisePropertyChangedAuto(); }
}
+ public IAuthenticationProvider AuthenticationProvider { get; set; }
+
#endregion
#region Commands
@@ -707,7 +708,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
CanWork = true;
EnableColorConversion = true;
- _authentication = authentication;
+ AuthenticationProvider = authentication;
_notification = notificationProvider;
_speech = speech;
@@ -2052,7 +2053,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
Job newJob = new Job();
newJob.Name = jobName;
newJob.CreationDate = DateTime.UtcNow;
- newJob.UserGuid = _authentication.CurrentUser.Guid;
+ newJob.UserGuid = AuthenticationProvider.CurrentUser.Guid;
if (String.IsNullOrWhiteSpace(settings.DefaultJobRmlGuid))
{
@@ -2255,7 +2256,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
job.Name = jobName;
job.Name = jobName;
job.CreationDate = DateTime.UtcNow;
- job.UserGuid = _authentication.CurrentUser.Guid;
+ job.UserGuid = AuthenticationProvider.CurrentUser.Guid;
job.Rml = _machineDbContext.Rmls.FirstOrDefault();
job.WindingMethod = _machineDbContext.WindingMethods.FirstOrDefault();
job.SpoolType = _machineDbContext.SpoolTypes.FirstOrDefault();