From 5571ab086f6288b27117e3eaae443415a162403c Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Tue, 5 May 2020 19:24:45 +0300 Subject: Require Safety Level Operations ! --- .../ViewModels/MachineLoginViewVM.cs | 5 +++++ .../ViewModels/MainViewVM.cs | 2 ++ .../Views/MachineLoginView.xaml | 23 ++++++++++++++-------- 3 files changed, 22 insertions(+), 8 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs index 9bee35697..81d3f4243 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs @@ -26,6 +26,11 @@ namespace Tango.MachineStudio.UI.ViewModels /// public ExternalBridgeLoginIntent Intent { get; set; } + /// + /// Gets or sets a value indicating whether to require safety level operations permission from the remote machine. + /// + public bool RequireSafetyOperations { get; set; } + /// /// Gets or sets the login command. /// 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 46491c823..0e02d779f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -598,6 +598,8 @@ namespace Tango.MachineStudio.UI.ViewModels Password = config.Password, UserGuid = AuthenticationProvider.CurrentUser.Guid, Intent = config.Intent, + UserName = AuthenticationProvider.CurrentUser.Contact.FullName, + RequireSafetyLevelOperations = config.RequireSafetyOperations }); _reconnectionMachine = machine; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml index 5be9ba089..e4cdfe199 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml @@ -17,14 +17,21 @@ - - - - + + + + Require Safety Level Operations + + + + + + + -- cgit v1.3.1 From ded3658497424534f582b99a8c5702f5c402d0dd Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sun, 10 May 2020 19:05:07 +0300 Subject: Fixed issue with MS users & roles duplicate roles. --- .../Tango.MachineStudio.UsersAndRoles/ViewModels/MainViewVM.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModels/MainViewVM.cs index d20b74c77..16395d6bc 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModels/MainViewVM.cs @@ -274,6 +274,11 @@ namespace Tango.MachineStudio.UsersAndRoles.ViewModels try { ManagedUser.Validate(_userContext); + + if (ManagedUser.Roles.GroupBy(x => x.RoleEnum).Any(x => x.Count() > 1)) + { + throw new InvalidOperationException("Cannot save user with duplicate roles."); + } } catch (Exception ex) { @@ -296,6 +301,11 @@ namespace Tango.MachineStudio.UsersAndRoles.ViewModels try { ManagedUser.Validate(_userContext); + + if (ManagedUser.Roles.GroupBy(x => x.RoleEnum).Any(x => x.Count() > 1)) + { + throw new InvalidOperationException("Cannot save user with duplicate roles."); + } } catch (Exception ex) { -- cgit v1.3.1 From 9ead141002c63c1a44d7851fa4a4a1902c0bfe89 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sun, 10 May 2020 19:18:31 +0300 Subject: Fixed issue with MS color catalogs duplicate color codes/names. --- .../ViewModels/MainViewVM.cs | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/MainViewVM.cs index 406622ee1..8a33f15ef 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/MainViewVM.cs @@ -318,6 +318,35 @@ namespace Tango.MachineStudio.Catalogs.ViewModels try { IsFree = false; + + //Validate color codes. + var duplicateCodes = ActiveCatalog + .ColorCatalogsGroups + .SelectMany(x => x.ColorCatalogsItems) + .GroupBy(x => x.Code) + .Where(x => x.Count() > 1) + .Select(x => x.First().Code) + .ToList(); + + if (duplicateCodes.Count > 0) + { + throw new InvalidOperationException($"Duplicate color codes found:\n{String.Join(Environment.NewLine, duplicateCodes)}"); + } + + //Validate color names. + var duplicateNames = ActiveCatalog + .ColorCatalogsGroups + .SelectMany(x => x.ColorCatalogsItems) + .GroupBy(x => x.Name) + .Where(x => x.Count() > 1) + .Select(x => x.First().Name) + .ToList(); + + if (duplicateNames.Count > 0) + { + throw new InvalidOperationException($"Duplicate color names found:\n{String.Join(Environment.NewLine, duplicateNames)}"); + } + ActiveCatalog.LastUpdated = DateTime.UtcNow; await _activeCatalogContext.SaveChangesAsync(); -- cgit v1.3.1 From db410e2e7b3cc06c289c47dc21395edee31c91f7 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 12 May 2020 09:54:08 +0300 Subject: Machine Studio 4.1.10 PPC 1.1.14 --- .../Machine Studio Installer.aip | 33 +++++++++++++++++++-- .../PPC Installer-cache/cacheIndex.txt | Bin 52 -> 52 bytes .../Advanced Installer Projects/PPC Installer.aip | 6 ++-- .../Properties/AssemblyInfo.cs | 2 +- .../PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs | 2 +- .../Visual_Studio/PPC/Tango.PPC.UI/app.manifest | 2 +- 6 files changed, 36 insertions(+), 9 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio') diff --git a/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip index 19b86bbbc..d4f515069 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip +++ b/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip @@ -16,10 +16,10 @@ - + - + @@ -806,6 +806,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -817,7 +844,7 @@ - + diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt index a603ff06b..9453b5c13 100644 Binary files a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt and b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt differ diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip index 743de5900..a0f0fc1b9 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip +++ b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip @@ -18,10 +18,10 @@ - + - + @@ -468,7 +468,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs index 26859b94a..20cfa84df 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs @@ -4,5 +4,5 @@ using System.Runtime.InteropServices; [assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)] [assembly: AssemblyTitle("Tango - Machine Studio")] -[assembly: AssemblyVersion("4.1.9.0")] +[assembly: AssemblyVersion("4.1.10.0")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs index b51937fa2..3a3a5910f 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs @@ -8,4 +8,4 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango PPC Application")] -[assembly: AssemblyVersion("1.1.13.0")] +[assembly: AssemblyVersion("1.1.14.0")] diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index efc5f8179..d72e75011 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - + -- cgit v1.3.1