From 45a4da6b34d2aedea27e2826931f0705eb05130f Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 8 Jul 2019 12:48:31 +0300 Subject: Started working catalogs module. --- .../Tango.MachineStudio.Catalogs/App.config | 85 +++++++++++ .../Tango.MachineStudio.Catalogs/CatalogsModule.cs | 63 ++++++++ .../Contracts/IMainView.cs | 20 +++ .../Images/catalogs.png | Bin 0 -> 40817 bytes .../Images/catalogs_module.jpg | Bin 0 -> 148645 bytes .../Properties/AssemblyInfo.cs | 19 +++ .../Properties/Resources.Designer.cs | 62 ++++++++ .../Properties/Resources.resx | 117 +++++++++++++++ .../Properties/Settings.Designer.cs | 30 ++++ .../Properties/Settings.settings | 7 + .../Tango.MachineStudio.Catalogs.csproj | 165 +++++++++++++++++++++ .../ViewModelLocator.cs | 29 ++++ .../ViewModels/CatalogVM.cs | 24 +++ .../ViewModels/MainViewVM.cs | 17 +++ .../Views/CatalogView.xaml | 14 ++ .../Views/CatalogView.xaml.cs | 28 ++++ .../Views/CatalogsView.xaml | 76 ++++++++++ .../Views/CatalogsView.xaml.cs | 28 ++++ .../Views/MainView.xaml | 18 +++ .../Views/MainView.xaml.cs | 34 +++++ .../Tango.MachineStudio.Catalogs/packages.config | 7 + 21 files changed, 843 insertions(+) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/App.config create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/CatalogsModule.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Contracts/IMainView.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Images/catalogs.png create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Images/catalogs_module.jpg create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Resources.Designer.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Resources.resx create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Settings.Designer.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Settings.settings create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Tango.MachineStudio.Catalogs.csproj create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModelLocator.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/CatalogVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/MainViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/packages.config (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/App.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/App.config new file mode 100644 index 000000000..2285e8847 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/App.config @@ -0,0 +1,85 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/CatalogsModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/CatalogsModule.cs new file mode 100644 index 000000000..389a2cb5d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/CatalogsModule.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media.Imaging; +using Tango.BL.Enumerations; +using Tango.MachineStudio.Catalogs.Views; +using Tango.MachineStudio.Common; +using Tango.SharedUI.Helpers; + +namespace Tango.MachineStudio.Catalogs +{ + [StudioModule(20)] + public class CatalogsModule : StudioModuleBase + { + public override string Name + { + get + { + return "Catalogs"; + } + } + + public override string Description + { + get + { + return "Create and manage Twine's global color catalogs."; + } + } + + public override BitmapSource Image + { + get + { + return ResourceHelper.GetImageFromResources("Images/catalogs_module.jpg"); + } + } + + public override Type MainViewType + { + get + { + return typeof(MainView); + } + } + + public override Permissions Permission + { + get + { + return Permissions.RunCatalogsModule; + } + } + + public override void Dispose() + { + + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Contracts/IMainView.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Contracts/IMainView.cs new file mode 100644 index 000000000..615dec081 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Contracts/IMainView.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; + +namespace Tango.MachineStudio.Catalogs.Contracts +{ + public enum CatalogsNavigationView + { + CatalogsView, + CatalogView, + } + + public interface IMainView : IView + { + void NavigateTo(CatalogsNavigationView view); + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Images/catalogs.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Images/catalogs.png new file mode 100644 index 000000000..4e38508f5 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Images/catalogs.png differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Images/catalogs_module.jpg b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Images/catalogs_module.jpg new file mode 100644 index 000000000..bc551452b Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Images/catalogs_module.jpg differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..9cafc7e46 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/AssemblyInfo.cs @@ -0,0 +1,19 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +[assembly: AssemblyTitle("Tango - Machine Studio Catalogs Module")] +[assembly: AssemblyVersion("2.0.12.1608")] + +[assembly: ComVisible(false)] + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Resources.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Resources.Designer.cs new file mode 100644 index 000000000..c272c440d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.MachineStudio.Catalogs.Properties { + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if ((resourceMan == null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.MachineStudio.Catalogs.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Resources.resx b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Settings.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Settings.Designer.cs new file mode 100644 index 000000000..8a2599f0a --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.MachineStudio.Catalogs.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Settings.settings b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Tango.MachineStudio.Catalogs.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Tango.MachineStudio.Catalogs.csproj new file mode 100644 index 000000000..1d29166be --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Tango.MachineStudio.Catalogs.csproj @@ -0,0 +1,165 @@ + + + + + Debug + AnyCPU + {7D0FCE3C-9A37-439C-9F9F-B26CFD6A8A33} + library + Tango.MachineStudio.Catalogs + Tango.MachineStudio.Catalogs + v4.6.1 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + true + full + false + ..\..\..\Build\Machine Studio\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\..\Build\Machine Studio\Release\ + TRACE + prompt + 4 + + + + ..\..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll + + + ..\..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll + + + ..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll + + + ..\..\..\packages\MaterialDesignColors.1.1.2\lib\net45\MaterialDesignColors.dll + + + ..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll + + + + + + ..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll + + + + + + + + + 4.0 + + + + + + + + + + + + CatalogView.xaml + + + CatalogsView.xaml + + + MainView.xaml + + + GlobalVersionInfo.cs + + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + {f441feee-322a-4943-b566-110e12fd3b72} + Tango.BL + + + {b4fe6485-4161-4b36-bc08-67e0b53d01b7} + Tango.ColorConversion + + + {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} + Tango.Core + + + {bc932dbd-7cdb-488c-99e4-f02cf441f55e} + Tango.Logging + + + {d8f1ad85-526a-4f50-b6dc-d437af63d8d8} + Tango.Settings + + + {8491d07b-c1f6-4b62-a412-41b9fd2d6538} + Tango.SharedUI + + + {cb0b0aa2-bb24-4bca-a720-45e397684e12} + Tango.MachineStudio.Common + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModelLocator.cs new file mode 100644 index 000000000..27970c466 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModelLocator.cs @@ -0,0 +1,29 @@ +using Tango.Core.DI; +using Tango.MachineStudio.Catalogs.ViewModels; +using Tango.MachineStudio.Catalogs.Views; + +namespace Tango.MachineStudio.Catalogs +{ + /// + /// This class contains static references to all the view models in the + /// application and provides an entry point for the bindings. + /// + public static class ViewModelLocator + { + /// + /// Initializes a new instance of the ViewModelLocator class. + /// + static ViewModelLocator() + { + TangoIOC.Default.Register(); + } + + public static MainViewVM MainViewVM + { + get + { + return TangoIOC.Default.GetInstance(); + } + } + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/CatalogVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/CatalogVM.cs new file mode 100644 index 000000000..7d9c79ada --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/CatalogVM.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using Tango.Core; + +namespace Tango.MachineStudio.Catalogs.ViewModels +{ + public class CatalogVM : ExtendedObject + { + public ColorSpace ColorSpace { get; set; } + + public List SupportedMedia { get; set; } + + public int Colors { get; set; } + + public CatalogVM() + { + SupportedMedia = new List(); + } + } +} 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 new file mode 100644 index 000000000..6b1c82e0f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/MainViewVM.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.MachineStudio.Common; + +namespace Tango.MachineStudio.Catalogs.ViewModels +{ + public class MainViewVM : StudioViewModel + { + public override void OnApplicationReady() + { + + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml new file mode 100644 index 000000000..17198b866 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml @@ -0,0 +1,14 @@ + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml.cs new file mode 100644 index 000000000..02418b677 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.Catalogs.Views +{ + /// + /// Interaction logic for CatalogsView.xaml + /// + public partial class CatalogsView : UserControl + { + public CatalogsView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml new file mode 100644 index 000000000..e324fb8d7 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml.cs new file mode 100644 index 000000000..302ff59f7 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.Catalogs.Views +{ + /// + /// Interaction logic for CatalogsView.xaml + /// + public partial class CatalogView : UserControl + { + public CatalogView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml new file mode 100644 index 000000000..3a1d04e3d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml.cs new file mode 100644 index 000000000..c94282ca1 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/MainView.xaml.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Tango.MachineStudio.Catalogs.Contracts; + +namespace Tango.MachineStudio.Catalogs.Views +{ + /// + /// Interaction logic for MainView.xaml + /// + public partial class MainView : UserControl, IMainView + { + public MainView() + { + InitializeComponent(); + } + + public void NavigateTo(CatalogsNavigationView view) + { + navigationControl.NavigateTo(view.ToString()); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/packages.config new file mode 100644 index 000000000..2c357dae6 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file -- cgit v1.3.1 From c5713f263db2aa8eda95e13c14ed31d1335b6bc0 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 8 Jul 2019 17:50:11 +0300 Subject: Refactoring of all color catalogs objects !!! --- Software/DB/PPC/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/PPC/Tango_log.ldf | Bin 53673984 -> 53673984 bytes Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 22675456 -> 22675456 bytes Software/PMR/Messages/ColorLab/ColorSpace.proto | 4 +- Software/PMR/Messages/Diagnostics/EventType.proto | 4 +- .../Tango.MachineStudio.Catalogs/CatalogsModule.cs | 2 +- .../Controls/CoatsCatalogViewer.xaml | 27 - .../Controls/CoatsCatalogViewer.xaml.cs | 96 --- .../Controls/TwineCatalogViewer.xaml.cs | 22 +- .../Converters/ColorSpaceToImageConverter.cs | 2 +- .../Converters/ColorSpaceToVisibilityConverter.cs | 2 +- .../TwineCatalogNavigationObject.cs | 5 +- .../Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj | 17 +- .../PPC/Modules/Tango.PPC.Jobs/ViewModelLocator.cs | 12 - .../ViewModels/CoatsCatalogViewVM.cs | 153 ----- .../Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs | 119 ++-- .../Tango.PPC.Jobs/ViewModels/JobsViewVM.cs | 4 +- .../ViewModels/TwineCatalogViewVM.cs | 38 +- .../Tango.PPC.Jobs/Views/CoatsCatalogView.xaml | 57 -- .../Tango.PPC.Jobs/Views/CoatsCatalogView.xaml.cs | 28 - .../PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml | 40 +- .../PPC/Modules/Tango.PPC.Jobs/Views/MainView.xaml | 1 - .../Controls/CoatsCatalogControl.xaml | 145 ----- .../Controls/CoatsCatalogControl.xaml.cs | 112 ---- .../Controls/TwineCatalogControl.xaml | 10 +- .../Controls/TwineCatalogControl.xaml.cs | 24 +- .../Controls/TwineCatalogRenderer.cs | 34 +- .../PPC/Tango.PPC.Common/Tango.PPC.Common.csproj | 9 +- .../Printing/DefaultPrintingManager.cs | 2 +- .../Tango.BL/Builders/ColorCatalogBuilder.cs | 45 ++ .../Visual_Studio/Tango.BL/Builders/JobBuilder.cs | 2 +- .../Visual_Studio/Tango.BL/Catalogs/Catalog.cs | 22 - .../Tango.BL/Catalogs/CatalogGroup.cs | 34 - .../Visual_Studio/Tango.BL/Catalogs/CatalogItem.cs | 29 - .../Tango.BL/Catalogs/CatalogLoader.cs | 77 --- .../Visual_Studio/Tango.BL/DTO/BrushStopDTOBase.cs | 4 +- .../Tango.BL/DTO/ColorCatalogDTOBase.cs | 120 ---- .../Tango.BL/DTO/ColorCatalogsGroupDTO.cs | 14 + .../Tango.BL/DTO/ColorCatalogsGroupDTOBase.cs | 49 ++ .../Tango.BL/DTO/ColorCatalogsItemDTO.cs | 14 + .../Tango.BL/DTO/ColorCatalogsItemDTOBase.cs | 145 +++++ .../Tango.BL/DTO/ColorCatalogsItemsRecipeDTO.cs | 14 + .../DTO/ColorCatalogsItemsRecipeDTOBase.cs | 129 ++++ .../Tango.BL/DTO/ColorSpaceDTOBase.cs | 8 - .../Visual_Studio/Tango.BL/Entities/BrushStop.cs | 17 +- .../Tango.BL/Entities/BrushStopBase.cs | 44 +- .../Tango.BL/Entities/ColorCatalog.cs | 32 +- .../Tango.BL/Entities/ColorCatalogBase.cs | 658 +------------------ .../Tango.BL/Entities/ColorCatalogsGroup.cs | 30 + .../Tango.BL/Entities/ColorCatalogsGroupBase.cs | 219 +++++++ .../Tango.BL/Entities/ColorCatalogsItem.cs | 21 + .../Tango.BL/Entities/ColorCatalogsItemBase.cs | 713 +++++++++++++++++++++ .../Tango.BL/Entities/ColorCatalogsItemsRecipe.cs | 29 + .../Entities/ColorCatalogsItemsRecipeBase.cs | 591 +++++++++++++++++ .../Tango.BL/Entities/ColorSpaceBase.cs | 76 --- .../Visual_Studio/Tango.BL/Entities/RmlBase.cs | 26 +- .../Tango.BL/Enumerations/ColorCatalogsItems.cs | 22 + .../Tango.BL/Enumerations/ColorSpaces.cs | 12 +- .../Tango.BL/Enumerations/Permissions.cs | 6 - .../Visual_Studio/Tango.BL/ObservablesContext.cs | 24 + .../ObservablesEntitiesAdapterExtension.cs | 114 ++++ .../ObservablesStaticCollectionsExtension.cs | 114 ++++ Software/Visual_Studio/Tango.BL/Tango.BL.csproj | 20 +- .../Tango.ColorConversion/DefaultColorConverter.cs | 16 +- .../Tango.DAL.Remote/DB/BRUSH_STOPS.cs | 4 +- .../Tango.DAL.Remote/DB/COLOR_CATALOGS.cs | 21 +- .../Tango.DAL.Remote/DB/COLOR_CATALOGS_GROUPS.cs | 34 + .../Tango.DAL.Remote/DB/COLOR_CATALOGS_ITEMS.cs | 49 ++ .../DB/COLOR_CATALOGS_ITEMS_RECIPES.cs | 37 ++ .../Tango.DAL.Remote/DB/COLOR_SPACES.cs | 4 - Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs | 4 +- .../Tango.DAL.Remote/DB/RemoteADO.Context.cs | 3 + .../Tango.DAL.Remote/DB/RemoteADO.edmx | 328 ++++++++-- .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 151 ++--- .../Tango.DAL.Remote/Tango.DAL.Remote.csproj | 11 +- .../DefaultGradientGenerationConfiguration.cs | 2 +- .../Tango.Integration/Operation/MachineOperator.cs | 20 +- .../Visual_Studio/Tango.PMR/ColorLab/ColorSpace.cs | 9 +- .../Tango.PMR/ColorLab/OutputCoordinates.cs | 97 ++- .../Tango.PMR/Diagnostics/EventType.cs | 4 +- .../Utilities/Tango.CatalogImporter/Program.cs | 51 +- 82 files changed, 3117 insertions(+), 2171 deletions(-) delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/CoatsCatalogViewVM.cs delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/CoatsCatalogControl.xaml delete mode 100644 Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/CoatsCatalogControl.xaml.cs create mode 100644 Software/Visual_Studio/Tango.BL/Builders/ColorCatalogBuilder.cs delete mode 100644 Software/Visual_Studio/Tango.BL/Catalogs/Catalog.cs delete mode 100644 Software/Visual_Studio/Tango.BL/Catalogs/CatalogGroup.cs delete mode 100644 Software/Visual_Studio/Tango.BL/Catalogs/CatalogItem.cs delete mode 100644 Software/Visual_Studio/Tango.BL/Catalogs/CatalogLoader.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsGroupDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsGroupDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemsRecipeDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemsRecipeDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsGroup.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsGroupBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItem.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItemBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItemsRecipe.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItemsRecipeBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Enumerations/ColorCatalogsItems.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS_GROUPS.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS_ITEMS.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS_ITEMS_RECIPES.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs') diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf index 1fcb444d4..308f4a6bb 100644 Binary files a/Software/DB/PPC/Tango.mdf and b/Software/DB/PPC/Tango.mdf differ diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf index 3aef11f9e..f5a1953ef 100644 Binary files a/Software/DB/PPC/Tango_log.ldf and b/Software/DB/PPC/Tango_log.ldf differ diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 9a8564616..9608c45a3 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index b5f6c6b16..9fa189385 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/PMR/Messages/ColorLab/ColorSpace.proto b/Software/PMR/Messages/ColorLab/ColorSpace.proto index fdaaadf56..79540db84 100644 --- a/Software/PMR/Messages/ColorLab/ColorSpace.proto +++ b/Software/PMR/Messages/ColorLab/ColorSpace.proto @@ -24,8 +24,6 @@ enum ColorSpace LAB = 3; - Coats = 4; - - Twine = 5; + Catalog = 4; } diff --git a/Software/PMR/Messages/Diagnostics/EventType.proto b/Software/PMR/Messages/Diagnostics/EventType.proto index ac729ef21..6e1831381 100644 --- a/Software/PMR/Messages/Diagnostics/EventType.proto +++ b/Software/PMR/Messages/Diagnostics/EventType.proto @@ -49,10 +49,10 @@ enum EventType //Job status message has been received from embedded device (Group = Application, Category = Info) JOB_STATUS = 1009; - //A job has been been started (Group = Application, Category = Info) + //A job has been started (Group = Application, Category = Info) JOB_STARTED = 1010; - //A job has been been aborted (Group = Application, Category = Info) + //A job has been aborted (Group = Application, Category = Info) JOB_ABORTED = 1011; //A job has failed (Group = Application, Category = Error) diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/CatalogsModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/CatalogsModule.cs index 389a2cb5d..5c17bf32e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/CatalogsModule.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/CatalogsModule.cs @@ -51,7 +51,7 @@ namespace Tango.MachineStudio.Catalogs { get { - return Permissions.RunCatalogsModule; + return Permissions.RunColorCaptureModule; } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml deleted file mode 100644 index db526419f..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - CATALOG - RECENT - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml.cs deleted file mode 100644 index 573d90d45..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/CoatsCatalogViewer.xaml.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using Tango.BL.Catalogs; - -namespace Tango.PPC.Jobs.Controls -{ - /// - /// Interaction logic for CoatsCatalogViewer.xaml - /// - public partial class CoatsCatalogViewer : UserControl - { - private Catalog _originalCatalog; - - /// - /// Gets or sets the recent catalog items as a catalog. - /// - public Catalog Recent - { - get { return (Catalog)GetValue(RecentProperty); } - set { SetValue(RecentProperty, value); } - } - public static readonly DependencyProperty RecentProperty = - DependencyProperty.Register("Recent", typeof(Catalog), typeof(CoatsCatalogViewer), new PropertyMetadata(null)); - - /// - /// Gets or sets the catalog. - /// - public Catalog Catalog - { - get { return (Catalog)GetValue(CatalogProperty); } - set { SetValue(CatalogProperty, value); } - } - public static readonly DependencyProperty CatalogProperty = - DependencyProperty.Register("Catalog", typeof(Catalog), typeof(CoatsCatalogViewer), new PropertyMetadata(null)); - - /// - /// Gets or sets the selected catalog item. - /// - public CatalogItem SelectedItem - { - get { return (CatalogItem)GetValue(SelectedItemProperty); } - set { SetValue(SelectedItemProperty, value); } - } - public static readonly DependencyProperty SelectedItemProperty = - DependencyProperty.Register("SelectedItem", typeof(CatalogItem), typeof(CoatsCatalogViewer), new PropertyMetadata(null)); - - /// - /// Gets or sets the current catalog filter. - /// - public String Filter - { - get { return (String)GetValue(FilterProperty); } - set { SetValue(FilterProperty, value); } - } - public static readonly DependencyProperty FilterProperty = - DependencyProperty.Register("Filter", typeof(String), typeof(CoatsCatalogViewer), new PropertyMetadata(null, (d, e) => (d as CoatsCatalogViewer).OnFilterChanged())); - - /// - /// Called when the filter has been changed - /// - private void OnFilterChanged() - { - if (Filter == "CATALOG" && _originalCatalog != null) - { - Catalog = _originalCatalog; - _originalCatalog = null; - } - else if (Filter == "RECENT") - { - _originalCatalog = Catalog; - Catalog = Recent; - } - } - - /// - /// Initializes a new instance of the class. - /// - public CoatsCatalogViewer() - { - InitializeComponent(); - Filter = "CATALOG"; - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/TwineCatalogViewer.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/TwineCatalogViewer.xaml.cs index a84e29bd2..929e9cd76 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/TwineCatalogViewer.xaml.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/TwineCatalogViewer.xaml.cs @@ -12,7 +12,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -using Tango.BL.Catalogs; +using Tango.BL.Entities; namespace Tango.PPC.Jobs.Controls { @@ -23,40 +23,40 @@ namespace Tango.PPC.Jobs.Controls /// public partial class TwineCatalogViewer : UserControl { - private Catalog _originalCatalog; + private ColorCatalog _originalCatalog; /// /// Gets or sets the recent catalog items as a catalog. /// - public Catalog Recent + public ColorCatalog Recent { - get { return (Catalog)GetValue(RecentProperty); } + get { return (ColorCatalog)GetValue(RecentProperty); } set { SetValue(RecentProperty, value); } } public static readonly DependencyProperty RecentProperty = - DependencyProperty.Register("Recent", typeof(Catalog), typeof(TwineCatalogViewer), new PropertyMetadata(null)); + DependencyProperty.Register("Recent", typeof(ColorCatalog), typeof(TwineCatalogViewer), new PropertyMetadata(null)); /// /// Gets or sets the catalog. /// - public Catalog Catalog + public ColorCatalog Catalog { - get { return (Catalog)GetValue(CatalogProperty); } + get { return (ColorCatalog)GetValue(CatalogProperty); } set { SetValue(CatalogProperty, value); } } public static readonly DependencyProperty CatalogProperty = - DependencyProperty.Register("Catalog", typeof(Catalog), typeof(TwineCatalogViewer), new PropertyMetadata(null)); + DependencyProperty.Register("Catalog", typeof(ColorCatalog), typeof(TwineCatalogViewer), new PropertyMetadata(null)); /// /// Gets or sets the selected catalog item. /// - public CatalogItem SelectedItem + public ColorCatalogsItem SelectedItem { - get { return (CatalogItem)GetValue(SelectedItemProperty); } + get { return (ColorCatalogsItem)GetValue(SelectedItemProperty); } set { SetValue(SelectedItemProperty, value); } } public static readonly DependencyProperty SelectedItemProperty = - DependencyProperty.Register("SelectedItem", typeof(CatalogItem), typeof(TwineCatalogViewer), new PropertyMetadata(null)); + DependencyProperty.Register("SelectedItem", typeof(ColorCatalogsItem), typeof(TwineCatalogViewer), new PropertyMetadata(null)); /// /// Gets or sets the current catalog filter. diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs index c2790ee6d..f10bf0064 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToImageConverter.cs @@ -24,7 +24,7 @@ namespace Tango.PPC.Jobs.Converters return ResourceHelper.GetImageFromResources("Images/NewJob/rgb.png"); case ColorSpaces.LAB: return ResourceHelper.GetImageFromResources("Images/NewJob/lab.png"); - case ColorSpaces.Twine: + case ColorSpaces.Catalog: return ResourceHelper.GetImageFromResources("Images/NewJob/twine.png"); case ColorSpaces.Volume: return ResourceHelper.GetImageFromResources("Images/NewJob/volume.png"); diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs index f7e3bb282..a8ba66eda 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Converters/ColorSpaceToVisibilityConverter.cs @@ -18,7 +18,7 @@ namespace Tango.PPC.Jobs.Converters if (colorSpace != null) { - if (colorSpace.Space == BL.Enumerations.ColorSpaces.Twine || colorSpace.Space == BL.Enumerations.ColorSpaces.Coats) + if (colorSpace.Space == BL.Enumerations.ColorSpaces.Catalog) { return Visibility.Collapsed; } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NavigationObjects/TwineCatalogNavigationObject.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NavigationObjects/TwineCatalogNavigationObject.cs index cb1b892fd..edd18a2c0 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NavigationObjects/TwineCatalogNavigationObject.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/NavigationObjects/TwineCatalogNavigationObject.cs @@ -9,8 +9,7 @@ namespace Tango.PPC.Jobs.NavigationObjects { public class TwineCatalogNavigationObject { - public Rml RML { get; set; } - - public BrushStop BrushStop { get; set; } + public ColorCatalog Catalog { get; set; } + public ColorCatalogsItem SelectedItem { get; set; } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj index 74fbc1bdb..5531c1c4c 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj @@ -72,10 +72,6 @@ Designer MSBuild:Compile - - Designer - MSBuild:Compile - MSBuild:Compile Designer @@ -148,10 +144,6 @@ Designer MSBuild:Compile - - MSBuild:Compile - Designer - MSBuild:Compile Designer @@ -167,9 +159,6 @@ - - CoatsCatalogViewer.xaml - RunningJobViewer.xaml @@ -251,7 +240,6 @@ - JobProgressView.xaml @@ -268,9 +256,6 @@ MainView.xaml - - CoatsCatalogView.xaml - TwineCatalogView.xaml @@ -479,7 +464,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModelLocator.cs index c419bb8e2..1b91d2ee8 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModelLocator.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModelLocator.cs @@ -20,7 +20,6 @@ namespace Tango.PPC.Jobs TangoIOC.Default.Register(); TangoIOC.Default.Register(); TangoIOC.Default.Register(); - TangoIOC.Default.Register(); TangoIOC.Default.Register(); } @@ -79,17 +78,6 @@ namespace Tango.PPC.Jobs } } - /// - /// Gets the coats catalog view VM. - /// - public static CoatsCatalogViewVM CoatsCatalogViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - /// /// Gets the job progress view VM. /// diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/CoatsCatalogViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/CoatsCatalogViewVM.cs deleted file mode 100644 index ebeb5b704..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/CoatsCatalogViewVM.cs +++ /dev/null @@ -1,153 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL; -using Tango.BL.Catalogs; -using Tango.BL.Entities; -using Tango.Core.Commands; -using Tango.PPC.Common; -using Tango.PPC.Common.Navigation; -using Tango.PPC.Jobs.NavigationObjects; -using Tango.Settings; - -namespace Tango.PPC.Jobs.ViewModels -{ - /// - /// Represents the coats catalog view model. - /// - /// - /// - public class CoatsCatalogViewVM : PPCViewModel, INavigationResultProvider - { - private bool _confirmed; - private ObservablesContext _db; - - private Catalog _catalog; - /// - /// Gets or sets the catalog. - /// - public Catalog Catalog - { - get { return _catalog; } - set { _catalog = value; RaisePropertyChangedAuto(); } - } - - private Catalog _recent; - /// - /// Gets or sets the recent catalog items as a complete catalog. - /// - public Catalog Recent - { - get { return _recent; } - set { _recent = value; RaisePropertyChangedAuto(); } - } - - private String _filter; - /// - /// Gets or sets the filter. - /// - /// - /// The filter. - /// - public String Filter - { - get { return _filter; } - set { _filter = value; RaisePropertyChangedAuto(); } - } - - private CatalogItem _selectedItem; - /// - /// Gets or sets the selected item. - /// - public CatalogItem SelectedItem - { - get { return _selectedItem; } - set - { - _selectedItem = value; RaisePropertyChangedAuto(); - } - } - - /// - /// Gets or sets the OK command. - /// - public RelayCommand OKCommand { get; set; } - - /// - /// Initializes a new instance of the class. - /// - public CoatsCatalogViewVM() - { - OKCommand = new RelayCommand(Confirm); - } - - /// - /// Called when the application has been started. - /// - public override void OnApplicationStarted() - { - _db = ObservablesContext.CreateDefault(); - } - - /// - /// Called when the navigation system has navigated to this VM view. - /// - public override void OnNavigatedTo() - { - base.OnNavigatedTo(); - _confirmed = false; - Filter = "CATALOG"; - } - - /// - /// Confirms this instance. - /// - private void Confirm() - { - SettingsManager.Default.GetOrCreate().RecentCoatsCatalogColors.Add(SelectedItem.Entity.Name); - SettingsManager.Default.Save(); - - _confirmed = true; - NavigationManager.NavigateBack(); - } - - /// - /// Called when the navigation system requests a result when it is navigating away from this instance. - /// - /// - public CatalogItem GetNavigationResult() - { - if (_confirmed) - { - return SelectedItem; - } - else - { - return null; - } - } - - /// - /// Called when the navigation object has been received - /// - /// The brush stop. - public async virtual void OnNavigationObjectReceived(TwineCatalogNavigationObject obj) - { - IsFree = false; - Catalog = await CatalogLoader.LoadCatalog(BL.Enumerations.ColorSpaces.Coats, obj.RML, _db); - Recent = CatalogLoader.GetRecent(Catalog, SettingsManager.Default.GetOrCreate().RecentCoatsCatalogColors); - IsFree = true; - - if (obj.BrushStop.ColorCatalog != null) - { - SelectedItem = Catalog.Groups.SelectMany(x => x.Items).SingleOrDefault(x => x.Entity.Guid == obj.BrushStop.ColorCatalog.Guid); - } - else - { - SelectedItem = null; - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs index fb1f240c5..08a5e1168 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs @@ -17,7 +17,6 @@ using System.ComponentModel; using System.Windows.Data; using Tango.PPC.Jobs.Dialogs; using Tango.PPC.Jobs.Views; -using Tango.BL.Catalogs; using System.Runtime.InteropServices; using System.Threading; using Tango.SharedUI.Helpers; @@ -186,34 +185,39 @@ namespace Tango.PPC.Jobs.ViewModels set { _isJobDetailsExpanded = value; RaisePropertyChangedAuto(); } } - private List _twineCatalogItems; + private List _catalogItems; /// /// Gets or sets the twine catalog items. /// - public List TwineCatalogItems + public List CatalogItems { - get { return _twineCatalogItems; } - set { _twineCatalogItems = value; RaisePropertyChangedAuto(); } + get { return _catalogItems; } + set { _catalogItems = value; RaisePropertyChangedAuto(); } } + private ColorCatalogsItem _selectedCatalogItem; /// - /// Gets or sets the twine catalog automatic complete provider. + /// Gets or sets the selected catalog item. /// - public IAutoCompleteProvider TwineCatalogAutoCompleteProvider { get; set; } + public ColorCatalogsItem SelectedCatalogItem + { + get { return _selectedCatalogItem; } + set { _selectedCatalogItem = value; RaisePropertyChangedAuto(); } + } /// - /// Gets or sets the coats catalog automatic complete provider. + /// Gets or sets the twine catalog automatic complete provider. /// - public IAutoCompleteProvider CoatsCatalogAutoCompleteProvider { get; set; } + public IAutoCompleteProvider CatalogAutoCompleteProvider { get; set; } - private List _coatsCatalogItems; + private ColorCatalog _selectedCatalog; /// - /// Gets or sets the coats catalog items. + /// Gets or sets the selected catalog. /// - public List CoatsCatalogItems + public ColorCatalog SelectedCatalog { - get { return _coatsCatalogItems; } - set { _coatsCatalogItems = value; RaisePropertyChangedAuto(); } + get { return _selectedCatalog; } + set { _selectedCatalog = value; RaisePropertyChangedAuto(); } } #endregion @@ -268,12 +272,7 @@ namespace Tango.PPC.Jobs.ViewModels /// /// Gets or sets the twine catalog field tap command. /// - public RelayCommand OpenTwineCatalogCommand { get; set; } - - /// - /// Gets or sets the open coats catalog command. - /// - public RelayCommand OpenCoatsCatalogCommand { get; set; } + public RelayCommand OpenCatalogCommand { get; set; } /// /// Gets or sets the increase decrease samples to dye command. @@ -360,8 +359,7 @@ namespace Tango.PPC.Jobs.ViewModels FineTuneItems = new ObservableCollection(); ApprovalFineTuneItems = new ObservableCollection(); - TwineCatalogItems = new List(); - CoatsCatalogItems = new List(); + CatalogItems = new List(); CustomersAutoCompleteProvider = new AutoCompleteProvider((customer, filter) => { @@ -369,14 +367,9 @@ namespace Tango.PPC.Jobs.ViewModels }); - TwineCatalogAutoCompleteProvider = new AutoCompleteProvider((color, filter) => + CatalogAutoCompleteProvider = new AutoCompleteProvider((item, filter) => { - return !String.IsNullOrWhiteSpace(filter) && color.RmlGuid == Job.Rml.Guid && color.Name.ToLower().StartsWith(filter.ToLower()); - }); - - CoatsCatalogAutoCompleteProvider = new AutoCompleteProvider((color, filter) => - { - return !String.IsNullOrWhiteSpace(filter) && color.RmlGuid == Job.Rml.Guid && color.Name.ToLower().StartsWith(filter.ToLower()); + return !String.IsNullOrWhiteSpace(filter) && item.Name.ToLower().StartsWith(filter.ToLower()); }); //Initialize Commands @@ -421,8 +414,7 @@ namespace Tango.PPC.Jobs.ViewModels StartFineTuningCommand = new RelayCommand(StartFineTuning, () => FineTuneItems.Any(x => x.IsSelected) && CanStartJob()); RepeatFineTuningCommand = new RelayCommand(RepeatFineTuning); ApproveFineTuningCommand = new RelayCommand(ApproveFineTuning); - OpenTwineCatalogCommand = new RelayCommand(OpenTwineCatalog); - OpenCoatsCatalogCommand = new RelayCommand(OpenCoatsCatalog); + OpenCatalogCommand = new RelayCommand(OpenCatalog); ExportEmbroideryCommand = new RelayCommand(ExportEmbroidery); } @@ -479,8 +471,12 @@ namespace Tango.PPC.Jobs.ViewModels SpoolTypes = await _db.SpoolTypes.ToListAsync(); LogManager.Log("Loading Customers..."); Customers = await _db.Customers.Where(x => x.OrganizationGuid == MachineProvider.Machine.OrganizationGuid).ToListAsync(); - TwineCatalogItems = await _db.ColorCatalogs.Where(x => x.RmlGuid == Job.Rml.Guid && x.ColorSpace.Code == (int)BL.Enumerations.ColorSpaces.Twine).OrderBy(x => x.Name).ToListAsync(); - CoatsCatalogItems = await _db.ColorCatalogs.Where(x => x.RmlGuid == Job.Rml.Guid && x.ColorSpace.Code == (int)BL.Enumerations.ColorSpaces.Coats).OrderBy(x => x.Name).ToListAsync(); + + if (Job.ColorSpace.Space == BL.Enumerations.ColorSpaces.Catalog) + { + SelectedCatalog = await new ColorCatalogBuilder(_db).SetFirst().WithGroups().WithItems().BuildAsync(); + CatalogItems = SelectedCatalog.ColorCatalogsGroups.SelectMany(x => x.ColorCatalogsItems).ToList(); + } foreach (var segment in Job.Segments) { @@ -655,24 +651,23 @@ namespace Tango.PPC.Jobs.ViewModels #region RML Changed - protected virtual async void OnRmlChanged(object sender, Rml rml) + protected virtual void OnRmlChanged(object sender, Rml rml) { - TwineCatalogItems = await _db.ColorCatalogs.Where(x => x.RmlGuid == rml.Guid && x.ColorSpace.Code == (int)BL.Enumerations.ColorSpaces.Twine).OrderBy(x => x.Name).ToListAsync(); - CoatsCatalogItems = await _db.ColorCatalogs.Where(x => x.RmlGuid == rml.Guid && x.ColorSpace.Code == (int)BL.Enumerations.ColorSpaces.Coats).OrderBy(x => x.Name).ToListAsync(); - - //Replace all brush stops twine color catalogs. - foreach (var stop in Job.Segments.SelectMany(x => x.BrushStops).Where(x => x.ColorCatalog != null && x.BrushColorSpace == BL.Enumerations.ColorSpaces.Twine).ToList()) - { - var replacement = TwineCatalogItems.SingleOrDefault(x => x.Name == stop.ColorCatalog.Name); - stop.ColorCatalog = replacement; - } - - //Replace all brush stops coats color catalogs. - foreach (var stop in Job.Segments.SelectMany(x => x.BrushStops).Where(x => x.ColorCatalog != null && x.BrushColorSpace == BL.Enumerations.ColorSpaces.Coats).ToList()) - { - var replacement = CoatsCatalogItems.SingleOrDefault(x => x.Name == stop.ColorCatalog.Name); - stop.ColorCatalog = replacement; - } + //There is no need for that. + + ////Replace all brush stops twine color catalogs. + //foreach (var stop in Job.Segments.SelectMany(x => x.BrushStops).Where(x => x.ColorCatalog != null && x.BrushColorSpace == BL.Enumerations.ColorSpaces.Twine).ToList()) + //{ + // var replacement = CatalogItems.SingleOrDefault(x => x.Name == stop.ColorCatalog.Name); + // stop.ColorCatalog = replacement; + //} + + ////Replace all brush stops coats color catalogs. + //foreach (var stop in Job.Segments.SelectMany(x => x.BrushStops).Where(x => x.ColorCatalog != null && x.BrushColorSpace == BL.Enumerations.ColorSpaces.Coats).ToList()) + //{ + // var replacement = CoatsCatalogItems.SingleOrDefault(x => x.Name == stop.ColorCatalog.Name); + // stop.ColorCatalog = replacement; + //} ResetFineTuning(); } @@ -935,31 +930,17 @@ namespace Tango.PPC.Jobs.ViewModels /// Opens the twine catalog for the specified brush stop. /// /// The stop. - private async void OpenTwineCatalog(BrushStop stop) - { - var catalogItem = await NavigationManager.NavigateForResult(new TwineCatalogNavigationObject() - { - BrushStop = stop, - RML = Job.Rml, - }, true); - - if (catalogItem != null) - { - stop.ColorCatalog = TwineCatalogItems.SingleOrDefault(x => x.Name == catalogItem.Entity.Name); - } - } - - private async void OpenCoatsCatalog(BrushStop stop) + private async void OpenCatalog(BrushStop stop) { - var catalogItem = await NavigationManager.NavigateForResult(new TwineCatalogNavigationObject() + var catalogItem = await NavigationManager.NavigateForResult(new TwineCatalogNavigationObject() { - BrushStop = stop, - RML = Job.Rml, + SelectedItem = stop.ColorCatalogsItem, + Catalog = SelectedCatalog }, true); if (catalogItem != null) { - stop.ColorCatalog = CoatsCatalogItems.SingleOrDefault(x => x.Name == catalogItem.Entity.Name); + stop.ColorCatalogsItem = catalogItem; } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs index 248003b30..b7a6ad94a 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs @@ -421,12 +421,12 @@ namespace Tango.PPC.Jobs.ViewModels if (settings.LastJobColorSpace != null) { - vm.SelectedColorSpace = settings.LastJobColorSpace.Value.IsUserSpace() ? settings.LastJobColorSpace.Value : ColorSpaces.Twine; + vm.SelectedColorSpace = settings.LastJobColorSpace.Value.IsUserSpace() ? settings.LastJobColorSpace.Value : ColorSpaces.Catalog; } else { var space = machine.SupportedColorSpaces.FirstOrDefault(); - vm.SelectedColorSpace = space.IsUserSpace() ? space : ColorSpaces.Twine; + vm.SelectedColorSpace = space.IsUserSpace() ? space : ColorSpaces.Catalog; } if (colorProfile != null || twnFile != null) diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/TwineCatalogViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/TwineCatalogViewVM.cs index a72013d26..d7d720434 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/TwineCatalogViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/TwineCatalogViewVM.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.BL; -using Tango.BL.Catalogs; using Tango.BL.Entities; using Tango.Core.Commands; using Tango.PPC.Common; @@ -19,26 +18,26 @@ namespace Tango.PPC.Jobs.ViewModels /// /// /// - public class TwineCatalogViewVM : PPCViewModel, INavigationResultProvider + public class TwineCatalogViewVM : PPCViewModel, INavigationResultProvider { private bool _confirmed; private ObservablesContext _db; - private Catalog _catalog; + private ColorCatalog _catalog; /// /// Gets or sets the catalog. /// - public Catalog Catalog + public ColorCatalog Catalog { get { return _catalog; } set { _catalog = value; RaisePropertyChangedAuto(); } } - private Catalog _recent; + private ColorCatalog _recent; /// /// Gets or sets the recent catalog items as a complete catalog. /// - public Catalog Recent + public ColorCatalog Recent { get { return _recent; } set { _recent = value; RaisePropertyChangedAuto(); } @@ -57,11 +56,11 @@ namespace Tango.PPC.Jobs.ViewModels set { _filter = value; RaisePropertyChangedAuto(); } } - private CatalogItem _selectedItem; + private ColorCatalogsItem _selectedItem; /// /// Gets or sets the selected item. /// - public CatalogItem SelectedItem + public ColorCatalogsItem SelectedItem { get { return _selectedItem; } set @@ -106,7 +105,7 @@ namespace Tango.PPC.Jobs.ViewModels /// private void Confirm() { - SettingsManager.Default.GetOrCreate().RecentTwineCatalogColors.Add(SelectedItem.Entity.Name); + SettingsManager.Default.GetOrCreate().RecentTwineCatalogColors.Add(SelectedItem.Guid); SettingsManager.Default.Save(); _confirmed = true; @@ -117,7 +116,7 @@ namespace Tango.PPC.Jobs.ViewModels /// Called when the navigation system requests a result when it is navigating away from this instance. /// /// - public CatalogItem GetNavigationResult() + public ColorCatalogsItem GetNavigationResult() { if (_confirmed) { @@ -133,21 +132,16 @@ namespace Tango.PPC.Jobs.ViewModels /// Called when the navigation object has been received /// /// The brush stop. - public async virtual void OnNavigationObjectReceived(TwineCatalogNavigationObject obj) + public virtual void OnNavigationObjectReceived(TwineCatalogNavigationObject obj) { IsFree = false; - Catalog = await CatalogLoader.LoadCatalog(BL.Enumerations.ColorSpaces.Twine, obj.RML, _db); - Recent = CatalogLoader.GetRecent(Catalog, SettingsManager.Default.GetOrCreate().RecentTwineCatalogColors); - IsFree = true; - if (obj.BrushStop.ColorCatalog != null) - { - SelectedItem = Catalog.Groups.SelectMany(x => x.Items).SingleOrDefault(x => x.Entity.Guid == obj.BrushStop.ColorCatalog.Guid); - } - else - { - SelectedItem = null; - } + Catalog = obj.Catalog; + //Recent = CatalogLoader.GetRecent(Catalog, SettingsManager.Default.GetOrCreate().RecentTwineCatalogColors); + + SelectedItem = obj.SelectedItem; + + IsFree = true; } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml deleted file mode 100644 index 60f747ab9..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - Coats Catalog - - - - - - - - - - - - - - - - - - - - - - - Shade Card - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml.cs deleted file mode 100644 index c644b32b4..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/CoatsCatalogView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace Tango.PPC.Jobs.Views -{ - /// - /// Interaction logic for TwineCatalogColorCorrectionView.xaml - /// - public partial class CoatsCatalogView : UserControl - { - public CoatsCatalogView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml index 957fead70..ec21ebade 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml @@ -86,30 +86,10 @@ - + - - - - - - - - - - - - - - - - - - - - - - + + @@ -161,11 +141,8 @@ - - - - - + + @@ -306,11 +283,8 @@ - - - - - + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/MainView.xaml index 21361e74f..505ccc312 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/MainView.xaml @@ -16,7 +16,6 @@ - diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/CoatsCatalogControl.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/CoatsCatalogControl.xaml deleted file mode 100644 index b9218a483..000000000 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/CoatsCatalogControl.xaml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/CoatsCatalogControl.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/CoatsCatalogControl.xaml.cs deleted file mode 100644 index f4b764ad0..000000000 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/CoatsCatalogControl.xaml.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using Tango.BL.Catalogs; - -namespace Tango.PPC.Common.Controls -{ - /// - /// Interaction logic for CoatsCatalogControl.xaml - /// - public partial class CoatsCatalogControl : UserControl - { - private Catalog _catalog; - private bool _preventChange; - private double _lastScrollPosition = 0; - - /// - /// Gets or sets the selected catalog item. - /// - public CatalogItem SelectedItem - { - get { return (CatalogItem)GetValue(SelectedItemProperty); } - set { SetValue(SelectedItemProperty, value); } - } - public static readonly DependencyProperty SelectedItemProperty = - DependencyProperty.Register("SelectedItem", typeof(CatalogItem), typeof(CoatsCatalogControl), new PropertyMetadata(null)); - - public CoatsCatalogControl() - { - InitializeComponent(); - - //list.ApplyTemplate(); - //list.Loaded += TwineCatalogControl_Loaded; - DataContextChanged += (x, y) => - { - _catalog = DataContext as Catalog; - - if (scrollViewer != null && _catalog != null) - { - scrollViewer.ScrollToTop(); - _preventChange = true; - slider.Value = _catalog.Groups.Count; - _preventChange = false; - } - }; - - scrollViewer.Scrolling += ScrollViewer_Scrolling; - } - - /// - /// Handles the Scrolling event of the ScrollViewer control. - /// - /// The source of the event. - /// The instance containing the event data. - private void ScrollViewer_Scrolling(object sender, Touch.Controls.DoubleValueChangedEventArgs e) - { - if (!_preventChange) - { - if (e.Value > _lastScrollPosition + 60 || e.Value < _lastScrollPosition - 60) - { - var group = renderer.GetVisibleGroup(); - - if (group != null) - { - _preventChange = true; - slider.Value = slider.Maximum - _catalog.Groups.IndexOf(group); - _preventChange = false; - } - - _lastScrollPosition = e.Value; - } - } - } - - /// - /// Handles the ValueChanged event of the TouchSlider control. - /// - /// The source of the event. - /// The instance containing the event data. - private void TouchSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) - { - if (_catalog == null || _catalog.Groups.Count == 0) return; - - if (!_preventChange) - { - if (_catalog != null) - { - _preventChange = true; - var group = _catalog.Groups.ElementAt(_catalog.Groups.Count - 1 - (int)e.NewValue); - scrollViewer.ScrollToPosition(renderer.GetGroupPosition(group)); - _preventChange = false; - } - } - - if (_catalog != null && _catalog.Groups.Count > _catalog.Groups.Count - 1 - (int)e.NewValue && _catalog.Groups.Count - 1 - (int)e.NewValue > -1) - { - slider.Foreground = new SolidColorBrush(_catalog.Groups.ElementAt(_catalog.Groups.Count - 1 - (int)e.NewValue).Color); - } - } - } -} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml index 65db9818c..4d21de67e 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml @@ -6,9 +6,9 @@ xmlns:local="clr-namespace:Tango.PPC.Common.Controls" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" - xmlns:catalog="clr-namespace:Tango.BL.Catalogs;assembly=Tango.BL" + xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" mc:Ignorable="d" - d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=catalog:Catalog, IsDesignTimeCreatable=False}"> + d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=entities:ColorCatalog, IsDesignTimeCreatable=False}"> @@ -19,7 +19,7 @@ - + @@ -112,7 +112,7 @@ - + @@ -131,7 +131,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs index 5985fbd49..2f584740c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs @@ -12,7 +12,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -using Tango.BL.Catalogs; +using Tango.BL.Entities; using Tango.Touch.Controls; namespace Tango.PPC.Common.Controls @@ -24,20 +24,20 @@ namespace Tango.PPC.Common.Controls /// public partial class TwineCatalogControl : UserControl { - private Catalog _catalog; + private ColorCatalog _catalog; private bool _preventChange; private double _lastScrollPosition = 0; /// /// Gets or sets the selected catalog item. /// - public CatalogItem SelectedItem + public ColorCatalogsItem SelectedItem { - get { return (CatalogItem)GetValue(SelectedItemProperty); } + get { return (ColorCatalogsItem)GetValue(SelectedItemProperty); } set { SetValue(SelectedItemProperty, value); } } public static readonly DependencyProperty SelectedItemProperty = - DependencyProperty.Register("SelectedItem", typeof(CatalogItem), typeof(TwineCatalogControl), new PropertyMetadata(null)); + DependencyProperty.Register("SelectedItem", typeof(ColorCatalogsItem), typeof(TwineCatalogControl), new PropertyMetadata(null)); /// /// Initializes a new instance of the class. @@ -50,13 +50,13 @@ namespace Tango.PPC.Common.Controls //list.Loaded += TwineCatalogControl_Loaded; DataContextChanged += (x, y) => { - _catalog = DataContext as Catalog; + _catalog = DataContext as ColorCatalog; if (scrollViewer != null && _catalog != null) { scrollViewer.ScrollToTop(); _preventChange = true; - slider.Value = _catalog.Groups.Count; + slider.Value = _catalog.ColorCatalogsGroups.Count; _preventChange = false; } }; @@ -80,7 +80,7 @@ namespace Tango.PPC.Common.Controls if (group != null) { _preventChange = true; - slider.Value = slider.Maximum - _catalog.Groups.IndexOf(group); + slider.Value = slider.Maximum - _catalog.ColorCatalogsGroups.IndexOf(group); _preventChange = false; } @@ -96,22 +96,22 @@ namespace Tango.PPC.Common.Controls /// The instance containing the event data. private void TouchSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) { - if (_catalog == null || _catalog.Groups.Count == 0) return; + if (_catalog == null || _catalog.ColorCatalogsGroups.Count == 0) return; if (!_preventChange) { if (_catalog != null) { _preventChange = true; - var group = _catalog.Groups.ElementAt(_catalog.Groups.Count - 1 - (int)e.NewValue); + var group = _catalog.ColorCatalogsGroups.ElementAt(_catalog.ColorCatalogsGroups.Count - 1 - (int)e.NewValue); scrollViewer.ScrollToPosition(renderer.GetGroupPosition(group)); _preventChange = false; } } - if (_catalog != null && _catalog.Groups.Count > _catalog.Groups.Count - 1 - (int)e.NewValue && _catalog.Groups.Count - 1 - (int)e.NewValue > -1) + if (_catalog != null && _catalog.ColorCatalogsGroups.Count > _catalog.ColorCatalogsGroups.Count - 1 - (int)e.NewValue && _catalog.ColorCatalogsGroups.Count - 1 - (int)e.NewValue > -1) { - slider.Foreground = new SolidColorBrush(_catalog.Groups.ElementAt(_catalog.Groups.Count - 1 - (int)e.NewValue).Color); + slider.Foreground = new SolidColorBrush(_catalog.ColorCatalogsGroups.ElementAt(_catalog.ColorCatalogsGroups.Count - 1 - (int)e.NewValue).Color); } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs index 7a8ddbb46..eafef2847 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs @@ -9,7 +9,7 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; -using Tango.BL.Catalogs; +using Tango.BL.Entities; using Tango.Touch.Controls; namespace Tango.PPC.Common.Controls @@ -19,14 +19,14 @@ namespace Tango.PPC.Common.Controls private class ItemContainer { public DrawingVisual Visual { get; set; } - public CatalogItem Item { get; set; } + public ColorCatalogsItem Item { get; set; } public double PositionY { get; set; } } private class GroupContainer { public DrawingVisual Visual { get; set; } - public CatalogGroup Group { get; set; } + public ColorCatalogsGroup Group { get; set; } public double PositionY { get; set; } public List Items { get; set; } @@ -49,21 +49,21 @@ namespace Tango.PPC.Common.Controls private bool selectedFromClick; private LightTouchScrollViewer _scrollViewer; - public List Groups + public IEnumerable Groups { - get { return (List)GetValue(GroupsProperty); } + get { return (IEnumerable)GetValue(GroupsProperty); } set { SetValue(GroupsProperty, value); } } public static readonly DependencyProperty GroupsProperty = - DependencyProperty.Register("Groups", typeof(List), typeof(TwineCatalogRenderer), new PropertyMetadata(null, (d, e) => { (d as TwineCatalogRenderer).OnCatalogChanged(); })); + DependencyProperty.Register("Groups", typeof(IEnumerable), typeof(TwineCatalogRenderer), new PropertyMetadata(null, (d, e) => { (d as TwineCatalogRenderer).OnCatalogChanged(); })); - public CatalogItem SelectedItem + public ColorCatalogsItem SelectedItem { - get { return (CatalogItem)GetValue(SelectedItemProperty); } + get { return (ColorCatalogsItem)GetValue(SelectedItemProperty); } set { SetValue(SelectedItemProperty, value); } } public static readonly DependencyProperty SelectedItemProperty = - DependencyProperty.Register("SelectedItem", typeof(CatalogItem), typeof(TwineCatalogRenderer), new PropertyMetadata(null, (d, e) => (d as TwineCatalogRenderer).OnSelectedItemChanged(e.OldValue, e.NewValue))); + DependencyProperty.Register("SelectedItem", typeof(ColorCatalogsItem), typeof(TwineCatalogRenderer), new PropertyMetadata(null, (d, e) => (d as TwineCatalogRenderer).OnSelectedItemChanged(e.OldValue, e.NewValue))); public Brush Foreground { @@ -99,7 +99,7 @@ namespace Tango.PPC.Common.Controls _scrollViewer = this.FindAncestor(); } - public CatalogGroup GetVisibleGroup() + public ColorCatalogsGroup GetVisibleGroup() { double currentPosition = _scrollViewer.GetScrollPosition(); @@ -118,7 +118,7 @@ namespace Tango.PPC.Common.Controls return null; } - public double GetGroupPosition(CatalogGroup group) + public double GetGroupPosition(ColorCatalogsGroup group) { return _groupItems.Single(x => x.Group == group).PositionY; } @@ -153,7 +153,7 @@ namespace Tango.PPC.Common.Controls { var container = _catalogItems.SingleOrDefault(x => x.Visual == visual); - if (container != null && container.Item is CatalogItem) + if (container != null && container.Item is ColorCatalogsItem) { selectedFromClick = true; SelectedItem = container.Item; @@ -189,7 +189,7 @@ namespace Tango.PPC.Common.Controls } } - private ItemContainer AddCatalogItem(DrawingVisual visual, CatalogItem item, double y) + private ItemContainer AddCatalogItem(DrawingVisual visual, ColorCatalogsItem item, double y) { _children.Add(visual); @@ -205,7 +205,7 @@ namespace Tango.PPC.Common.Controls return container; } - private GroupContainer AddGroupItem(DrawingVisual visual, CatalogGroup group, double y) + private GroupContainer AddGroupItem(DrawingVisual visual, ColorCatalogsGroup group, double y) { _children.Add(visual); @@ -240,7 +240,7 @@ namespace Tango.PPC.Common.Controls position_y += ellipseMargin; - foreach (var item in group.Items) + foreach (var item in group.ColorCatalogsItems) { double x = position_x + ellipseMargin; @@ -265,12 +265,12 @@ namespace Tango.PPC.Common.Controls //InvalidateVisual(); } - private DrawingVisual CreateItem(CatalogItem item, double x, double y) + private DrawingVisual CreateItem(ColorCatalogsItem item, double x, double y) { DrawingVisual drawingVisual = new DrawingVisual(); DrawingContext drawingContext = drawingVisual.RenderOpen(); - drawingContext.DrawEllipse(item.Brush, null, new Point(x + ellipseWidth / 2, y + ellipseHeight / 2), ellipseWidth / 2, ellipseHeight / 2); + drawingContext.DrawEllipse(new SolidColorBrush(item.Color), null, new Point(x + ellipseWidth / 2, y + ellipseHeight / 2), ellipseWidth / 2, ellipseHeight / 2); var formattedText = new FormattedText(item.Name, CultureInfo.GetCultureInfo("en-us"), diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj index 66ddb53bd..37885628d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj @@ -128,9 +128,6 @@ - - CoatsCatalogControl.xaml - TwineCatalogControl.xaml @@ -214,10 +211,6 @@ MSBuild:Compile Designer - - Designer - MSBuild:Compile - MSBuild:Compile Designer @@ -384,7 +377,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs index 456c69625..a0734ffb8 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs @@ -254,7 +254,7 @@ namespace Tango.PPC.UI.Printing { throw new InvalidOperationException("Error starting job. Color is out of range."); } - if (job.Segments.SelectMany(x => x.BrushStops).Any(x => x.ColorSpace.IsCatalog && x.ColorCatalog == null)) + if (job.Segments.SelectMany(x => x.BrushStops).Any(x => x.BrushColorSpace == ColorSpaces.Catalog && x.ColorCatalogsItem == null)) { throw new InvalidOperationException("Error starting job. Please select a catalog color."); } diff --git a/Software/Visual_Studio/Tango.BL/Builders/ColorCatalogBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/ColorCatalogBuilder.cs new file mode 100644 index 000000000..801f2c474 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Builders/ColorCatalogBuilder.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using System.Data.Entity; + +namespace Tango.BL.Builders +{ + public class ColorCatalogBuilder : EntityBuilderBase + { + public ColorCatalogBuilder(ObservablesContext context) : base(context) + { + + } + + public virtual ColorCatalogBuilder WithGroups() + { + return AddQueryStep(1, (query) => + { + return query.Include(x => x.ColorCatalogsGroups); + }); + } + + public virtual ColorCatalogBuilder WithItems() + { + return AddStep(2, () => + { + Context.ColorCatalogsItems.Where(x => x.ColorCatalogsGroup.ColorCatalogGuid == Entity.Guid).OrderBy(x => x.Code).ToList(); + }); + } + + public virtual ColorCatalogBuilder WithRecipes(Rml rml) + { + return AddStep(3, () => + { + foreach (var item in Entity.ColorCatalogsGroups.SelectMany(x => x.ColorCatalogsItems)) + { + Context.ColorCatalogsItemsRecipes.Where(x => x.ColorCatalogsItemGuid == item.Guid && x.RmlGuid == rml.Guid).ToList(); + } + }); + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs index b75f7a452..e64ad3fd5 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs @@ -39,7 +39,7 @@ namespace Tango.BL.Builders { return AddStep(2, () => { - Context.BrushStops.Where(x => x.Segment.JobGuid == Entity.Guid).Include(x => x.ColorSpace).Include(x => x.ColorCatalog).OrderBy(x => x.StopIndex).ToList(); + Context.BrushStops.Where(x => x.Segment.JobGuid == Entity.Guid).Include(x => x.ColorSpace).Include(x => x.ColorCatalogsItem).OrderBy(x => x.StopIndex).ToList(); }); } diff --git a/Software/Visual_Studio/Tango.BL/Catalogs/Catalog.cs b/Software/Visual_Studio/Tango.BL/Catalogs/Catalog.cs deleted file mode 100644 index 7648dd705..000000000 --- a/Software/Visual_Studio/Tango.BL/Catalogs/Catalog.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; - -namespace Tango.BL.Catalogs -{ - public class Catalog - { - public ColorSpace ColorSpace { get; set; } - public String Name { get; set; } - public List Groups { get; set; } - - public Catalog() - { - Groups = new List(); - } - } -} diff --git a/Software/Visual_Studio/Tango.BL/Catalogs/CatalogGroup.cs b/Software/Visual_Studio/Tango.BL/Catalogs/CatalogGroup.cs deleted file mode 100644 index ee7ac743b..000000000 --- a/Software/Visual_Studio/Tango.BL/Catalogs/CatalogGroup.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Media; - -namespace Tango.BL.Catalogs -{ - public class CatalogGroup - { - public int Index { get; set; } - - public String Name { get; set; } - - public List Items { get; set; } - - public Color Color - { - get - { - return Color.FromRgb( - (byte)(Items.Sum(x => x.Color.R) / Items.Count), - (byte)(Items.Sum(x => x.Color.G) / Items.Count), - (byte)(Items.Sum(x => x.Color.B) / Items.Count)); - } - } - - public CatalogGroup() - { - Items = new List(); - } - } -} diff --git a/Software/Visual_Studio/Tango.BL/Catalogs/CatalogItem.cs b/Software/Visual_Studio/Tango.BL/Catalogs/CatalogItem.cs deleted file mode 100644 index 4969f8a45..000000000 --- a/Software/Visual_Studio/Tango.BL/Catalogs/CatalogItem.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Media; -using Tango.BL.Entities; - -namespace Tango.BL.Catalogs -{ - public class CatalogItem - { - public Color Color { get; private set; } - - public Brush Brush { get; private set; } - - public String Name { get; private set; } - - public ColorCatalog Entity { get; private set; } - - public CatalogItem(ColorCatalog entity) - { - Entity = entity; - Color = Color.FromRgb((byte)entity.Red, (byte)entity.Green, (byte)entity.Blue); - Brush = new SolidColorBrush(Color); - Name = entity.Name; - } - } -} diff --git a/Software/Visual_Studio/Tango.BL/Catalogs/CatalogLoader.cs b/Software/Visual_Studio/Tango.BL/Catalogs/CatalogLoader.cs deleted file mode 100644 index fac2be366..000000000 --- a/Software/Visual_Studio/Tango.BL/Catalogs/CatalogLoader.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; -using Tango.BL.Enumerations; -using System.Data.Entity; - -namespace Tango.BL.Catalogs -{ - public static class CatalogLoader - { - public static async Task LoadCatalog(ColorSpaces colorSpace, Rml rml, ObservablesContext context) - { - var space = await context.ColorSpaces.SingleOrDefaultAsync(x => x.Code == (int)colorSpace); - var all_items = await context.ColorCatalogs.Where(x => x.RmlGuid == rml.Guid && x.ColorSpace.Code == (int)colorSpace).ToListAsync(); - - Catalog catalog = new Catalog(); - catalog.ColorSpace = space; - catalog.Name = space.Description; - - if (all_items.Count > 0) - { - all_items = all_items.DistinctBy(x => x.Name).OrderBy(x => x.ColorCode).ToList(); - - int index = 1; - - foreach (var item in all_items.GroupBy(x => x.ColorGroup)) - { - CatalogGroup group = new CatalogGroup(); - group.Index = index++; - group.Name = item.First().ColorGroup; - - foreach (var i in item) - { - group.Items.Add(new CatalogItem(i)); - } - - catalog.Groups.Add(group); - } - } - - return catalog; - } - - public static Catalog GetRecent(Catalog source, List names) - { - var filtersItems = source.Groups.SelectMany(x => x.Items).Select(x => x.Entity).Where(x => names.Contains(x.Name)).ToList(); - - var first = filtersItems.FirstOrDefault(); - - Catalog catalog = new Catalog(); - - if (first != null) - { - catalog.ColorSpace = first.ColorSpace; - catalog.Name = first.ColorSpace.Description; - - foreach (var item in filtersItems.GroupBy(x => x.ColorGroup)) - { - CatalogGroup group = new CatalogGroup(); - group.Name = item.First().ColorGroup; - - foreach (var i in item) - { - group.Items.Add(new CatalogItem(i)); - } - - catalog.Groups.Add(group); - } - } - - return catalog; - } - } -} diff --git a/Software/Visual_Studio/Tango.BL/DTO/BrushStopDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/BrushStopDTOBase.cs index c5e72a905..a226e68a2 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/BrushStopDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/BrushStopDTOBase.cs @@ -270,9 +270,9 @@ namespace Tango.BL.DTO } /// - /// color catalog guid + /// color catalogs item guid /// - public String ColorCatalogGuid + public String ColorCatalogsItemGuid { get; set; } diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogDTOBase.cs index d5ac72833..a4bd83d05 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogDTOBase.cs @@ -21,30 +21,6 @@ namespace Tango.BL.DTO public abstract class ColorCatalogDTOBase : ObservableEntityDTO { - /// - /// rml guid - /// - public String RmlGuid - { - get; set; - } - - /// - /// color space guid - /// - public String ColorSpaceGuid - { - get; set; - } - - /// - /// color code - /// - public Int32 ColorCode - { - get; set; - } - /// /// name /// @@ -53,101 +29,5 @@ namespace Tango.BL.DTO get; set; } - /// - /// color group - /// - public String ColorGroup - { - get; set; - } - - /// - /// cyan - /// - public Double Cyan - { - get; set; - } - - /// - /// magenta - /// - public Double Magenta - { - get; set; - } - - /// - /// yellow - /// - public Double Yellow - { - get; set; - } - - /// - /// black - /// - public Double Black - { - get; set; - } - - /// - /// red - /// - public Int32 Red - { - get; set; - } - - /// - /// green - /// - public Int32 Green - { - get; set; - } - - /// - /// blue - /// - public Int32 Blue - { - get; set; - } - - /// - /// l - /// - public Double L - { - get; set; - } - - /// - /// a - /// - public Double A - { - get; set; - } - - /// - /// b - /// - public Double B - { - get; set; - } - - /// - /// process parameters table index - /// - public Int32 ProcessParametersTableIndex - { - get; set; - } - } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsGroupDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsGroupDTO.cs new file mode 100644 index 000000000..8115923e5 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsGroupDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class ColorCatalogsGroupDTO : ColorCatalogsGroupDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsGroupDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsGroupDTOBase.cs new file mode 100644 index 000000000..2e45d771d --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsGroupDTOBase.cs @@ -0,0 +1,49 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class ColorCatalogsGroupDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + /// + /// description + /// + public String Description + { + get; set; + } + + /// + /// color catalog guid + /// + public String ColorCatalogGuid + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemDTO.cs new file mode 100644 index 000000000..46b33b715 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class ColorCatalogsItemDTO : ColorCatalogsItemDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemDTOBase.cs new file mode 100644 index 000000000..ff6d57e51 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemDTOBase.cs @@ -0,0 +1,145 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class ColorCatalogsItemDTOBase : ObservableEntityDTO + { + + /// + /// color catalogs group guid + /// + public String ColorCatalogsGroupGuid + { + get; set; + } + + /// + /// code + /// + public Int32 Code + { + get; set; + } + + /// + /// name + /// + public String Name + { + get; set; + } + + /// + /// description + /// + public String Description + { + get; set; + } + + /// + /// cyan + /// + public Double Cyan + { + get; set; + } + + /// + /// magenta + /// + public Double Magenta + { + get; set; + } + + /// + /// yellow + /// + public Double Yellow + { + get; set; + } + + /// + /// black + /// + public Double Black + { + get; set; + } + + /// + /// red + /// + public Int32 Red + { + get; set; + } + + /// + /// green + /// + public Int32 Green + { + get; set; + } + + /// + /// blue + /// + public Int32 Blue + { + get; set; + } + + /// + /// l + /// + public Double L + { + get; set; + } + + /// + /// a + /// + public Double A + { + get; set; + } + + /// + /// b + /// + public Double B + { + get; set; + } + + /// + /// process parameters table index + /// + public Int32 ProcessParametersTableIndex + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemsRecipeDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemsRecipeDTO.cs new file mode 100644 index 000000000..07c7695e1 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemsRecipeDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class ColorCatalogsItemsRecipeDTO : ColorCatalogsItemsRecipeDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemsRecipeDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemsRecipeDTOBase.cs new file mode 100644 index 000000000..d7f21c463 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorCatalogsItemsRecipeDTOBase.cs @@ -0,0 +1,129 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class ColorCatalogsItemsRecipeDTOBase : ObservableEntityDTO + { + + /// + /// color catalogs item guid + /// + public String ColorCatalogsItemGuid + { + get; set; + } + + /// + /// rml guid + /// + public String RmlGuid + { + get; set; + } + + /// + /// cyan + /// + public Double Cyan + { + get; set; + } + + /// + /// magenta + /// + public Double Magenta + { + get; set; + } + + /// + /// yellow + /// + public Double Yellow + { + get; set; + } + + /// + /// black + /// + public Double Black + { + get; set; + } + + /// + /// red + /// + public Int32 Red + { + get; set; + } + + /// + /// green + /// + public Int32 Green + { + get; set; + } + + /// + /// blue + /// + public Int32 Blue + { + get; set; + } + + /// + /// l + /// + public Double L + { + get; set; + } + + /// + /// a + /// + public Double A + { + get; set; + } + + /// + /// b + /// + public Double B + { + get; set; + } + + /// + /// process parameters table index + /// + public Int32 ProcessParametersTableIndex + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorSpaceDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorSpaceDTOBase.cs index 02913f174..ddb367fc5 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/ColorSpaceDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorSpaceDTOBase.cs @@ -45,13 +45,5 @@ namespace Tango.BL.DTO get; set; } - /// - /// is catalog - /// - public Boolean IsCatalog - { - get; set; - } - } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs index 7bda5a5e0..9abf5f5c0 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs @@ -78,7 +78,7 @@ namespace Tango.BL.Entities _colorPropertyNames.Add(nameof(Black)); _colorPropertyNames.Add(nameof(Color)); - _colorPropertyNames.Add(nameof(ColorCatalog)); + _colorPropertyNames.Add(nameof(ColorCatalogsItem)); } /// @@ -499,9 +499,9 @@ namespace Tango.BL.Entities Lab lab = new Lab(L, A, B); Rgb rgb_catalog = new Rgb(255, 255, 255); - if (ColorCatalog != null) + if (ColorCatalogsItem != null) { - rgb_catalog = new Rgb(ColorCatalog.Red, ColorCatalog.Green, ColorCatalog.Blue); + rgb_catalog = new Rgb(ColorCatalogsItem.Red, ColorCatalogsItem.Green, ColorCatalogsItem.Blue); } switch ((ColorSpaces)ColorSpace.Code) @@ -518,8 +518,7 @@ namespace Tango.BL.Entities rgb = lab.To(); cmyk = lab.To(); break; - case ColorSpaces.Coats: - case ColorSpaces.Twine: + case ColorSpaces.Catalog: cmyk = rgb_catalog.To(); lab = rgb_catalog.To(); rgb = rgb_catalog; @@ -649,7 +648,7 @@ namespace Tango.BL.Entities { base.OnColorSpaceChanged(colorspace); - if (ColorSpace != null && ColorSpace.Code == ColorSpaces.Twine.ToInt32()) + if (ColorSpace != null && ColorSpace.Code == ColorSpaces.Catalog.ToInt32()) { Corrected = false; IsOutOfGamut = false; @@ -679,7 +678,7 @@ namespace Tango.BL.Entities { BrushStop cloned = base.Clone(); cloned.Segment = segment; - cloned.ColorCatalog = ColorCatalog; + cloned.ColorCatalogsItem = ColorCatalogsItem; cloned.ColorSpace = ColorSpace; cloned.SegmentGuid = segment.Guid; @@ -702,9 +701,9 @@ namespace Tango.BL.Entities { base.OnValidating(context); - if (ColorSpace.IsCatalog && ColorCatalog == null) + if (BrushColorSpace == ColorSpaces.Catalog && ColorCatalogsItem == null) { - InsertError(nameof(ColorCatalog), "Please specify a color code."); + InsertError(nameof(ColorCatalogsItem), "Please specify a color code."); } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/BrushStopBase.cs b/Software/Visual_Studio/Tango.BL/Entities/BrushStopBase.cs index a6dcad6a9..d4b0be595 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/BrushStopBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/BrushStopBase.cs @@ -83,7 +83,7 @@ namespace Tango.BL.Entities public event EventHandler CorrectedChanged; - public event EventHandler ColorCatalogChanged; + public event EventHandler ColorCatalogsItemChanged; public event EventHandler ColorSpaceChanged; @@ -924,59 +924,59 @@ namespace Tango.BL.Entities } } - protected String _colorcatalogguid; + protected String _colorcatalogsitemguid; /// - /// Gets or sets the brushstopbase color catalog guid. + /// Gets or sets the brushstopbase color catalogs item guid. /// - [Column("COLOR_CATALOG_GUID")] - [ForeignKey("ColorCatalog")] + [Column("COLOR_CATALOGS_ITEM_GUID")] + [ForeignKey("ColorCatalogsItem")] - public String ColorCatalogGuid + public String ColorCatalogsItemGuid { get { - return _colorcatalogguid; + return _colorcatalogsitemguid; } set { - if (_colorcatalogguid != value) + if (_colorcatalogsitemguid != value) { - _colorcatalogguid = value; + _colorcatalogsitemguid = value; } } } - protected ColorCatalog _colorcatalog; + protected ColorCatalogsItem _colorcatalogsitem; /// - /// Gets or sets the brushstopbase color catalogs. + /// Gets or sets the brushstopbase color catalogs items. /// [XmlIgnore] [JsonIgnore] - public virtual ColorCatalog ColorCatalog + public virtual ColorCatalogsItem ColorCatalogsItem { get { - return _colorcatalog; + return _colorcatalogsitem; } set { - if (_colorcatalog != value) + if (_colorcatalogsitem != value) { - _colorcatalog = value; + _colorcatalogsitem = value; - if (ColorCatalog != null) + if (ColorCatalogsItem != null) { - ColorCatalogGuid = ColorCatalog.Guid; + ColorCatalogsItemGuid = ColorCatalogsItem.Guid; } - OnColorCatalogChanged(value); + OnColorCatalogsItemChanged(value); } } @@ -1308,12 +1308,12 @@ namespace Tango.BL.Entities } /// - /// Called when the ColorCatalog has changed. + /// Called when the ColorCatalogsItem has changed. /// - protected virtual void OnColorCatalogChanged(ColorCatalog colorcatalog) + protected virtual void OnColorCatalogsItemChanged(ColorCatalogsItem colorcatalogsitem) { - ColorCatalogChanged?.Invoke(this, colorcatalog); - RaisePropertyChanged(nameof(ColorCatalog)); + ColorCatalogsItemChanged?.Invoke(this, colorcatalogsitem); + RaisePropertyChanged(nameof(ColorCatalogsItem)); } /// diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalog.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalog.cs index 17d87ff01..5b9e02f7f 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalog.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalog.cs @@ -9,36 +9,6 @@ namespace Tango.BL.Entities { public partial class ColorCatalog : ColorCatalogBase { - private Color _color; - /// - /// Gets the catalog item RGB as color. - /// - public Color Color - { - get { return _color; } - private set { _color = value; RaisePropertyChangedAuto(); } - } - - /// - /// Raises the property changed event. - /// - /// Name of the property. - protected override void RaisePropertyChanged(string propName) - { - base.RaisePropertyChanged(propName); - - if (propName == nameof(Red) || propName == nameof(Green) || propName == nameof(Blue)) - { - Color = Color.FromRgb((byte)Red, (byte)Green, (byte)Blue); - } - } - - /// - /// Initializes a new instance of the class. - /// - public ColorCatalog() : base() - { - - } + } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogBase.cs index 362b812aa..2004147c6 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogBase.cs @@ -25,118 +25,9 @@ namespace Tango.BL.Entities public abstract class ColorCatalogBase : ObservableEntity { - public event EventHandler ColorCodeChanged; - public event EventHandler NameChanged; - public event EventHandler ColorGroupChanged; - - public event EventHandler CyanChanged; - - public event EventHandler MagentaChanged; - - public event EventHandler YellowChanged; - - public event EventHandler BlackChanged; - - public event EventHandler RedChanged; - - public event EventHandler GreenChanged; - - public event EventHandler BlueChanged; - - public event EventHandler LChanged; - - public event EventHandler AChanged; - - public event EventHandler BChanged; - - public event EventHandler ProcessParametersTableIndexChanged; - - public event EventHandler> BrushStopsChanged; - - public event EventHandler ColorSpaceChanged; - - public event EventHandler RmlChanged; - - protected String _rmlguid; - - /// - /// Gets or sets the colorcatalogbase rml guid. - /// - - [Column("RML_GUID")] - [ForeignKey("Rml")] - - public String RmlGuid - { - get - { - return _rmlguid; - } - - set - { - if (_rmlguid != value) - { - _rmlguid = value; - - } - } - } - - protected String _colorspaceguid; - - /// - /// Gets or sets the colorcatalogbase color space guid. - /// - - [Column("COLOR_SPACE_GUID")] - [ForeignKey("ColorSpace")] - - public String ColorSpaceGuid - { - get - { - return _colorspaceguid; - } - - set - { - if (_colorspaceguid != value) - { - _colorspaceguid = value; - - } - } - } - - protected Int32 _colorcode; - - /// - /// Gets or sets the colorcatalogbase color code. - /// - - [Column("COLOR_CODE")] - - public Int32 ColorCode - { - get - { - return _colorcode; - } - - set - { - if (_colorcode != value) - { - _colorcode = value; - - OnColorCodeChanged(value); - - } - } - } + public event EventHandler> ColorCatalogsGroupsChanged; protected String _name; @@ -165,428 +56,31 @@ namespace Tango.BL.Entities } } - protected String _colorgroup; - - /// - /// Gets or sets the colorcatalogbase color group. - /// - - [Column("COLOR_GROUP")] - - public String ColorGroup - { - get - { - return _colorgroup; - } - - set - { - if (_colorgroup != value) - { - _colorgroup = value; - - OnColorGroupChanged(value); - - } - } - } - - protected Double _cyan; - - /// - /// Gets or sets the colorcatalogbase cyan. - /// - - [Column("CYAN")] - - public Double Cyan - { - get - { - return _cyan; - } - - set - { - if (_cyan != value) - { - _cyan = value; - - OnCyanChanged(value); - - } - } - } - - protected Double _magenta; - - /// - /// Gets or sets the colorcatalogbase magenta. - /// - - [Column("MAGENTA")] - - public Double Magenta - { - get - { - return _magenta; - } - - set - { - if (_magenta != value) - { - _magenta = value; - - OnMagentaChanged(value); - - } - } - } - - protected Double _yellow; - - /// - /// Gets or sets the colorcatalogbase yellow. - /// - - [Column("YELLOW")] - - public Double Yellow - { - get - { - return _yellow; - } - - set - { - if (_yellow != value) - { - _yellow = value; - - OnYellowChanged(value); - - } - } - } - - protected Double _black; + protected SynchronizedObservableCollection _colorcatalogsgroups; /// - /// Gets or sets the colorcatalogbase black. + /// Gets or sets the colorcatalogbase color catalogs groups. /// - [Column("BLACK")] - - public Double Black + public virtual SynchronizedObservableCollection ColorCatalogsGroups { get { - return _black; + return _colorcatalogsgroups; } set { - if (_black != value) + if (_colorcatalogsgroups != value) { - _black = value; + _colorcatalogsgroups = value; - OnBlackChanged(value); + OnColorCatalogsGroupsChanged(value); } } } - protected Int32 _red; - - /// - /// Gets or sets the colorcatalogbase red. - /// - - [Column("RED")] - - public Int32 Red - { - get - { - return _red; - } - - set - { - if (_red != value) - { - _red = value; - - OnRedChanged(value); - - } - } - } - - protected Int32 _green; - - /// - /// Gets or sets the colorcatalogbase green. - /// - - [Column("GREEN")] - - public Int32 Green - { - get - { - return _green; - } - - set - { - if (_green != value) - { - _green = value; - - OnGreenChanged(value); - - } - } - } - - protected Int32 _blue; - - /// - /// Gets or sets the colorcatalogbase blue. - /// - - [Column("BLUE")] - - public Int32 Blue - { - get - { - return _blue; - } - - set - { - if (_blue != value) - { - _blue = value; - - OnBlueChanged(value); - - } - } - } - - protected Double _l; - - /// - /// Gets or sets the colorcatalogbase l. - /// - - [Column("L")] - - public Double L - { - get - { - return _l; - } - - set - { - if (_l != value) - { - _l = value; - - OnLChanged(value); - - } - } - } - - protected Double _a; - - /// - /// Gets or sets the colorcatalogbase a. - /// - - [Column("A")] - - public Double A - { - get - { - return _a; - } - - set - { - if (_a != value) - { - _a = value; - - OnAChanged(value); - - } - } - } - - protected Double _b; - - /// - /// Gets or sets the colorcatalogbase b. - /// - - [Column("B")] - - public Double B - { - get - { - return _b; - } - - set - { - if (_b != value) - { - _b = value; - - OnBChanged(value); - - } - } - } - - protected Int32 _processparameterstableindex; - - /// - /// Gets or sets the colorcatalogbase process parameters table index. - /// - - [Column("PROCESS_PARAMETERS_TABLE_INDEX")] - - public Int32 ProcessParametersTableIndex - { - get - { - return _processparameterstableindex; - } - - set - { - if (_processparameterstableindex != value) - { - _processparameterstableindex = value; - - OnProcessParametersTableIndexChanged(value); - - } - } - } - - protected SynchronizedObservableCollection _brushstops; - - /// - /// Gets or sets the colorcatalogbase brush stops. - /// - - public virtual SynchronizedObservableCollection BrushStops - { - get - { - return _brushstops; - } - - set - { - if (_brushstops != value) - { - _brushstops = value; - - OnBrushStopsChanged(value); - - } - } - } - - protected ColorSpace _colorspace; - - /// - /// Gets or sets the colorcatalogbase color spaces. - /// - - [XmlIgnore] - [JsonIgnore] - public virtual ColorSpace ColorSpace - { - get - { - return _colorspace; - } - - set - { - if (_colorspace != value) - { - _colorspace = value; - - if (ColorSpace != null) - { - ColorSpaceGuid = ColorSpace.Guid; - } - - OnColorSpaceChanged(value); - - } - } - } - - protected Rml _rml; - - /// - /// Gets or sets the colorcatalogbase rml. - /// - - [XmlIgnore] - [JsonIgnore] - public virtual Rml Rml - { - get - { - return _rml; - } - - set - { - if (_rml != value) - { - _rml = value; - - if (Rml != null) - { - RmlGuid = Rml.Guid; - } - - OnRmlChanged(value); - - } - } - } - - /// - /// Called when the ColorCode has changed. - /// - protected virtual void OnColorCodeChanged(Int32 colorcode) - { - ColorCodeChanged?.Invoke(this, colorcode); - RaisePropertyChanged(nameof(ColorCode)); - } - /// /// Called when the Name has changed. /// @@ -597,138 +91,12 @@ namespace Tango.BL.Entities } /// - /// Called when the ColorGroup has changed. - /// - protected virtual void OnColorGroupChanged(String colorgroup) - { - ColorGroupChanged?.Invoke(this, colorgroup); - RaisePropertyChanged(nameof(ColorGroup)); - } - - /// - /// Called when the Cyan has changed. - /// - protected virtual void OnCyanChanged(Double cyan) - { - CyanChanged?.Invoke(this, cyan); - RaisePropertyChanged(nameof(Cyan)); - } - - /// - /// Called when the Magenta has changed. - /// - protected virtual void OnMagentaChanged(Double magenta) - { - MagentaChanged?.Invoke(this, magenta); - RaisePropertyChanged(nameof(Magenta)); - } - - /// - /// Called when the Yellow has changed. - /// - protected virtual void OnYellowChanged(Double yellow) - { - YellowChanged?.Invoke(this, yellow); - RaisePropertyChanged(nameof(Yellow)); - } - - /// - /// Called when the Black has changed. - /// - protected virtual void OnBlackChanged(Double black) - { - BlackChanged?.Invoke(this, black); - RaisePropertyChanged(nameof(Black)); - } - - /// - /// Called when the Red has changed. - /// - protected virtual void OnRedChanged(Int32 red) - { - RedChanged?.Invoke(this, red); - RaisePropertyChanged(nameof(Red)); - } - - /// - /// Called when the Green has changed. - /// - protected virtual void OnGreenChanged(Int32 green) - { - GreenChanged?.Invoke(this, green); - RaisePropertyChanged(nameof(Green)); - } - - /// - /// Called when the Blue has changed. - /// - protected virtual void OnBlueChanged(Int32 blue) - { - BlueChanged?.Invoke(this, blue); - RaisePropertyChanged(nameof(Blue)); - } - - /// - /// Called when the L has changed. - /// - protected virtual void OnLChanged(Double l) - { - LChanged?.Invoke(this, l); - RaisePropertyChanged(nameof(L)); - } - - /// - /// Called when the A has changed. - /// - protected virtual void OnAChanged(Double a) - { - AChanged?.Invoke(this, a); - RaisePropertyChanged(nameof(A)); - } - - /// - /// Called when the B has changed. - /// - protected virtual void OnBChanged(Double b) - { - BChanged?.Invoke(this, b); - RaisePropertyChanged(nameof(B)); - } - - /// - /// Called when the ProcessParametersTableIndex has changed. - /// - protected virtual void OnProcessParametersTableIndexChanged(Int32 processparameterstableindex) - { - ProcessParametersTableIndexChanged?.Invoke(this, processparameterstableindex); - RaisePropertyChanged(nameof(ProcessParametersTableIndex)); - } - - /// - /// Called when the BrushStops has changed. - /// - protected virtual void OnBrushStopsChanged(SynchronizedObservableCollection brushstops) - { - BrushStopsChanged?.Invoke(this, brushstops); - RaisePropertyChanged(nameof(BrushStops)); - } - - /// - /// Called when the ColorSpace has changed. - /// - protected virtual void OnColorSpaceChanged(ColorSpace colorspace) - { - ColorSpaceChanged?.Invoke(this, colorspace); - RaisePropertyChanged(nameof(ColorSpace)); - } - - /// - /// Called when the Rml has changed. + /// Called when the ColorCatalogsGroups has changed. /// - protected virtual void OnRmlChanged(Rml rml) + protected virtual void OnColorCatalogsGroupsChanged(SynchronizedObservableCollection colorcatalogsgroups) { - RmlChanged?.Invoke(this, rml); - RaisePropertyChanged(nameof(Rml)); + ColorCatalogsGroupsChanged?.Invoke(this, colorcatalogsgroups); + RaisePropertyChanged(nameof(ColorCatalogsGroups)); } /// @@ -737,7 +105,7 @@ namespace Tango.BL.Entities public ColorCatalogBase() : base() { - BrushStops = new SynchronizedObservableCollection(); + ColorCatalogsGroups = new SynchronizedObservableCollection(); } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsGroup.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsGroup.cs new file mode 100644 index 000000000..9096b3a7a --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsGroup.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; + +namespace Tango.BL.Entities +{ + public class ColorCatalogsGroup : ColorCatalogsGroupBase + { + public Color Color + { + get + { + if (ColorCatalogsItems != null && ColorCatalogsItems.Count > 0) + { + return Color.FromRgb( + (byte)(ColorCatalogsItems.Sum(x => x.Color.R) / ColorCatalogsItems.Count), + (byte)(ColorCatalogsItems.Sum(x => x.Color.G) / ColorCatalogsItems.Count), + (byte)(ColorCatalogsItems.Sum(x => x.Color.B) / ColorCatalogsItems.Count)); + } + else + { + return Colors.White; + } + } + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsGroupBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsGroupBase.cs new file mode 100644 index 000000000..113d22764 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsGroupBase.cs @@ -0,0 +1,219 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; + +namespace Tango.BL.Entities +{ + [Table("COLOR_CATALOGS_GROUPS")] + public abstract class ColorCatalogsGroupBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler DescriptionChanged; + + public event EventHandler ColorCatalogChanged; + + public event EventHandler> ColorCatalogsItemsChanged; + + protected String _name; + + /// + /// Gets or sets the colorcatalogsgroupbase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected String _description; + + /// + /// Gets or sets the colorcatalogsgroupbase description. + /// + + [Column("DESCRIPTION")] + + public String Description + { + get + { + return _description; + } + + set + { + if (_description != value) + { + _description = value; + + OnDescriptionChanged(value); + + } + } + } + + protected String _colorcatalogguid; + + /// + /// Gets or sets the colorcatalogsgroupbase color catalog guid. + /// + + [Column("COLOR_CATALOG_GUID")] + [ForeignKey("ColorCatalog")] + + public String ColorCatalogGuid + { + get + { + return _colorcatalogguid; + } + + set + { + if (_colorcatalogguid != value) + { + _colorcatalogguid = value; + + } + } + } + + protected ColorCatalog _colorcatalog; + + /// + /// Gets or sets the colorcatalogsgroupbase color catalogs. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual ColorCatalog ColorCatalog + { + get + { + return _colorcatalog; + } + + set + { + if (_colorcatalog != value) + { + _colorcatalog = value; + + if (ColorCatalog != null) + { + ColorCatalogGuid = ColorCatalog.Guid; + } + + OnColorCatalogChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _colorcatalogsitems; + + /// + /// Gets or sets the colorcatalogsgroupbase color catalogs items. + /// + + public virtual SynchronizedObservableCollection ColorCatalogsItems + { + get + { + return _colorcatalogsitems; + } + + set + { + if (_colorcatalogsitems != value) + { + _colorcatalogsitems = value; + + OnColorCatalogsItemsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the Description has changed. + /// + protected virtual void OnDescriptionChanged(String description) + { + DescriptionChanged?.Invoke(this, description); + RaisePropertyChanged(nameof(Description)); + } + + /// + /// Called when the ColorCatalog has changed. + /// + protected virtual void OnColorCatalogChanged(ColorCatalog colorcatalog) + { + ColorCatalogChanged?.Invoke(this, colorcatalog); + RaisePropertyChanged(nameof(ColorCatalog)); + } + + /// + /// Called when the ColorCatalogsItems has changed. + /// + protected virtual void OnColorCatalogsItemsChanged(SynchronizedObservableCollection colorcatalogsitems) + { + ColorCatalogsItemsChanged?.Invoke(this, colorcatalogsitems); + RaisePropertyChanged(nameof(ColorCatalogsItems)); + } + + /// + /// Initializes a new instance of the class. + /// + public ColorCatalogsGroupBase() : base() + { + + ColorCatalogsItems = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItem.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItem.cs new file mode 100644 index 000000000..98820e835 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItem.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; + +namespace Tango.BL.Entities +{ + public class ColorCatalogsItem : ColorCatalogsItemBase + { + private Color _color; + /// + /// Gets the catalog item color. + /// + public Color Color + { + get { return Color.FromRgb((byte)Red, (byte)Green, (byte)Blue); } + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItemBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItemBase.cs new file mode 100644 index 000000000..febeddfd0 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItemBase.cs @@ -0,0 +1,713 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; + +namespace Tango.BL.Entities +{ + [Table("COLOR_CATALOGS_ITEMS")] + public abstract class ColorCatalogsItemBase : ObservableEntity + { + + public event EventHandler CodeChanged; + + public event EventHandler NameChanged; + + public event EventHandler DescriptionChanged; + + public event EventHandler CyanChanged; + + public event EventHandler MagentaChanged; + + public event EventHandler YellowChanged; + + public event EventHandler BlackChanged; + + public event EventHandler RedChanged; + + public event EventHandler GreenChanged; + + public event EventHandler BlueChanged; + + public event EventHandler LChanged; + + public event EventHandler AChanged; + + public event EventHandler BChanged; + + public event EventHandler ProcessParametersTableIndexChanged; + + public event EventHandler> BrushStopsChanged; + + public event EventHandler ColorCatalogsGroupChanged; + + public event EventHandler> ColorCatalogsItemsRecipesChanged; + + protected String _colorcatalogsgroupguid; + + /// + /// Gets or sets the colorcatalogsitembase color catalogs group guid. + /// + + [Column("COLOR_CATALOGS_GROUP_GUID")] + [ForeignKey("ColorCatalogsGroup")] + + public String ColorCatalogsGroupGuid + { + get + { + return _colorcatalogsgroupguid; + } + + set + { + if (_colorcatalogsgroupguid != value) + { + _colorcatalogsgroupguid = value; + + } + } + } + + protected Int32 _code; + + /// + /// Gets or sets the colorcatalogsitembase code. + /// + + [Column("CODE")] + + public Int32 Code + { + get + { + return _code; + } + + set + { + if (_code != value) + { + _code = value; + + OnCodeChanged(value); + + } + } + } + + protected String _name; + + /// + /// Gets or sets the colorcatalogsitembase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected String _description; + + /// + /// Gets or sets the colorcatalogsitembase description. + /// + + [Column("DESCRIPTION")] + + public String Description + { + get + { + return _description; + } + + set + { + if (_description != value) + { + _description = value; + + OnDescriptionChanged(value); + + } + } + } + + protected Double _cyan; + + /// + /// Gets or sets the colorcatalogsitembase cyan. + /// + + [Column("CYAN")] + + public Double Cyan + { + get + { + return _cyan; + } + + set + { + if (_cyan != value) + { + _cyan = value; + + OnCyanChanged(value); + + } + } + } + + protected Double _magenta; + + /// + /// Gets or sets the colorcatalogsitembase magenta. + /// + + [Column("MAGENTA")] + + public Double Magenta + { + get + { + return _magenta; + } + + set + { + if (_magenta != value) + { + _magenta = value; + + OnMagentaChanged(value); + + } + } + } + + protected Double _yellow; + + /// + /// Gets or sets the colorcatalogsitembase yellow. + /// + + [Column("YELLOW")] + + public Double Yellow + { + get + { + return _yellow; + } + + set + { + if (_yellow != value) + { + _yellow = value; + + OnYellowChanged(value); + + } + } + } + + protected Double _black; + + /// + /// Gets or sets the colorcatalogsitembase black. + /// + + [Column("BLACK")] + + public Double Black + { + get + { + return _black; + } + + set + { + if (_black != value) + { + _black = value; + + OnBlackChanged(value); + + } + } + } + + protected Int32 _red; + + /// + /// Gets or sets the colorcatalogsitembase red. + /// + + [Column("RED")] + + public Int32 Red + { + get + { + return _red; + } + + set + { + if (_red != value) + { + _red = value; + + OnRedChanged(value); + + } + } + } + + protected Int32 _green; + + /// + /// Gets or sets the colorcatalogsitembase green. + /// + + [Column("GREEN")] + + public Int32 Green + { + get + { + return _green; + } + + set + { + if (_green != value) + { + _green = value; + + OnGreenChanged(value); + + } + } + } + + protected Int32 _blue; + + /// + /// Gets or sets the colorcatalogsitembase blue. + /// + + [Column("BLUE")] + + public Int32 Blue + { + get + { + return _blue; + } + + set + { + if (_blue != value) + { + _blue = value; + + OnBlueChanged(value); + + } + } + } + + protected Double _l; + + /// + /// Gets or sets the colorcatalogsitembase l. + /// + + [Column("L")] + + public Double L + { + get + { + return _l; + } + + set + { + if (_l != value) + { + _l = value; + + OnLChanged(value); + + } + } + } + + protected Double _a; + + /// + /// Gets or sets the colorcatalogsitembase a. + /// + + [Column("A")] + + public Double A + { + get + { + return _a; + } + + set + { + if (_a != value) + { + _a = value; + + OnAChanged(value); + + } + } + } + + protected Double _b; + + /// + /// Gets or sets the colorcatalogsitembase b. + /// + + [Column("B")] + + public Double B + { + get + { + return _b; + } + + set + { + if (_b != value) + { + _b = value; + + OnBChanged(value); + + } + } + } + + protected Int32 _processparameterstableindex; + + /// + /// Gets or sets the colorcatalogsitembase process parameters table index. + /// + + [Column("PROCESS_PARAMETERS_TABLE_INDEX")] + + public Int32 ProcessParametersTableIndex + { + get + { + return _processparameterstableindex; + } + + set + { + if (_processparameterstableindex != value) + { + _processparameterstableindex = value; + + OnProcessParametersTableIndexChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _brushstops; + + /// + /// Gets or sets the colorcatalogsitembase brush stops. + /// + + public virtual SynchronizedObservableCollection BrushStops + { + get + { + return _brushstops; + } + + set + { + if (_brushstops != value) + { + _brushstops = value; + + OnBrushStopsChanged(value); + + } + } + } + + protected ColorCatalogsGroup _colorcatalogsgroup; + + /// + /// Gets or sets the colorcatalogsitembase color catalogs groups. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual ColorCatalogsGroup ColorCatalogsGroup + { + get + { + return _colorcatalogsgroup; + } + + set + { + if (_colorcatalogsgroup != value) + { + _colorcatalogsgroup = value; + + if (ColorCatalogsGroup != null) + { + ColorCatalogsGroupGuid = ColorCatalogsGroup.Guid; + } + + OnColorCatalogsGroupChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _colorcatalogsitemsrecipes; + + /// + /// Gets or sets the colorcatalogsitembase color catalogs items recipes. + /// + + public virtual SynchronizedObservableCollection ColorCatalogsItemsRecipes + { + get + { + return _colorcatalogsitemsrecipes; + } + + set + { + if (_colorcatalogsitemsrecipes != value) + { + _colorcatalogsitemsrecipes = value; + + OnColorCatalogsItemsRecipesChanged(value); + + } + } + } + + /// + /// Called when the Code has changed. + /// + protected virtual void OnCodeChanged(Int32 code) + { + CodeChanged?.Invoke(this, code); + RaisePropertyChanged(nameof(Code)); + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the Description has changed. + /// + protected virtual void OnDescriptionChanged(String description) + { + DescriptionChanged?.Invoke(this, description); + RaisePropertyChanged(nameof(Description)); + } + + /// + /// Called when the Cyan has changed. + /// + protected virtual void OnCyanChanged(Double cyan) + { + CyanChanged?.Invoke(this, cyan); + RaisePropertyChanged(nameof(Cyan)); + } + + /// + /// Called when the Magenta has changed. + /// + protected virtual void OnMagentaChanged(Double magenta) + { + MagentaChanged?.Invoke(this, magenta); + RaisePropertyChanged(nameof(Magenta)); + } + + /// + /// Called when the Yellow has changed. + /// + protected virtual void OnYellowChanged(Double yellow) + { + YellowChanged?.Invoke(this, yellow); + RaisePropertyChanged(nameof(Yellow)); + } + + /// + /// Called when the Black has changed. + /// + protected virtual void OnBlackChanged(Double black) + { + BlackChanged?.Invoke(this, black); + RaisePropertyChanged(nameof(Black)); + } + + /// + /// Called when the Red has changed. + /// + protected virtual void OnRedChanged(Int32 red) + { + RedChanged?.Invoke(this, red); + RaisePropertyChanged(nameof(Red)); + } + + /// + /// Called when the Green has changed. + /// + protected virtual void OnGreenChanged(Int32 green) + { + GreenChanged?.Invoke(this, green); + RaisePropertyChanged(nameof(Green)); + } + + /// + /// Called when the Blue has changed. + /// + protected virtual void OnBlueChanged(Int32 blue) + { + BlueChanged?.Invoke(this, blue); + RaisePropertyChanged(nameof(Blue)); + } + + /// + /// Called when the L has changed. + /// + protected virtual void OnLChanged(Double l) + { + LChanged?.Invoke(this, l); + RaisePropertyChanged(nameof(L)); + } + + /// + /// Called when the A has changed. + /// + protected virtual void OnAChanged(Double a) + { + AChanged?.Invoke(this, a); + RaisePropertyChanged(nameof(A)); + } + + /// + /// Called when the B has changed. + /// + protected virtual void OnBChanged(Double b) + { + BChanged?.Invoke(this, b); + RaisePropertyChanged(nameof(B)); + } + + /// + /// Called when the ProcessParametersTableIndex has changed. + /// + protected virtual void OnProcessParametersTableIndexChanged(Int32 processparameterstableindex) + { + ProcessParametersTableIndexChanged?.Invoke(this, processparameterstableindex); + RaisePropertyChanged(nameof(ProcessParametersTableIndex)); + } + + /// + /// Called when the BrushStops has changed. + /// + protected virtual void OnBrushStopsChanged(SynchronizedObservableCollection brushstops) + { + BrushStopsChanged?.Invoke(this, brushstops); + RaisePropertyChanged(nameof(BrushStops)); + } + + /// + /// Called when the ColorCatalogsGroup has changed. + /// + protected virtual void OnColorCatalogsGroupChanged(ColorCatalogsGroup colorcatalogsgroup) + { + ColorCatalogsGroupChanged?.Invoke(this, colorcatalogsgroup); + RaisePropertyChanged(nameof(ColorCatalogsGroup)); + } + + /// + /// Called when the ColorCatalogsItemsRecipes has changed. + /// + protected virtual void OnColorCatalogsItemsRecipesChanged(SynchronizedObservableCollection colorcatalogsitemsrecipes) + { + ColorCatalogsItemsRecipesChanged?.Invoke(this, colorcatalogsitemsrecipes); + RaisePropertyChanged(nameof(ColorCatalogsItemsRecipes)); + } + + /// + /// Initializes a new instance of the class. + /// + public ColorCatalogsItemBase() : base() + { + + BrushStops = new SynchronizedObservableCollection(); + + ColorCatalogsItemsRecipes = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItemsRecipe.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItemsRecipe.cs new file mode 100644 index 000000000..c1cf7911d --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItemsRecipe.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; + +namespace Tango.BL.Entities +{ + public class ColorCatalogsItemsRecipe : ColorCatalogsItemsRecipeBase + { + private Color _color; + /// + /// Gets the recipe color. + /// + public Color Color + { + get { return Color.FromRgb((byte)Red, (byte)Green, (byte)Blue); } + } + + /// + /// Initializes a new instance of the class. + /// + public ColorCatalogsItemsRecipe() : base() + { + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItemsRecipeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItemsRecipeBase.cs new file mode 100644 index 000000000..6fa94c23e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogsItemsRecipeBase.cs @@ -0,0 +1,591 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; + +namespace Tango.BL.Entities +{ + [Table("COLOR_CATALOGS_ITEMS_RECIPES")] + public abstract class ColorCatalogsItemsRecipeBase : ObservableEntity + { + + public event EventHandler CyanChanged; + + public event EventHandler MagentaChanged; + + public event EventHandler YellowChanged; + + public event EventHandler BlackChanged; + + public event EventHandler RedChanged; + + public event EventHandler GreenChanged; + + public event EventHandler BlueChanged; + + public event EventHandler LChanged; + + public event EventHandler AChanged; + + public event EventHandler BChanged; + + public event EventHandler ProcessParametersTableIndexChanged; + + public event EventHandler ColorCatalogsItemChanged; + + public event EventHandler RmlChanged; + + protected String _colorcatalogsitemguid; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase color catalogs item guid. + /// + + [Column("COLOR_CATALOGS_ITEM_GUID")] + [ForeignKey("ColorCatalogsItem")] + + public String ColorCatalogsItemGuid + { + get + { + return _colorcatalogsitemguid; + } + + set + { + if (_colorcatalogsitemguid != value) + { + _colorcatalogsitemguid = value; + + } + } + } + + protected String _rmlguid; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase rml guid. + /// + + [Column("RML_GUID")] + [ForeignKey("Rml")] + + public String RmlGuid + { + get + { + return _rmlguid; + } + + set + { + if (_rmlguid != value) + { + _rmlguid = value; + + } + } + } + + protected Double _cyan; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase cyan. + /// + + [Column("CYAN")] + + public Double Cyan + { + get + { + return _cyan; + } + + set + { + if (_cyan != value) + { + _cyan = value; + + OnCyanChanged(value); + + } + } + } + + protected Double _magenta; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase magenta. + /// + + [Column("MAGENTA")] + + public Double Magenta + { + get + { + return _magenta; + } + + set + { + if (_magenta != value) + { + _magenta = value; + + OnMagentaChanged(value); + + } + } + } + + protected Double _yellow; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase yellow. + /// + + [Column("YELLOW")] + + public Double Yellow + { + get + { + return _yellow; + } + + set + { + if (_yellow != value) + { + _yellow = value; + + OnYellowChanged(value); + + } + } + } + + protected Double _black; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase black. + /// + + [Column("BLACK")] + + public Double Black + { + get + { + return _black; + } + + set + { + if (_black != value) + { + _black = value; + + OnBlackChanged(value); + + } + } + } + + protected Int32 _red; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase red. + /// + + [Column("RED")] + + public Int32 Red + { + get + { + return _red; + } + + set + { + if (_red != value) + { + _red = value; + + OnRedChanged(value); + + } + } + } + + protected Int32 _green; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase green. + /// + + [Column("GREEN")] + + public Int32 Green + { + get + { + return _green; + } + + set + { + if (_green != value) + { + _green = value; + + OnGreenChanged(value); + + } + } + } + + protected Int32 _blue; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase blue. + /// + + [Column("BLUE")] + + public Int32 Blue + { + get + { + return _blue; + } + + set + { + if (_blue != value) + { + _blue = value; + + OnBlueChanged(value); + + } + } + } + + protected Double _l; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase l. + /// + + [Column("L")] + + public Double L + { + get + { + return _l; + } + + set + { + if (_l != value) + { + _l = value; + + OnLChanged(value); + + } + } + } + + protected Double _a; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase a. + /// + + [Column("A")] + + public Double A + { + get + { + return _a; + } + + set + { + if (_a != value) + { + _a = value; + + OnAChanged(value); + + } + } + } + + protected Double _b; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase b. + /// + + [Column("B")] + + public Double B + { + get + { + return _b; + } + + set + { + if (_b != value) + { + _b = value; + + OnBChanged(value); + + } + } + } + + protected Int32 _processparameterstableindex; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase process parameters table index. + /// + + [Column("PROCESS_PARAMETERS_TABLE_INDEX")] + + public Int32 ProcessParametersTableIndex + { + get + { + return _processparameterstableindex; + } + + set + { + if (_processparameterstableindex != value) + { + _processparameterstableindex = value; + + OnProcessParametersTableIndexChanged(value); + + } + } + } + + protected ColorCatalogsItem _colorcatalogsitem; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase color catalogs items. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual ColorCatalogsItem ColorCatalogsItem + { + get + { + return _colorcatalogsitem; + } + + set + { + if (_colorcatalogsitem != value) + { + _colorcatalogsitem = value; + + if (ColorCatalogsItem != null) + { + ColorCatalogsItemGuid = ColorCatalogsItem.Guid; + } + + OnColorCatalogsItemChanged(value); + + } + } + } + + protected Rml _rml; + + /// + /// Gets or sets the colorcatalogsitemsrecipebase rml. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual Rml Rml + { + get + { + return _rml; + } + + set + { + if (_rml != value) + { + _rml = value; + + if (Rml != null) + { + RmlGuid = Rml.Guid; + } + + OnRmlChanged(value); + + } + } + } + + /// + /// Called when the Cyan has changed. + /// + protected virtual void OnCyanChanged(Double cyan) + { + CyanChanged?.Invoke(this, cyan); + RaisePropertyChanged(nameof(Cyan)); + } + + /// + /// Called when the Magenta has changed. + /// + protected virtual void OnMagentaChanged(Double magenta) + { + MagentaChanged?.Invoke(this, magenta); + RaisePropertyChanged(nameof(Magenta)); + } + + /// + /// Called when the Yellow has changed. + /// + protected virtual void OnYellowChanged(Double yellow) + { + YellowChanged?.Invoke(this, yellow); + RaisePropertyChanged(nameof(Yellow)); + } + + /// + /// Called when the Black has changed. + /// + protected virtual void OnBlackChanged(Double black) + { + BlackChanged?.Invoke(this, black); + RaisePropertyChanged(nameof(Black)); + } + + /// + /// Called when the Red has changed. + /// + protected virtual void OnRedChanged(Int32 red) + { + RedChanged?.Invoke(this, red); + RaisePropertyChanged(nameof(Red)); + } + + /// + /// Called when the Green has changed. + /// + protected virtual void OnGreenChanged(Int32 green) + { + GreenChanged?.Invoke(this, green); + RaisePropertyChanged(nameof(Green)); + } + + /// + /// Called when the Blue has changed. + /// + protected virtual void OnBlueChanged(Int32 blue) + { + BlueChanged?.Invoke(this, blue); + RaisePropertyChanged(nameof(Blue)); + } + + /// + /// Called when the L has changed. + /// + protected virtual void OnLChanged(Double l) + { + LChanged?.Invoke(this, l); + RaisePropertyChanged(nameof(L)); + } + + /// + /// Called when the A has changed. + /// + protected virtual void OnAChanged(Double a) + { + AChanged?.Invoke(this, a); + RaisePropertyChanged(nameof(A)); + } + + /// + /// Called when the B has changed. + /// + protected virtual void OnBChanged(Double b) + { + BChanged?.Invoke(this, b); + RaisePropertyChanged(nameof(B)); + } + + /// + /// Called when the ProcessParametersTableIndex has changed. + /// + protected virtual void OnProcessParametersTableIndexChanged(Int32 processparameterstableindex) + { + ProcessParametersTableIndexChanged?.Invoke(this, processparameterstableindex); + RaisePropertyChanged(nameof(ProcessParametersTableIndex)); + } + + /// + /// Called when the ColorCatalogsItem has changed. + /// + protected virtual void OnColorCatalogsItemChanged(ColorCatalogsItem colorcatalogsitem) + { + ColorCatalogsItemChanged?.Invoke(this, colorcatalogsitem); + RaisePropertyChanged(nameof(ColorCatalogsItem)); + } + + /// + /// Called when the Rml has changed. + /// + protected virtual void OnRmlChanged(Rml rml) + { + RmlChanged?.Invoke(this, rml); + RaisePropertyChanged(nameof(Rml)); + } + + /// + /// Initializes a new instance of the class. + /// + public ColorCatalogsItemsRecipeBase() : base() + { + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorSpaceBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorSpaceBase.cs index 2d32eb6a9..08a2b31fe 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/ColorSpaceBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorSpaceBase.cs @@ -31,14 +31,10 @@ namespace Tango.BL.Entities public event EventHandler DescriptionChanged; - public event EventHandler IsCatalogChanged; - public event EventHandler ThumbnailChanged; public event EventHandler> BrushStopsChanged; - public event EventHandler> ColorCatalogsChanged; - public event EventHandler> JobsChanged; public event EventHandler> MachinesChanged; @@ -124,33 +120,6 @@ namespace Tango.BL.Entities } } - protected Boolean _iscatalog; - - /// - /// Gets or sets the colorspacebase is catalog. - /// - - [Column("IS_CATALOG")] - - public Boolean IsCatalog - { - get - { - return _iscatalog; - } - - set - { - if (_iscatalog != value) - { - _iscatalog = value; - - OnIsCatalogChanged(value); - - } - } - } - protected Byte[] _thumbnail; /// @@ -203,31 +172,6 @@ namespace Tango.BL.Entities } } - protected SynchronizedObservableCollection _colorcatalogs; - - /// - /// Gets or sets the colorspacebase color catalogs. - /// - - public virtual SynchronizedObservableCollection ColorCatalogs - { - get - { - return _colorcatalogs; - } - - set - { - if (_colorcatalogs != value) - { - _colorcatalogs = value; - - OnColorCatalogsChanged(value); - - } - } - } - protected SynchronizedObservableCollection _jobs; /// @@ -305,15 +249,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(Description)); } - /// - /// Called when the IsCatalog has changed. - /// - protected virtual void OnIsCatalogChanged(Boolean iscatalog) - { - IsCatalogChanged?.Invoke(this, iscatalog); - RaisePropertyChanged(nameof(IsCatalog)); - } - /// /// Called when the Thumbnail has changed. /// @@ -332,15 +267,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(BrushStops)); } - /// - /// Called when the ColorCatalogs has changed. - /// - protected virtual void OnColorCatalogsChanged(SynchronizedObservableCollection colorcatalogs) - { - ColorCatalogsChanged?.Invoke(this, colorcatalogs); - RaisePropertyChanged(nameof(ColorCatalogs)); - } - /// /// Called when the Jobs has changed. /// @@ -367,8 +293,6 @@ namespace Tango.BL.Entities BrushStops = new SynchronizedObservableCollection(); - ColorCatalogs = new SynchronizedObservableCollection(); - Jobs = new SynchronizedObservableCollection(); Machines = new SynchronizedObservableCollection(); diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs index 91862b7c7..6ec36b87f 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs @@ -65,7 +65,7 @@ namespace Tango.BL.Entities public event EventHandler> CctsChanged; - public event EventHandler> ColorCatalogsChanged; + public event EventHandler> ColorCatalogsItemsRecipesChanged; public event EventHandler FiberShapeChanged; @@ -779,26 +779,26 @@ namespace Tango.BL.Entities } } - protected SynchronizedObservableCollection _colorcatalogs; + protected SynchronizedObservableCollection _colorcatalogsitemsrecipes; /// - /// Gets or sets the rmlbase color catalogs. + /// Gets or sets the rmlbase color catalogs items recipes. /// - public virtual SynchronizedObservableCollection ColorCatalogs + public virtual SynchronizedObservableCollection ColorCatalogsItemsRecipes { get { - return _colorcatalogs; + return _colorcatalogsitemsrecipes; } set { - if (_colorcatalogs != value) + if (_colorcatalogsitemsrecipes != value) { - _colorcatalogs = value; + _colorcatalogsitemsrecipes = value; - OnColorCatalogsChanged(value); + OnColorCatalogsItemsRecipesChanged(value); } } @@ -1277,12 +1277,12 @@ namespace Tango.BL.Entities } /// - /// Called when the ColorCatalogs has changed. + /// Called when the ColorCatalogsItemsRecipes has changed. /// - protected virtual void OnColorCatalogsChanged(SynchronizedObservableCollection colorcatalogs) + protected virtual void OnColorCatalogsItemsRecipesChanged(SynchronizedObservableCollection colorcatalogsitemsrecipes) { - ColorCatalogsChanged?.Invoke(this, colorcatalogs); - RaisePropertyChanged(nameof(ColorCatalogs)); + ColorCatalogsItemsRecipesChanged?.Invoke(this, colorcatalogsitemsrecipes); + RaisePropertyChanged(nameof(ColorCatalogsItemsRecipes)); } /// @@ -1385,7 +1385,7 @@ namespace Tango.BL.Entities Ccts = new SynchronizedObservableCollection(); - ColorCatalogs = new SynchronizedObservableCollection(); + ColorCatalogsItemsRecipes = new SynchronizedObservableCollection(); Jobs = new SynchronizedObservableCollection(); diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/ColorCatalogsItems.cs b/Software/Visual_Studio/Tango.BL/Enumerations/ColorCatalogsItems.cs new file mode 100644 index 000000000..9508218f9 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Enumerations/ColorCatalogsItems.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.ComponentModel; + +namespace Tango.BL.Enumerations +{ + public enum ColorCatalogsItems + { + } +} diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/ColorSpaces.cs b/Software/Visual_Studio/Tango.BL/Enumerations/ColorSpaces.cs index af626837e..d254475d9 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/ColorSpaces.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/ColorSpaces.cs @@ -44,16 +44,10 @@ namespace Tango.BL.Enumerations LAB = 3, /// - /// (Coats) + /// (Catalog) /// - [Description("Coats")] - Coats = 4, - - /// - /// (Twine Catalog) - /// - [Description("Twine Catalog")] - Twine = 5, + [Description("Catalog")] + Catalog = 4, } } diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs b/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs index 6a301bd3b..41fb57bad 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs @@ -133,12 +133,6 @@ namespace Tango.BL.Enumerations [Description("Allows running the ColorCapture module in Machine Studio")] RunColorCaptureModule = 24, - /// - /// (Allows loading the Catalogs module in Machine Studio) - /// - [Description("Allows loading the Catalogs module in Machine Studio")] - RunCatalogsModule = 25, - /// /// (Allows publishing of new PPC application versions.) /// diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs index 0ca9e8b34..9a7816eee 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs @@ -102,6 +102,30 @@ namespace Tango.BL get; set; } + /// + /// Gets or sets the ColorCatalogsGroups. + /// + public DbSet ColorCatalogsGroups + { + get; set; + } + + /// + /// Gets or sets the ColorCatalogsItems. + /// + public DbSet ColorCatalogsItems + { + get; set; + } + + /// + /// Gets or sets the ColorCatalogsItemsRecipes. + /// + public DbSet ColorCatalogsItemsRecipes + { + get; set; + } + /// /// Gets or sets the ColorSpaces. /// diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs index 5d087b245..90b4f0bc8 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs @@ -377,6 +377,114 @@ namespace Tango.BL } + private ObservableCollection _colorcatalogsgroups; + /// + /// Gets or sets the ColorCatalogsGroups. + /// + public ObservableCollection ColorCatalogsGroups + { + get + { + return _colorcatalogsgroups; + } + + set + { + _colorcatalogsgroups = value; RaisePropertyChanged(nameof(ColorCatalogsGroups)); + } + + } + + private ICollectionView _colorcatalogsgroupsViewSource; + /// + /// Gets or sets the ColorCatalogsGroups View Source. + /// + public ICollectionView ColorCatalogsGroupsViewSource + { + get + { + return _colorcatalogsgroupsViewSource; + } + + set + { + _colorcatalogsgroupsViewSource = value; RaisePropertyChanged(nameof(ColorCatalogsGroupsViewSource)); + } + + } + + private ObservableCollection _colorcatalogsitems; + /// + /// Gets or sets the ColorCatalogsItems. + /// + public ObservableCollection ColorCatalogsItems + { + get + { + return _colorcatalogsitems; + } + + set + { + _colorcatalogsitems = value; RaisePropertyChanged(nameof(ColorCatalogsItems)); + } + + } + + private ICollectionView _colorcatalogsitemsViewSource; + /// + /// Gets or sets the ColorCatalogsItems View Source. + /// + public ICollectionView ColorCatalogsItemsViewSource + { + get + { + return _colorcatalogsitemsViewSource; + } + + set + { + _colorcatalogsitemsViewSource = value; RaisePropertyChanged(nameof(ColorCatalogsItemsViewSource)); + } + + } + + private ObservableCollection _colorcatalogsitemsrecipes; + /// + /// Gets or sets the ColorCatalogsItemsRecipes. + /// + public ObservableCollection ColorCatalogsItemsRecipes + { + get + { + return _colorcatalogsitemsrecipes; + } + + set + { + _colorcatalogsitemsrecipes = value; RaisePropertyChanged(nameof(ColorCatalogsItemsRecipes)); + } + + } + + private ICollectionView _colorcatalogsitemsrecipesViewSource; + /// + /// Gets or sets the ColorCatalogsItemsRecipes View Source. + /// + public ICollectionView ColorCatalogsItemsRecipesViewSource + { + get + { + return _colorcatalogsitemsrecipesViewSource; + } + + set + { + _colorcatalogsitemsrecipesViewSource = value; RaisePropertyChanged(nameof(ColorCatalogsItemsRecipesViewSource)); + } + + } + private ObservableCollection _colorspaces; /// /// Gets or sets the ColorSpaces. @@ -2599,6 +2707,12 @@ namespace Tango.BL ColorCatalogsViewSource = CreateCollectionView(ColorCatalogs); + ColorCatalogsGroupsViewSource = CreateCollectionView(ColorCatalogsGroups); + + ColorCatalogsItemsViewSource = CreateCollectionView(ColorCatalogsItems); + + ColorCatalogsItemsRecipesViewSource = CreateCollectionView(ColorCatalogsItemsRecipes); + ColorSpacesViewSource = CreateCollectionView(ColorSpaces); ConfigurationsViewSource = CreateCollectionView(Configurations); diff --git a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs index d97e9d075..ae6aee8ba 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs @@ -377,6 +377,114 @@ namespace Tango.BL } + private ObservableCollection _colorcatalogsgroups; + /// + /// Gets or sets the ColorCatalogsGroups. + /// + public ObservableCollection ColorCatalogsGroups + { + get + { + return _colorcatalogsgroups; + } + + set + { + _colorcatalogsgroups = value; RaisePropertyChanged(nameof(ColorCatalogsGroups)); + } + + } + + private ICollectionView _colorcatalogsgroupsViewSource; + /// + /// Gets or sets the ColorCatalogsGroups View Source. + /// + public ICollectionView ColorCatalogsGroupsViewSource + { + get + { + return _colorcatalogsgroupsViewSource; + } + + set + { + _colorcatalogsgroupsViewSource = value; RaisePropertyChanged(nameof(ColorCatalogsGroupsViewSource)); + } + + } + + private ObservableCollection _colorcatalogsitems; + /// + /// Gets or sets the ColorCatalogsItems. + /// + public ObservableCollection ColorCatalogsItems + { + get + { + return _colorcatalogsitems; + } + + set + { + _colorcatalogsitems = value; RaisePropertyChanged(nameof(ColorCatalogsItems)); + } + + } + + private ICollectionView _colorcatalogsitemsViewSource; + /// + /// Gets or sets the ColorCatalogsItems View Source. + /// + public ICollectionView ColorCatalogsItemsViewSource + { + get + { + return _colorcatalogsitemsViewSource; + } + + set + { + _colorcatalogsitemsViewSource = value; RaisePropertyChanged(nameof(ColorCatalogsItemsViewSource)); + } + + } + + private ObservableCollection _colorcatalogsitemsrecipes; + /// + /// Gets or sets the ColorCatalogsItemsRecipes. + /// + public ObservableCollection ColorCatalogsItemsRecipes + { + get + { + return _colorcatalogsitemsrecipes; + } + + set + { + _colorcatalogsitemsrecipes = value; RaisePropertyChanged(nameof(ColorCatalogsItemsRecipes)); + } + + } + + private ICollectionView _colorcatalogsitemsrecipesViewSource; + /// + /// Gets or sets the ColorCatalogsItemsRecipes View Source. + /// + public ICollectionView ColorCatalogsItemsRecipesViewSource + { + get + { + return _colorcatalogsitemsrecipesViewSource; + } + + set + { + _colorcatalogsitemsrecipesViewSource = value; RaisePropertyChanged(nameof(ColorCatalogsItemsRecipesViewSource)); + } + + } + private ObservableCollection _colorspaces; /// /// Gets or sets the ColorSpaces. @@ -2599,6 +2707,12 @@ namespace Tango.BL ColorCatalogsViewSource = CreateCollectionView(ColorCatalogs); + ColorCatalogsGroupsViewSource = CreateCollectionView(ColorCatalogsGroups); + + ColorCatalogsItemsViewSource = CreateCollectionView(ColorCatalogsItems); + + ColorCatalogsItemsRecipesViewSource = CreateCollectionView(ColorCatalogsItemsRecipes); + ColorSpacesViewSource = CreateCollectionView(ColorSpaces); ConfigurationsViewSource = CreateCollectionView(Configurations); diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index be88ab930..4fc88f8e4 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -84,6 +84,7 @@ GlobalVersionInfo.cs + @@ -102,10 +103,6 @@ - - - - @@ -134,6 +131,12 @@ + + + + + + @@ -265,6 +268,12 @@ + + + + + + @@ -341,6 +350,7 @@ + @@ -548,7 +558,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.ColorConversion/DefaultColorConverter.cs b/Software/Visual_Studio/Tango.ColorConversion/DefaultColorConverter.cs index 0ea0d901f..cccdc5dca 100644 --- a/Software/Visual_Studio/Tango.ColorConversion/DefaultColorConverter.cs +++ b/Software/Visual_Studio/Tango.ColorConversion/DefaultColorConverter.cs @@ -82,16 +82,16 @@ namespace Tango.ColorConversion conversionInput.ColorSpace = (PMR.ColorLab.ColorSpace)stop.ColorSpace.Code; - if (stop.ColorSpace.IsCatalog) + if (stop.BrushColorSpace == ColorSpaces.Catalog) { conversionInput.ColorSpace = PMR.ColorLab.ColorSpace.Volume; - if (stop.ColorCatalog != null) + if (stop.ColorCatalogsItem != null) { - stop.SetVolume(LiquidTypes.Cyan, stop.ColorCatalog.Cyan); - stop.SetVolume(LiquidTypes.Magenta, stop.ColorCatalog.Magenta); - stop.SetVolume(LiquidTypes.Yellow, stop.ColorCatalog.Yellow); - stop.SetVolume(LiquidTypes.Black, stop.ColorCatalog.Black); + stop.SetVolume(LiquidTypes.Cyan, stop.ColorCatalogsItem.Cyan); + stop.SetVolume(LiquidTypes.Magenta, stop.ColorCatalogsItem.Magenta); + stop.SetVolume(LiquidTypes.Yellow, stop.ColorCatalogsItem.Yellow); + stop.SetVolume(LiquidTypes.Black, stop.ColorCatalogsItem.Black); } } @@ -226,9 +226,9 @@ namespace Tango.ColorConversion max_standard = standard_stops.Select(x => Convert(x)).Select(x => x.SingleCoordinates).Max(x => x.ProcessParametersTableIndex); } - if (color_catalog_stops.Where(x => x.ColorCatalog != null).Count() > 0) + if (color_catalog_stops.Where(x => x.ColorCatalogsItem != null).Count() > 0) { - max_catalog = color_catalog_stops.Where(x => x.ColorCatalog != null).Max(x => x.ColorCatalog.ProcessParametersTableIndex); + max_catalog = color_catalog_stops.Where(x => x.ColorCatalogsItem != null).Max(x => x.ColorCatalogsItem.ProcessParametersTableIndex); } int index = 0; diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/BRUSH_STOPS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/BRUSH_STOPS.cs index d06c0f5ad..5d528bd27 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/BRUSH_STOPS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/BRUSH_STOPS.cs @@ -48,9 +48,9 @@ namespace Tango.DAL.Remote.DB public double V7 { get; set; } public int V7_DIV { get; set; } public bool CORRECTED { get; set; } - public string COLOR_CATALOG_GUID { get; set; } + public string COLOR_CATALOGS_ITEM_GUID { get; set; } - public virtual COLOR_CATALOGS COLOR_CATALOGS { get; set; } + public virtual COLOR_CATALOGS_ITEMS COLOR_CATALOGS_ITEMS { get; set; } public virtual COLOR_SPACES COLOR_SPACES { get; set; } public virtual SEGMENT SEGMENT { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS.cs index 1a416d792..e7a14cdbc 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS.cs @@ -17,32 +17,15 @@ namespace Tango.DAL.Remote.DB [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public COLOR_CATALOGS() { - this.BRUSH_STOPS = new HashSet(); + this.COLOR_CATALOGS_GROUPS = new HashSet(); } public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public string RML_GUID { get; set; } - public string COLOR_SPACE_GUID { get; set; } - public int COLOR_CODE { get; set; } public string NAME { get; set; } - public string COLOR_GROUP { get; set; } - public double CYAN { get; set; } - public double MAGENTA { get; set; } - public double YELLOW { get; set; } - public double BLACK { get; set; } - public int RED { get; set; } - public int GREEN { get; set; } - public int BLUE { get; set; } - public double L { get; set; } - public double A { get; set; } - public double B { get; set; } - public int PROCESS_PARAMETERS_TABLE_INDEX { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection BRUSH_STOPS { get; set; } - public virtual COLOR_SPACES COLOR_SPACES { get; set; } - public virtual RML RML { get; set; } + public virtual ICollection COLOR_CATALOGS_GROUPS { get; set; } } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS_GROUPS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS_GROUPS.cs new file mode 100644 index 000000000..e5a7d2c6a --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS_GROUPS.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class COLOR_CATALOGS_GROUPS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public COLOR_CATALOGS_GROUPS() + { + this.COLOR_CATALOGS_ITEMS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + public string DESCRIPTION { get; set; } + public string COLOR_CATALOG_GUID { get; set; } + + public virtual COLOR_CATALOGS COLOR_CATALOGS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection COLOR_CATALOGS_ITEMS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS_ITEMS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS_ITEMS.cs new file mode 100644 index 000000000..6cdd50bf4 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS_ITEMS.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class COLOR_CATALOGS_ITEMS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public COLOR_CATALOGS_ITEMS() + { + this.BRUSH_STOPS = new HashSet(); + this.COLOR_CATALOGS_ITEMS_RECIPES = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string COLOR_CATALOGS_GROUP_GUID { get; set; } + public int CODE { get; set; } + public string NAME { get; set; } + public string DESCRIPTION { get; set; } + public double CYAN { get; set; } + public double MAGENTA { get; set; } + public double YELLOW { get; set; } + public double BLACK { get; set; } + public int RED { get; set; } + public int GREEN { get; set; } + public int BLUE { get; set; } + public double L { get; set; } + public double A { get; set; } + public double B { get; set; } + public int PROCESS_PARAMETERS_TABLE_INDEX { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection BRUSH_STOPS { get; set; } + public virtual COLOR_CATALOGS_GROUPS COLOR_CATALOGS_GROUPS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection COLOR_CATALOGS_ITEMS_RECIPES { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS_ITEMS_RECIPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS_ITEMS_RECIPES.cs new file mode 100644 index 000000000..babd070b6 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS_ITEMS_RECIPES.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class COLOR_CATALOGS_ITEMS_RECIPES + { + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string COLOR_CATALOGS_ITEM_GUID { get; set; } + public string RML_GUID { get; set; } + public double CYAN { get; set; } + public double MAGENTA { get; set; } + public double YELLOW { get; set; } + public double BLACK { get; set; } + public int RED { get; set; } + public int GREEN { get; set; } + public int BLUE { get; set; } + public double L { get; set; } + public double A { get; set; } + public double B { get; set; } + public int PROCESS_PARAMETERS_TABLE_INDEX { get; set; } + + public virtual COLOR_CATALOGS_ITEMS COLOR_CATALOGS_ITEMS { get; set; } + public virtual RML RML { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_SPACES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_SPACES.cs index 0a4683b20..d2a9c4479 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_SPACES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_SPACES.cs @@ -18,7 +18,6 @@ namespace Tango.DAL.Remote.DB public COLOR_SPACES() { this.BRUSH_STOPS = new HashSet(); - this.COLOR_CATALOGS = new HashSet(); this.JOBS = new HashSet(); this.MACHINES = new HashSet(); } @@ -29,14 +28,11 @@ namespace Tango.DAL.Remote.DB public int CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } - public bool IS_CATALOG { get; set; } public byte[] THUMBNAIL { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection BRUSH_STOPS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection COLOR_CATALOGS { get; set; } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection JOBS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection MACHINES { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs index 539978519..1270e7774 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs @@ -19,7 +19,7 @@ namespace Tango.DAL.Remote.DB { this.CATS = new HashSet(); this.CCTS = new HashSet(); - this.COLOR_CATALOGS = new HashSet(); + this.COLOR_CATALOGS_ITEMS_RECIPES = new HashSet(); this.JOBS = new HashSet(); this.LIQUID_TYPES_RMLS = new HashSet(); this.MACHINES = new HashSet(); @@ -59,7 +59,7 @@ namespace Tango.DAL.Remote.DB [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection CCTS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection COLOR_CATALOGS { get; set; } + public virtual ICollection COLOR_CATALOGS_ITEMS_RECIPES { get; set; } public virtual FIBER_SHAPES FIBER_SHAPES { get; set; } public virtual FIBER_SYNTHS FIBER_SYNTHS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs index 98c4a65ae..a1cc4d407 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs @@ -35,6 +35,9 @@ namespace Tango.DAL.Remote.DB public virtual DbSet CATS { get; set; } public virtual DbSet CCTS { get; set; } public virtual DbSet COLOR_CATALOGS { get; set; } + public virtual DbSet COLOR_CATALOGS_GROUPS { get; set; } + public virtual DbSet COLOR_CATALOGS_ITEMS { get; set; } + public virtual DbSet COLOR_CATALOGS_ITEMS_RECIPES { get; set; } public virtual DbSet COLOR_SPACES { get; set; } public virtual DbSet CONFIGURATIONS { get; set; } public virtual DbSet CONTACTS { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index 697acab25..82b591238 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -88,7 +88,7 @@ - + @@ -136,11 +136,51 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -163,7 +203,6 @@ - @@ -1047,15 +1086,15 @@ - - + + - + - + @@ -1141,28 +1180,58 @@ - - - + + + + + - + - - + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + - + - + @@ -2063,6 +2132,9 @@ + + + @@ -2125,8 +2197,8 @@ - - + + @@ -2153,13 +2225,21 @@ - - + + - + + + + + + + + + - + @@ -2453,6 +2533,9 @@ + + + @@ -2534,8 +2617,8 @@ - - + + @@ -2566,13 +2649,21 @@ - - + + + + + + - + + + + + - + @@ -2923,8 +3014,8 @@ - - + + @@ -2979,11 +3070,57 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2995,9 +3132,8 @@ - - - + + @@ -3009,10 +3145,8 @@ - - @@ -3782,7 +3916,7 @@ - + @@ -4087,15 +4221,15 @@ - - + + - + - + @@ -4193,28 +4327,58 @@ - - - + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + @@ -5098,7 +5262,7 @@ - + @@ -5181,6 +5345,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -5192,11 +5378,32 @@ - + - - + + + + + + + + + + + + + + + + + + + + + + + @@ -5207,7 +5414,6 @@ - diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index 24addbde8..8c28d9441 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,82 +5,85 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -88,8 +91,10 @@ - - + + + + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj index e2620f9ff..b6b4d18c8 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj +++ b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj @@ -93,6 +93,15 @@ RemoteADO.tt + + RemoteADO.tt + + + RemoteADO.tt + + + RemoteADO.tt + RemoteADO.tt @@ -344,7 +353,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Integration/Operation/DefaultGradientGenerationConfiguration.cs b/Software/Visual_Studio/Tango.Integration/Operation/DefaultGradientGenerationConfiguration.cs index 62ac43b40..c44114c94 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/DefaultGradientGenerationConfiguration.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/DefaultGradientGenerationConfiguration.cs @@ -120,7 +120,7 @@ namespace Tango.Integration.Operation stops.Add(s); } - else if (colorSpace == ColorSpaces.Volume || colorSpace == ColorSpaces.Twine || colorSpace == ColorSpaces.Coats) + else if (colorSpace == ColorSpaces.Volume || colorSpace == ColorSpaces.Catalog) { var cmyk = GetRelativeCMYK(segment.BrushStops.ToList(), offset); var stop = refStop.Clone(segment); diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 75a85bc4c..bfc31fc40 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -1217,13 +1217,13 @@ namespace Tango.Integration.Operation liquidVolume.Volume = outputLiquid.Volume; } } - else if (stop.BrushColorSpace == ColorSpaces.Twine || stop.BrushColorSpace == ColorSpaces.Coats) + else if (stop.BrushColorSpace == ColorSpaces.Catalog) { - if (stop.ColorCatalog != null) + if (stop.ColorCatalogsItem != null) { stop.SetLiquidVolumes(job.Machine.Configuration, job.Rml, processParameters); - if (stop.ColorCatalog.Cyan > 0) + if (stop.ColorCatalogsItem.Cyan > 0) { var liquidVolume = stop.LiquidVolumes.SingleOrDefault(x => x.IdsPack.LiquidType.Code == LiquidTypes.Cyan.ToInt32()); @@ -1232,10 +1232,10 @@ namespace Tango.Integration.Operation throw new NullReferenceException("Liquid volume not found for color conversion output liquid '" + LiquidTypes.Cyan + "'."); } - liquidVolume.Volume = stop.ColorCatalog.Cyan; + liquidVolume.Volume = stop.ColorCatalogsItem.Cyan; } - if (stop.ColorCatalog.Magenta > 0) + if (stop.ColorCatalogsItem.Magenta > 0) { var liquidVolume = stop.LiquidVolumes.SingleOrDefault(x => x.IdsPack.LiquidType.Code == LiquidTypes.Magenta.ToInt32()); @@ -1244,10 +1244,10 @@ namespace Tango.Integration.Operation throw new NullReferenceException("Liquid volume not found for color conversion output liquid '" + LiquidTypes.Magenta + "'."); } - liquidVolume.Volume = stop.ColorCatalog.Magenta; + liquidVolume.Volume = stop.ColorCatalogsItem.Magenta; } - if (stop.ColorCatalog.Yellow > 0) + if (stop.ColorCatalogsItem.Yellow > 0) { var liquidVolume = stop.LiquidVolumes.SingleOrDefault(x => x.IdsPack.LiquidType.Code == LiquidTypes.Yellow.ToInt32()); @@ -1256,10 +1256,10 @@ namespace Tango.Integration.Operation throw new NullReferenceException("Liquid volume not found for color conversion output liquid '" + LiquidTypes.Yellow + "'."); } - liquidVolume.Volume = stop.ColorCatalog.Yellow; + liquidVolume.Volume = stop.ColorCatalogsItem.Yellow; } - if (stop.ColorCatalog.Black > 0) + if (stop.ColorCatalogsItem.Black > 0) { var liquidVolume = stop.LiquidVolumes.SingleOrDefault(x => x.IdsPack.LiquidType.Code == LiquidTypes.Black.ToInt32()); @@ -1268,7 +1268,7 @@ namespace Tango.Integration.Operation throw new NullReferenceException("Liquid volume not found for color conversion output liquid '" + LiquidTypes.Black + "'."); } - liquidVolume.Volume = stop.ColorCatalog.Black; + liquidVolume.Volume = stop.ColorCatalogsItem.Black; } } else diff --git a/Software/Visual_Studio/Tango.PMR/ColorLab/ColorSpace.cs b/Software/Visual_Studio/Tango.PMR/ColorLab/ColorSpace.cs index 7ce723f02..80451dfd0 100644 --- a/Software/Visual_Studio/Tango.PMR/ColorLab/ColorSpace.cs +++ b/Software/Visual_Studio/Tango.PMR/ColorLab/ColorSpace.cs @@ -22,10 +22,10 @@ namespace Tango.PMR.ColorLab { static ColorSpaceReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChBDb2xvclNwYWNlLnByb3RvEhJUYW5nby5QTVIuQ29sb3JMYWIqSgoKQ29s", + "ChBDb2xvclNwYWNlLnByb3RvEhJUYW5nby5QTVIuQ29sb3JMYWIqQQoKQ29s", "b3JTcGFjZRIKCgZWb2x1bWUQABIHCgNSR0IQARIICgRDTVlLEAISBwoDTEFC", - "EAMSCQoFQ29hdHMQBBIJCgVUd2luZRAFQh4KHGNvbS50d2luZS50YW5nby5w", - "bXIuY29sb3JsYWJiBnByb3RvMw==")); + "EAMSCwoHQ2F0YWxvZxAEQh4KHGNvbS50d2luZS50YW5nby5wbXIuY29sb3Js", + "YWJiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.ColorLab.ColorSpace), }, null)); @@ -39,8 +39,7 @@ namespace Tango.PMR.ColorLab { [pbr::OriginalName("RGB")] Rgb = 1, [pbr::OriginalName("CMYK")] Cmyk = 2, [pbr::OriginalName("LAB")] Lab = 3, - [pbr::OriginalName("Coats")] Coats = 4, - [pbr::OriginalName("Twine")] Twine = 5, + [pbr::OriginalName("Catalog")] Catalog = 4, } #endregion diff --git a/Software/Visual_Studio/Tango.PMR/ColorLab/OutputCoordinates.cs b/Software/Visual_Studio/Tango.PMR/ColorLab/OutputCoordinates.cs index b43aa9f29..df409df30 100644 --- a/Software/Visual_Studio/Tango.PMR/ColorLab/OutputCoordinates.cs +++ b/Software/Visual_Studio/Tango.PMR/ColorLab/OutputCoordinates.cs @@ -23,15 +23,16 @@ namespace Tango.PMR.ColorLab { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChdPdXRwdXRDb29yZGluYXRlcy5wcm90bxISVGFuZ28uUE1SLkNvbG9yTGFi", - "GhJPdXRwdXRMaXF1aWQucHJvdG8imwEKEU91dHB1dENvb3JkaW5hdGVzEgsK", - "A1JlZBgBIAEoBRINCgVHcmVlbhgCIAEoBRIMCgRCbHVlGAMgASgFEjcKDU91", - "dHB1dExpcXVpZHMYBCADKAsyIC5UYW5nby5QTVIuQ29sb3JMYWIuT3V0cHV0", - "TGlxdWlkEiMKG1Byb2Nlc3NQYXJhbWV0ZXJzVGFibGVJbmRleBgFIAEoBUIe", - "Chxjb20udHdpbmUudGFuZ28ucG1yLmNvbG9ybGFiYgZwcm90bzM=")); + "GhJPdXRwdXRMaXF1aWQucHJvdG8ivAEKEU91dHB1dENvb3JkaW5hdGVzEgsK", + "A1JlZBgBIAEoBRINCgVHcmVlbhgCIAEoBRIMCgRCbHVlGAMgASgFEgkKAUwY", + "BiABKAESCQoBQRgHIAEoARIJCgFCGAggASgBEjcKDU91dHB1dExpcXVpZHMY", + "BCADKAsyIC5UYW5nby5QTVIuQ29sb3JMYWIuT3V0cHV0TGlxdWlkEiMKG1By", + "b2Nlc3NQYXJhbWV0ZXJzVGFibGVJbmRleBgFIAEoBUIeChxjb20udHdpbmUu", + "dGFuZ28ucG1yLmNvbG9ybGFiYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tango.PMR.ColorLab.OutputLiquidReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.ColorLab.OutputCoordinates), global::Tango.PMR.ColorLab.OutputCoordinates.Parser, new[]{ "Red", "Green", "Blue", "OutputLiquids", "ProcessParametersTableIndex" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.ColorLab.OutputCoordinates), global::Tango.PMR.ColorLab.OutputCoordinates.Parser, new[]{ "Red", "Green", "Blue", "L", "A", "B", "OutputLiquids", "ProcessParametersTableIndex" }, null, null, null) })); } #endregion @@ -65,6 +66,9 @@ namespace Tango.PMR.ColorLab { red_ = other.red_; green_ = other.green_; blue_ = other.blue_; + l_ = other.l_; + a_ = other.a_; + b_ = other.b_; outputLiquids_ = other.outputLiquids_.Clone(); processParametersTableIndex_ = other.processParametersTableIndex_; } @@ -107,6 +111,39 @@ namespace Tango.PMR.ColorLab { } } + /// Field number for the "L" field. + public const int LFieldNumber = 6; + private double l_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double L { + get { return l_; } + set { + l_ = value; + } + } + + /// Field number for the "A" field. + public const int AFieldNumber = 7; + private double a_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double A { + get { return a_; } + set { + a_ = value; + } + } + + /// Field number for the "B" field. + public const int BFieldNumber = 8; + private double b_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double B { + get { return b_; } + set { + b_ = value; + } + } + /// Field number for the "OutputLiquids" field. public const int OutputLiquidsFieldNumber = 4; private static readonly pb::FieldCodec _repeated_outputLiquids_codec @@ -144,6 +181,9 @@ namespace Tango.PMR.ColorLab { if (Red != other.Red) return false; if (Green != other.Green) return false; if (Blue != other.Blue) return false; + if (L != other.L) return false; + if (A != other.A) return false; + if (B != other.B) return false; if(!outputLiquids_.Equals(other.outputLiquids_)) return false; if (ProcessParametersTableIndex != other.ProcessParametersTableIndex) return false; return true; @@ -155,6 +195,9 @@ namespace Tango.PMR.ColorLab { if (Red != 0) hash ^= Red.GetHashCode(); if (Green != 0) hash ^= Green.GetHashCode(); if (Blue != 0) hash ^= Blue.GetHashCode(); + if (L != 0D) hash ^= L.GetHashCode(); + if (A != 0D) hash ^= A.GetHashCode(); + if (B != 0D) hash ^= B.GetHashCode(); hash ^= outputLiquids_.GetHashCode(); if (ProcessParametersTableIndex != 0) hash ^= ProcessParametersTableIndex.GetHashCode(); return hash; @@ -184,6 +227,18 @@ namespace Tango.PMR.ColorLab { output.WriteRawTag(40); output.WriteInt32(ProcessParametersTableIndex); } + if (L != 0D) { + output.WriteRawTag(49); + output.WriteDouble(L); + } + if (A != 0D) { + output.WriteRawTag(57); + output.WriteDouble(A); + } + if (B != 0D) { + output.WriteRawTag(65); + output.WriteDouble(B); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -198,6 +253,15 @@ namespace Tango.PMR.ColorLab { if (Blue != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Blue); } + if (L != 0D) { + size += 1 + 8; + } + if (A != 0D) { + size += 1 + 8; + } + if (B != 0D) { + size += 1 + 8; + } size += outputLiquids_.CalculateSize(_repeated_outputLiquids_codec); if (ProcessParametersTableIndex != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(ProcessParametersTableIndex); @@ -219,6 +283,15 @@ namespace Tango.PMR.ColorLab { if (other.Blue != 0) { Blue = other.Blue; } + if (other.L != 0D) { + L = other.L; + } + if (other.A != 0D) { + A = other.A; + } + if (other.B != 0D) { + B = other.B; + } outputLiquids_.Add(other.outputLiquids_); if (other.ProcessParametersTableIndex != 0) { ProcessParametersTableIndex = other.ProcessParametersTableIndex; @@ -253,6 +326,18 @@ namespace Tango.PMR.ColorLab { ProcessParametersTableIndex = input.ReadInt32(); break; } + case 49: { + L = input.ReadDouble(); + break; + } + case 57: { + A = input.ReadDouble(); + break; + } + case 65: { + B = input.ReadDouble(); + break; + } } } } diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/EventType.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/EventType.cs index 97f7cdad9..25e936fe0 100644 --- a/Software/Visual_Studio/Tango.PMR/Diagnostics/EventType.cs +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/EventType.cs @@ -294,11 +294,11 @@ namespace Tango.PMR.Diagnostics { /// [pbr::OriginalName("JOB_STATUS")] JobStatus = 1009, /// - ///A job has been been started (Group = Application, Category = Info) + ///A job has been started (Group = Application, Category = Info) /// [pbr::OriginalName("JOB_STARTED")] JobStarted = 1010, /// - ///A job has been been aborted (Group = Application, Category = Info) + ///A job has been aborted (Group = Application, Category = Info) /// [pbr::OriginalName("JOB_ABORTED")] JobAborted = 1011, /// diff --git a/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Program.cs b/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Program.cs index 884be8421..baf4e90f5 100644 --- a/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Program.cs +++ b/Software/Visual_Studio/Utilities/Tango.CatalogImporter/Program.cs @@ -37,41 +37,38 @@ namespace Tango.CatalogImporter var items = reader.GetDataByIndex("400ColorsCat", 2); reader.Dispose(); - Console.Write("Please enter the target RML name (press enter to target all): "); - String rml_name = Console.ReadLine(); + Console.Write("Please enter the catalog name: "); + String catalog_name = Console.ReadLine(); - if (!String.IsNullOrWhiteSpace(rml_name)) + if (!String.IsNullOrWhiteSpace(catalog_name)) { using (ObservablesContext db = ObservablesContext.CreateDefault(new Core.DataSource() { - Address = "twine.database.windows.net", - Catalog = "Tango_TEST", + Address = "localhost\\SQLEXPRESS", + Catalog = "Tango", Type = Core.DataSourceType.SQLServer, UserName = "Roy", Password = "Aa123456", - IntegratedSecurity = false, + IntegratedSecurity = true, })) { - var rml = db.Rmls.Single(x => x.Name == rml_name); - var twine_color_space_guid = db.ColorSpaces.Single(x => (ColorSpaces)x.Code == ColorSpaces.Twine).Guid; + ColorCatalog catalog = new ColorCatalog(); + catalog.Name = catalog_name; foreach (var group in items.GroupBy(x => x.Group)) { int nameCounter = 1; + ColorCatalogsGroup g = new ColorCatalogsGroup(); + g.Name = group.First().Group; + g.Description = g.Name; + catalog.ColorCatalogsGroups.Add(g); + foreach (var item in group) { - bool inserting = false; - - var catalogItem = db.ColorCatalogs.SingleOrDefault(x => x.RmlGuid == rml.Guid && x.ColorCode == item.Code && x.ColorSpaceGuid == twine_color_space_guid); - - if (catalogItem == null) - { - inserting = true; - catalogItem = new ColorCatalog(); - } + var catalogItem = new ColorCatalogsItem(); - catalogItem.ColorCode = item.Code; + catalogItem.Code = item.Code; catalogItem.Red = item.Red; catalogItem.Green = item.Green; @@ -87,24 +84,18 @@ namespace Tango.CatalogImporter catalogItem.B = item.B; catalogItem.ProcessParametersTableIndex = item.GamutRegion; - catalogItem.ColorSpaceGuid = twine_color_space_guid; - catalogItem.RmlGuid = rml.Guid; - catalogItem.ColorGroup = item.Group; catalogItem.Name = item.Group + nameCounter++; + catalogItem.Description = catalogItem.Name; - if (inserting) - { - db.ColorCatalogs.Add(catalogItem); - Console.WriteLine($"Added catalog item {catalogItem.Name}..."); - } - else - { - Console.WriteLine($"Updated catalog item {catalogItem.Name}..."); - } + g.ColorCatalogsItems.Add(catalogItem); + + Console.WriteLine($"Added catalog item {catalogItem.Name}..."); } } + db.ColorCatalogs.Add(catalog); + db.SaveChanges(); Console.WriteLine("Done"); -- cgit v1.3.1 From fe5c32241d8a976f0770dacb998380ab1cf70ce4 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 9 Jul 2019 16:56:19 +0300 Subject: Implemented MS color catalogs. --- Software/DB/PPC/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/PPC/Tango_log.ldf | Bin 53673984 -> 53673984 bytes Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 22675456 -> 22675456 bytes .../Tango.MachineStudio.Catalogs.csproj | 1 - .../ViewModels/CatalogVM.cs | 24 - .../ViewModels/MainViewVM.cs | 290 ++- .../Views/CatalogView.xaml | 208 +- .../Views/CatalogView.xaml.cs | 8 +- .../Views/CatalogsView.xaml | 20 +- .../Views/CatalogsView.xaml.cs | 4 +- .../Views/MainView.xaml | 2 +- .../Views/MainView.xaml.cs | 2 + .../Tango.BL/Builders/ColorCatalogBuilder.cs | 11 +- .../Tango.BL/DTO/ColorCatalogDTOBase.cs | 24 + .../Tango.BL/DTO/ColorCatalogsGroupDTOBase.cs | 8 - .../Tango.BL/DTO/ColorCatalogsItemDTOBase.cs | 8 - .../DTO/ColorCatalogsItemsRecipeDTOBase.cs | 48 - .../Tango.BL/Entities/ColorCatalog.cs | 18 +- .../Tango.BL/Entities/ColorCatalogBase.cs | 190 ++ .../Tango.BL/Entities/ColorCatalogsGroup.cs | 6 +- .../Tango.BL/Entities/ColorCatalogsGroupBase.cs | 38 - .../Tango.BL/Entities/ColorCatalogsItem.cs | 25 +- .../Tango.BL/Entities/ColorCatalogsItemBase.cs | 38 - .../Tango.BL/Entities/ColorCatalogsItemsRecipe.cs | 19 +- .../Entities/ColorCatalogsItemsRecipeBase.cs | 228 -- .../Tango.BL/Enumerations/CatalogDesignType.cs | 13 + .../Tango.BL/Enumerations/ColorCatalogsItems.cs | 2515 ++++++++++++++++++++ Software/Visual_Studio/Tango.BL/Tango.BL.csproj | 3 +- .../Tango.DAL.Remote/DB/COLOR_CATALOGS.cs | 5 + .../Tango.DAL.Remote/DB/COLOR_CATALOGS_GROUPS.cs | 1 - .../Tango.DAL.Remote/DB/COLOR_CATALOGS_ITEMS.cs | 1 - .../DB/COLOR_CATALOGS_ITEMS_RECIPES.cs | 6 - .../Tango.DAL.Remote/DB/RemoteADO.edmx | 39 +- .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 140 +- 35 files changed, 3404 insertions(+), 539 deletions(-) delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/CatalogVM.cs create mode 100644 Software/Visual_Studio/Tango.BL/Enumerations/CatalogDesignType.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs') diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf index 308f4a6bb..09bee49bd 100644 Binary files a/Software/DB/PPC/Tango.mdf and b/Software/DB/PPC/Tango.mdf differ diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf index f5a1953ef..44dd2e360 100644 Binary files a/Software/DB/PPC/Tango_log.ldf and b/Software/DB/PPC/Tango_log.ldf differ diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 86f399d14..dc977b21b 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index ccedb8cb8..02187322a 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Tango.MachineStudio.Catalogs.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Tango.MachineStudio.Catalogs.csproj index 1d29166be..e90e00b41 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Tango.MachineStudio.Catalogs.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Tango.MachineStudio.Catalogs.csproj @@ -69,7 +69,6 @@ - CatalogView.xaml diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/CatalogVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/CatalogVM.cs deleted file mode 100644 index 7d9c79ada..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/ViewModels/CatalogVM.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; -using Tango.Core; - -namespace Tango.MachineStudio.Catalogs.ViewModels -{ - public class CatalogVM : ExtendedObject - { - public ColorSpace ColorSpace { get; set; } - - public List SupportedMedia { get; set; } - - public int Colors { get; set; } - - public CatalogVM() - { - SupportedMedia = new List(); - } - } -} 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 6b1c82e0f..a10e944f9 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 @@ -1,17 +1,301 @@ using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.Entities; using Tango.MachineStudio.Common; +using System.Data.Entity; +using Tango.MachineStudio.Catalogs.Contracts; +using Tango.MachineStudio.Common.Notifications; +using Tango.Core.Commands; +using Tango.BL.Builders; namespace Tango.MachineStudio.Catalogs.ViewModels { - public class MainViewVM : StudioViewModel + public class MainViewVM : StudioViewModel { - public override void OnApplicationReady() + private ObservablesContext _catalogsContext; + private ObservablesContext _activeCatalogContext; + private INotificationProvider _notification; + + #region Properties + + private ObservableCollection _catalogs; + /// + /// Gets or sets the catalogs. + /// + public ObservableCollection Catalogs + { + get { return _catalogs; } + set { _catalogs = value; RaisePropertyChangedAuto(); } + } + + private ColorCatalog _selectedCatalog; + /// + /// Gets or sets the selected catalog. + /// + public ColorCatalog SelectedCatalog + { + get { return _selectedCatalog; } + set { _selectedCatalog = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } + } + + private ColorCatalog _activeCatalog; + /// + /// Gets or sets the active catalog. + /// + public ColorCatalog ActiveCatalog + { + get { return _activeCatalog; } + set { _activeCatalog = value; RaisePropertyChangedAuto(); } + } + + private ColorCatalogsGroup _selectedGroup; + /// + /// Gets or sets the selected group. + /// + public ColorCatalogsGroup SelectedGroup + { + get { return _selectedGroup; } + set { _selectedGroup = value; RaisePropertyChangedAuto(); } + } + + private ColorCatalogsItem _selectedItem; + /// + /// Gets or sets the selected item. + /// + public ColorCatalogsItem SelectedItem + { + get { return _selectedItem; } + set { _selectedItem = value; RaisePropertyChangedAuto(); } + } + + private List _rmls; + /// + /// Gets or sets the RMLS. + /// + public List RMLS + { + get { return _rmls; } + set { _rmls = value; RaisePropertyChangedAuto(); } + } + + #endregion + + #region Commands + + /// + /// Gets or sets the new catalog command. + /// + public RelayCommand NewCatalogCommand { get; set; } + + /// + /// Gets or sets the delete catalog command. + /// + public RelayCommand DeleteCatalogCommand { get; set; } + + /// + /// Gets or sets the edit catalog command. + /// + public RelayCommand EditCatalogCommand { get; set; } + + /// + /// Gets or sets the back to catalogs command. + /// + public RelayCommand BackToCatalogsCommand { get; set; } + + /// + /// Gets or sets the save active catalog command. + /// + public RelayCommand SaveActiveCatalogCommand { get; set; } + + #endregion + + #region Constructors + + /// + /// Initializes a new instance of the class. + /// + public MainViewVM() + { + Catalogs = new ObservableCollection(); + _catalogsContext = ObservablesContext.CreateDefault(); + + EditCatalogCommand = new RelayCommand(EditSelectedCatalog, () => SelectedCatalog != null); + NewCatalogCommand = new RelayCommand(CreateNewCatalog); + DeleteCatalogCommand = new RelayCommand(DeleteSelectedCatalog, () => SelectedCatalog != null); + BackToCatalogsCommand = new RelayCommand(BackToCatalogs); + SaveActiveCatalogCommand = new RelayCommand(SaveActiveCatalog); + } + + /// + /// Initializes a new instance of the class. + /// + /// The notification provider. + public MainViewVM(INotificationProvider notificationProvider) : this() + { + _notification = notificationProvider; + } + + #endregion + + #region Edit / Delete / Create Catalog + + public async Task LoadCatalogs() + { + using (_notification.PushTaskItem("Loading color catalogs...")) + { + IsFree = false; + Catalogs = (await _catalogsContext.ColorCatalogs.Include(x => x.ColorCatalogsGroups.Select(g => g.ColorCatalogsItems)).ToListAsync()).ToSynchronizedObservableCollection(); + SelectedCatalog = null; + IsFree = true; + } + } + + public async void EditSelectedCatalog() + { + if (SelectedCatalog != null) + { + using (_notification.PushTaskItem("Loading selected catalog...")) + { + try + { + IsFree = false; + + if (_activeCatalogContext != null) + { + _activeCatalogContext.Dispose(); + } + + _activeCatalogContext = ObservablesContext.CreateDefault(); + + ActiveCatalog = await new ColorCatalogBuilder(_activeCatalogContext).Set(SelectedCatalog.Guid).WithGroups().WithItems().WithRecipes().BuildAsync(); + SelectedGroup = ActiveCatalog.ColorCatalogsGroups.FirstOrDefault(); + RMLS = await _activeCatalogContext.Rmls.ToListAsync(); + + if (SelectedGroup != null) + { + SelectedItem = SelectedGroup.ColorCatalogsItems.FirstOrDefault(); + } + + View.NavigateTo(CatalogsNavigationView.CatalogView); + } + catch (Exception ex) + { + _notification.ShowError($"An error occurred while trying to load the selected catalog.\n{ex.Message}"); + LogManager.Log(ex, $"Error loading selected catalog '{SelectedCatalog.Name}'."); + } + finally + { + IsFree = true; + } + } + } + } + + private async void DeleteSelectedCatalog() + { + if (SelectedCatalog != null) + { + if (_notification.ShowQuestion("Are you sure you want to delete the selected catalog ?")) + { + using (_notification.PushTaskItem("Deleting selected catalog...")) + { + try + { + IsFree = false; + await SelectedCatalog.DeleteCascadeAsync(_catalogsContext); + SelectedCatalog = null; + } + catch (Exception ex) + { + _notification.ShowError($"An error occurred while trying to delete the selected catalog.\n{ex.Message}"); + LogManager.Log(ex, $"Error deleting catalog {SelectedCatalog.Name}."); + } + finally + { + IsFree = true; + } + } + } + } + } + + private async void CreateNewCatalog() + { + String name = _notification.ShowTextInput("Please enter a catalog name", "Catalog name"); + if (!String.IsNullOrWhiteSpace(name)) + { + using (_notification.PushTaskItem("Generating catalog...")) + { + try + { + IsFree = false; + ColorCatalog newCatalog = new ColorCatalog(); + newCatalog.Name = name; + newCatalog.Description = name; + newCatalog.Company = "Twine"; + _catalogsContext.ColorCatalogs.Add(newCatalog); + await _catalogsContext.SaveChangesAsync(); + SelectedCatalog = newCatalog; + EditSelectedCatalog(); + } + catch (Exception ex) + { + _notification.ShowError($"An error occurred while trying to create the catalog.\n{ex.Message}"); + LogManager.Log(ex, $"Error creating new catalog."); + } + finally + { + IsFree = true; + } + } + } + } + + private async void SaveActiveCatalog() + { + if (ActiveCatalog != null) + { + using (_notification.PushTaskItem("Updating catalog...")) + { + try + { + IsFree = false; + await _activeCatalogContext.SaveChangesAsync(); + await LoadCatalogs(); + _notification.ShowInfo("Catalog updated successfully."); + } + catch (Exception ex) + { + _notification.ShowError($"An error occurred while trying to update the catalog.\n{ex.Message}"); + LogManager.Log(ex, $"Error updating catalog {ActiveCatalog.Name}."); + } + finally + { + IsFree = true; + } + } + } + } + + private void BackToCatalogs() + { + View.NavigateTo(CatalogsNavigationView.CatalogsView); + } + + #endregion + + #region Application Ready + + public async override void OnApplicationReady() { - + await LoadCatalogs(); } + + #endregion } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml index 17198b866..8dc6b5d02 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml @@ -1,14 +1,214 @@ - - - + d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" Foreground="#232323" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PROPERTIES + + + + + + + + + + + + + + + + + + + + + + + + DESIGN CONTENT + + + + + + + + + + + + + + + + + + + + + + CATALOG GROUPS + + + + + + + + + + + + + + + + + + + + + + + + + GROUP COLORS + () + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + COLOR MEDIA RECIPES + () + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml.cs index 02418b677..ad44d4c18 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogView.xaml.cs @@ -12,17 +12,21 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using Tango.MachineStudio.Catalogs.ViewModels; namespace Tango.MachineStudio.Catalogs.Views { /// /// Interaction logic for CatalogsView.xaml /// - public partial class CatalogsView : UserControl + public partial class CatalogView : UserControl { - public CatalogsView() + private MainViewVM _vm; + + public CatalogView() { InitializeComponent(); + Loaded += (_, __) => _vm = DataContext as MainViewVM; } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml index e324fb8d7..dca9c0e96 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Catalogs/Views/CatalogsView.xaml @@ -1,4 +1,4 @@ - - + - - - @@ -94,19 +94,19 @@ - - - @@ -495,7 +495,7 @@ - + @@ -512,7 +512,7 @@ @@ -553,7 +553,7 @@ - + @@ -563,7 +563,7 @@ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml index d0f0c2af6..3073d0b62 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml @@ -84,7 +84,7 @@ - + @@ -110,7 +110,7 @@ - + @@ -174,11 +174,11 @@ - + - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml index 121e6e45c..71ce6f173 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml @@ -420,7 +420,7 @@ - - + @@ -303,7 +303,7 @@ - + @@ -318,7 +318,7 @@ - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml index bac93bff3..e6a18ddde 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml @@ -9,7 +9,7 @@ xmlns:local="clr-namespace:Tango.MachineStudio.Stubs.Views" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="#202020" Foreground="Gainsboro" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource DarkGrayBrush}" Foreground="Gainsboro" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/BlowerElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/BlowerElementEditor.xaml index 228424e80..524dd79c5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/BlowerElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/BlowerElementEditor.xaml @@ -56,7 +56,7 @@ - + @@ -72,7 +72,7 @@ @@ -102,7 +102,7 @@ - + @@ -170,10 +170,10 @@ - - + + - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml index 4b7e2ea2c..190b4d3c8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/HeaterElementEditor.xaml @@ -48,7 +48,7 @@ - + @@ -75,7 +75,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/JobRunnerElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/JobRunnerElementEditor.xaml index 76a6a16a7..5165e9819 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/JobRunnerElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/JobRunnerElementEditor.xaml @@ -43,9 +43,9 @@ - + - + @@ -74,7 +74,7 @@ - + / m @@ -135,7 +135,7 @@ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml index 65f25f131..645f98331 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorRecorderElementEditor.xaml @@ -38,7 +38,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml index ecfea2f28..7c3728d1e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorElementEditor.xaml @@ -24,7 +24,7 @@ @@ -86,9 +86,9 @@ - + - + @@ -154,10 +154,10 @@ - - + + - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorGroupElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorGroupElementEditor.xaml index ac07f1390..a209270e7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorGroupElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MotorGroupElementEditor.xaml @@ -24,7 +24,7 @@ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ProcessParametersElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ProcessParametersElementEditor.xaml index f057521e0..3c4373097 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ProcessParametersElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ProcessParametersElementEditor.xaml @@ -38,7 +38,7 @@ - + @@ -45,7 +45,7 @@ - + @@ -68,10 +68,10 @@ - - + + - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ValveElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ValveElementEditor.xaml index 2304469e0..59b9fa2af 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ValveElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/ValveElementEditor.xaml @@ -46,7 +46,7 @@ - + @@ -90,7 +90,7 @@ - - diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml index 692b3f818..7f135efbc 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml @@ -33,19 +33,19 @@ - - + - diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml index d90d03545..03c6649d6 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml @@ -57,9 +57,11 @@ + + - - + + + @@ -206,13 +208,13 @@ 12 9 - + + --> - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs new file mode 100644 index 000000000..6b1a86741 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +namespace Tango.MachineStudio.Common.Resources +{ +/// +/// The shared resource dictionary is a specialized resource dictionary +/// that loads it content only once. If a second instance with the same source +/// is created, it only merges the resources from the cache. +/// + public class SharedResourceDictionary : ResourceDictionary + { + /// + /// Internal cache of loaded dictionaries + /// + public static Dictionary _sharedDictionaries = + new Dictionary(); + + /// + /// Local member of the source uri + /// + private Uri _sourceUri; + + /// + /// Gets or sets the uniform resource identifier (URI) to load resources from. + /// + public new Uri Source + { + get { return _sourceUri; } + set + { + _sourceUri = value; + + if (!_sharedDictionaries.ContainsKey(value)) + { + // If the dictionary is not yet loaded, load it by setting + // the source of the base class + base.Source = value; + + // add it to the cache + _sharedDictionaries.Add(value, this); + } + else + { + // If the dictionary is already loaded, get it from the cache + MergedDictionaries.Add(_sharedDictionaries[value]); + } + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index 897c4f72d..c368a499c 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -93,6 +93,7 @@ + @@ -189,6 +190,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml index 79245745e..6f7cd0e32 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml @@ -63,7 +63,7 @@ - - + + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml index 6c55f6c5e..810114144 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml @@ -8,7 +8,8 @@ xmlns:views="clr-namespace:Tango.MachineStudio.UI.Views" xmlns:sharedControls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" mc:Ignorable="d" - Title="Tango" Height="800" Width="1280" Foreground="#494949" BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}"> + Title="Tango" Height="800" Width="1280" Foreground="{StaticResource MainWindow.Foreground}" + BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}" Background="{DynamicResource MainWindow.Background}"> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml index 338cb2d22..6c0a42ed1 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml @@ -225,8 +225,8 @@ - - + + @@ -103,8 +103,8 @@ Firmware Upgrade Failed - - + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml index f66e247a9..57b8335c5 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml @@ -248,11 +248,11 @@ - + @@ -517,7 +518,7 @@ - + @@ -525,7 +526,7 @@ - + @@ -576,11 +577,11 @@ - + - + @@ -605,7 +606,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml index 5f5e1042b..a209df34a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml @@ -140,12 +140,12 @@ - + - * + * diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml index 97c42d58d..d1ff75fc7 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml @@ -42,7 +42,7 @@ - - diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml index 8721cfd6a..d53cb934e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Windows/ModuleWindow.xaml @@ -51,6 +51,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml index a16b6b4d2..f4fa039dc 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml @@ -50,7 +50,7 @@ + @@ -294,7 +300,7 @@ - + , @@ -453,7 +459,7 @@ - + COMPOSITE @@ -510,7 +516,7 @@ - + @@ -518,7 +524,7 @@ - + @@ -526,7 +532,7 @@ - + @@ -537,7 +543,7 @@ - + CALIBRATION DATA diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml index e338f3c0f..402740f82 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml @@ -7,7 +7,7 @@ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.AddressesViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.AddressesViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml index 704f5f5e2..bc1e948b0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml @@ -7,7 +7,7 @@ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.ApplicationDisplayPanelVersionsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.ApplicationDisplayPanelVersionsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml index a216f4a1f..8fb4976c7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml @@ -7,7 +7,7 @@ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.ApplicationFirmwareVersionsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.ApplicationFirmwareVersionsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml index f53c182c3..fdbcdabc4 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml @@ -7,7 +7,7 @@ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.ApplicationOsVersionsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.ApplicationOsVersionsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml index d17f79c8d..b77c31aed 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.CartridgeTypesViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.CartridgeTypesViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CatsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CatsView.xaml index 6eb693780..1a4cf673a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CatsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CatsView.xaml @@ -9,7 +9,7 @@ xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.CatsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.CatsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CctsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CctsView.xaml index 09962447c..6b80b94fe 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CctsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CctsView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.MachineStudio.DB.Converters" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.CctsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.CctsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml index 819dbd1c7..45bb2e776 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml @@ -7,7 +7,7 @@ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.ConfigurationsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.ConfigurationsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ContactsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ContactsView.xaml index e05808d83..e54a72a4c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ContactsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ContactsView.xaml @@ -7,7 +7,7 @@ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.ContactsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.ContactsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml index 040ac5799..12bc16f1e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.DispenserTypesViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.DispenserTypesViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml index 219230d32..0ff1f8a6b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml @@ -7,7 +7,7 @@ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.EmbeddedFirmwareVersionsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.EmbeddedFirmwareVersionsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/FiberShapesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/FiberShapesView.xaml index f46b5894e..2a22bf929 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/FiberShapesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/FiberShapesView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.FiberShapesViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.FiberShapesViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/FiberSynthsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/FiberSynthsView.xaml index bec19add1..28b7a7b1b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/FiberSynthsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/FiberSynthsView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.FiberSynthsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.FiberSynthsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareDancerTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareDancerTypesView.xaml index 93859e74d..c4b8026c6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareDancerTypesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareDancerTypesView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.HardwareDancerTypesViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.HardwareDancerTypesViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypesView.xaml index 49f7c9232..52af91e8a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareMotorTypesView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.HardwareMotorTypesViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.HardwareMotorTypesViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwarePidControlTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwarePidControlTypesView.xaml index 16ae138dc..01f9a444c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwarePidControlTypesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwarePidControlTypesView.xaml @@ -9,7 +9,7 @@ xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" d:DataContext="{d:DesignInstance Type=observables:HardwarePidControlType, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.HardwarePidControlTypesViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" d:DataContext="{d:DesignInstance Type=observables:HardwarePidControlType, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.HardwarePidControlTypesViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml index 4a60ffcaa..ea6f97171 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml @@ -7,7 +7,7 @@ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.HardwareVersionsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.HardwareVersionsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulasView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulasView.xaml index 81c9124f3..cc9889d6e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulasView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackFormulasView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.IdsPackFormulasViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.IdsPackFormulasViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml index 03ab1d7d4..2ba826a12 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.IdsPacksViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.IdsPacksViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LinearMassDensityUnitsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LinearMassDensityUnitsView.xaml index 41d719dad..d25f4eace 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LinearMassDensityUnitsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LinearMassDensityUnitsView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.LinearMassDensityUnitsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.LinearMassDensityUnitsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlsView.xaml index 11f781e5b..2bfa395c8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesRmlsView.xaml @@ -8,7 +8,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.LiquidTypesRmlViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.LiquidTypesRmlViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesView.xaml index 4da0a8b59..90040469e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidTypesView.xaml @@ -9,7 +9,7 @@ xmlns:localConverters="clr-namespace:Tango.MachineStudio.DB.Converters" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.LiquidTypesViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.LiquidTypesViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml index be917634a..370171855 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml @@ -7,7 +7,7 @@ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.MachineVersionsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.MachineVersionsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml index c6febd63c..90b24af9a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml @@ -7,7 +7,7 @@ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.MachinesViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.MachinesViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaConditionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaConditionsView.xaml index 08f144710..36d441b0e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaConditionsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaConditionsView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.MediaConditionsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.MediaConditionsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaMaterialsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaMaterialsView.xaml index 7530cf9df..7eae23499 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaMaterialsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaMaterialsView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.MediaMaterialsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.MediaMaterialsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaPurposesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaPurposesView.xaml index ee4903f69..ab1c844ea 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaPurposesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaPurposesView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.MediaPurposesViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.MediaPurposesViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypesView.xaml index a808b8438..ba027b8ba 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MidTankTypesView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.MidTankTypesViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.MidTankTypesViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationsView.xaml index ff5e7df4a..4ec9f43c9 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/OrganizationsView.xaml @@ -8,7 +8,7 @@ xmlns:system="clr-namespace:System;assembly=mscorlib" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.OrganizationsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.OrganizationsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml index 9455fd519..ad8815eeb 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml @@ -7,7 +7,7 @@ xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.PermissionsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.PermissionsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml index 0eee2aa77..68f641e44 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml @@ -9,7 +9,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.ProcessParametersTablesGroupsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.ProcessParametersTablesGroupsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml index 0e20ce5af..dedf23a54 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml @@ -9,7 +9,7 @@ xmlns:localConverters="clr-namespace:Tango.MachineStudio.DB.Converters" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.ProcessParametersTablesViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.ProcessParametersTablesViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsView.xaml index 8cd51ccac..bffe4e3c1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsView.xaml @@ -8,7 +8,7 @@ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.RmlsViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.RmlsViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml index 858cfd37b..77da90df7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml @@ -7,7 +7,7 @@ xmlns:converters="clr-namespace:Tango.MachineStudio.DB.Converters" xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.RolesViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.RolesViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/SpoolTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/SpoolTypesView.xaml index 4ed13cb11..438e80e03 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/SpoolTypesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/SpoolTypesView.xaml @@ -8,7 +8,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.SpoolTypesViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.SpoolTypesViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml index ad3814185..6d4cf4d23 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml @@ -8,7 +8,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.UsersViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}" DataContext="{x:Static global:ViewModelLocator.UsersViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/MainView.xaml index 7fc9034cd..de4acd68f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/MainView.xaml @@ -14,7 +14,7 @@ xmlns:global="clr-namespace:Tango.MachineStudio.DataCapture" xmlns:local="clr-namespace:Tango.MachineStudio.DataCapture.Views" mc:Ignorable="d" - d:DesignHeight="1080" d:DesignWidth="1920" Background="White" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + d:DesignHeight="1080" d:DesignWidth="1920" Background="{StaticResource MainWindow.Background}" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> @@ -36,10 +36,10 @@ - RECORDINGS + RECORDINGS - + @@ -69,7 +69,7 @@ - + @@ -177,7 +177,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index b90aa62b8..54a3b72a9 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -85,7 +85,7 @@ - + @@ -188,7 +188,7 @@ - + @@ -519,24 +519,13 @@ + @@ -617,7 +611,7 @@ Name - + @@ -649,8 +643,8 @@ - - + + @@ -700,7 +694,7 @@ Description - + @@ -818,7 +812,7 @@ - + @@ -835,7 +829,7 @@ @@ -850,19 +844,19 @@ @@ -896,6 +890,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - + + + + + + - + - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml index 97eceaa7d..b13ffb87b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/ConfigurationView.xaml @@ -109,7 +109,7 @@ - Hardware Version + Hardware Version @@ -284,7 +284,7 @@ - + @@ -337,7 +337,7 @@ - + @@ -346,7 +346,7 @@ - + @@ -354,7 +354,7 @@ - + @@ -367,9 +367,9 @@ - IDS PACKS + IDS PACKS - + @@ -404,7 +404,7 @@ - + @@ -442,7 +442,7 @@ - + @@ -465,11 +465,11 @@ - + - + @@ -495,7 +495,7 @@ - + @@ -517,8 +517,8 @@ - - v + + v @@ -527,7 +527,7 @@ - + @@ -549,11 +549,11 @@ - + - + @@ -575,12 +575,12 @@ - - v + + v - + @@ -602,12 +602,12 @@ - - v + + v - + @@ -629,12 +629,12 @@ - - v + + v - + @@ -656,12 +656,12 @@ - - v + + v - + @@ -683,12 +683,12 @@ - - v + + v - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml index 8c9fe7179..6a8b7c9b0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml @@ -27,7 +27,7 @@ - + @@ -42,19 +42,19 @@ Machine Version - + Organization - + Default RML - + Loaded RML - + Default Color Space - + Default Segment Length @@ -68,7 +68,7 @@ Device COM Port - + Auto Login diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml index 41dc0554c..466e6f458 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachinesView.xaml @@ -60,7 +60,7 @@ - + + @@ -67,24 +76,32 @@ - + - + + + + - + - + - + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml index e6a18ddde..a8daa4540 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/Views/MainView.xaml @@ -9,7 +9,7 @@ xmlns:local="clr-namespace:Tango.MachineStudio.Stubs.Views" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource DarkGrayBrush}" Foreground="Gainsboro" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource DarkGrayBrush}" Foreground="{StaticResource BorderBrushGainsboro}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/JobRunnerTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/JobRunnerTemplate.xaml index b6bfefd8c..1936a90d2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/JobRunnerTemplate.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/JobRunnerTemplate.xaml @@ -52,7 +52,7 @@ Length - + Winding Method @@ -64,10 +64,10 @@ Inter Segment Length - + Number of Units - + Enable Lubrication diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml index 7da979a00..82052f02f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml @@ -49,11 +49,11 @@ Minimum - + Maximum - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml index 3830ecc3e..037ae0693 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml @@ -49,11 +49,11 @@ Minimum - + Maximum - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/ImportProjectTabView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/ImportProjectTabView.xaml index 1cb7876cf..5eb72e65b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/ImportProjectTabView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/ImportProjectTabView.xaml @@ -26,7 +26,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml index 2d180a8a2..63d22d365 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml @@ -77,40 +77,40 @@ - + - + - + - + - + - + - + - + @@ -140,105 +140,105 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -464,11 +464,11 @@ Left - + Top - + @@ -476,11 +476,11 @@ Width - + Height - + @@ -491,7 +491,7 @@ Angle - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml index f8045d7a6..d5a5d41d7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml @@ -28,7 +28,7 @@ - + @@ -39,7 +39,7 @@ ADDRESS - + @@ -51,7 +51,7 @@ CONTACT - + @@ -107,7 +107,7 @@ - + - - - - - - @@ -162,7 +156,7 @@ - + @@ -175,14 +169,18 @@ - + - + - + @@ -190,13 +188,7 @@ - - - - - - - + @@ -205,8 +197,11 @@ - - + + @@ -217,13 +212,7 @@ - - - - - - - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml index 7f135efbc..cd218f663 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml @@ -39,7 +39,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineView.xaml index 6f352f35c..013dca6ce 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineView.xaml @@ -39,7 +39,7 @@ - + @@ -174,7 +174,7 @@ - NO IDS PACKS + NO IDS PACKS @@ -195,7 +195,7 @@ - + @@ -238,7 +238,7 @@ - + @@ -247,7 +247,7 @@ - + @@ -255,7 +255,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs index 0433ff7be..2920c8dd9 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs @@ -135,6 +135,11 @@ namespace Tango.MachineStudio.Common return DeploymentSlot.ToAddress(); } + /// + /// Gets or sets the working theme. + /// + public MachineStudioTheme Theme { get; set; } + /// /// Initializes a new instance of the class. /// @@ -149,6 +154,7 @@ namespace Tango.MachineStudio.Common JobUploadStrategy = JobUploadStrategy.JobDescriptionFile; MaximumCacheTime = TimeSpan.FromMinutes(5); CachingMode = ObservablesContextInMemoryCachingMode.None; + Theme = MachineStudioTheme.Light; } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioTheme.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioTheme.cs new file mode 100644 index 000000000..16dda143b --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioTheme.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.MachineStudio.Common +{ + public enum MachineStudioTheme + { + Light, + Dark + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml index 03c6649d6..0bf472a2e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml @@ -24,11 +24,12 @@ - - - - + + @@ -139,9 +140,9 @@ AllowsTransparency="True" PopupAnimation="Slide" Focusable="False"> - @@ -286,7 +287,7 @@ - + @@ -477,7 +478,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs index 6b1a86741..d422df26c 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; +using Tango.Settings; namespace Tango.MachineStudio.Common.Resources { @@ -34,6 +35,11 @@ namespace Tango.MachineStudio.Common.Resources set { _sourceUri = value; + var settings = SettingsManager.Default.GetOrCreate(); + //add current theme + MachineStudioTheme wTheme = settings.Theme; + if ((wTheme == MachineStudioTheme.Dark && value.LocalPath.Contains("Light")) || (wTheme == MachineStudioTheme.Light && value.LocalPath.Contains("Dark"))) + return; if (!_sharedDictionaries.ContainsKey(value)) { diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index c368a499c..62f2dc984 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -93,6 +93,7 @@ + @@ -186,6 +187,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + MSBuild:Compile Designer diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/DarkThemeColors.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/DarkThemeColors.xaml new file mode 100644 index 000000000..ad8f0f09b --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/DarkThemeColors.xaml @@ -0,0 +1,301 @@ + + + + + + + + + 0.7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #5C5C5C + #5C5C5C + #5C5C5C + #FF03A9F4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/LightThemeColors.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/LightThemeColors.xaml index 90b3b0829..25f72f8d4 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/LightThemeColors.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/LightThemeColors.xaml @@ -1,9 +1,14 @@  + xmlns:local="clr-namespace:Tango.MachineStudio.Common.Themes" + xmlns:system="clr-namespace:System;assembly=mscorlib"> + + + - + 1 + @@ -44,9 +49,7 @@ - - - + @@ -73,6 +76,13 @@ + + + + + + + @@ -87,26 +97,49 @@ - - + - + + + + - + - + + + - - - + + + + + + + + + + + + + + + - + + + + + + + + @@ -153,6 +186,34 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml index 11ab79afd..618035112 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml @@ -12,6 +12,7 @@ + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs index 2e2b1a014..edcc4ba39 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs @@ -64,12 +64,14 @@ namespace Tango.MachineStudio.UI LogManager.Log("Application Started..."); LogManager.LogReferencedAssemblies(); + var settings = SettingsManager.Default.GetOrCreate(); + //add current theme + MachineStudioTheme wTheme = settings.Theme; base.OnStartup(e); LogManager.Categories.Clear(); - var settings = SettingsManager.Default.GetOrCreate(); if (settings.LoggingCategories.Count == 0) { @@ -104,7 +106,9 @@ namespace Tango.MachineStudio.UI { LogManager.Log("EF Caching is disabled"); } + } + #region Global Exception Trapping diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml index 810114144..eecbcf8ad 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml @@ -9,7 +9,7 @@ xmlns:sharedControls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" mc:Ignorable="d" Title="Tango" Height="800" Width="1280" Foreground="{StaticResource MainWindow.Foreground}" - BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}" Background="{DynamicResource MainWindow.Background}"> + BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}" Background="{DynamicResource MainWindow.Background}" WindowTitleBrush="{StaticResource MainWindow.WindowTitleColorBrush}"> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml index 2eb1080cb..41405f7fb 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml @@ -10,7 +10,7 @@ Title="Machine Studio" MinHeight="220" SizeToContent="WidthAndHeight" MinWidth="600" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterOwner" Background="Transparent" ShowInTaskbar="False"> - + @@ -18,7 +18,7 @@ - diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml index 8f9512236..e037e3630 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml @@ -15,7 +15,7 @@ - + @@ -30,8 +30,8 @@ - - + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml index 5e27071ec..5cc3d719b 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml @@ -15,7 +15,7 @@ - + @@ -32,10 +32,10 @@ - + - + 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 b2faf346e..31ba4e57d 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -5,6 +5,7 @@ using System.IO; using System.Linq; using System.Reflection; using System.Text; +using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using System.Windows; @@ -174,6 +175,11 @@ namespace Tango.MachineStudio.UI.ViewModels /// public RelayCommand AboutCommand { get; set; } + /// + /// Gets or sets the about command. + /// + public RelayCommand ChangeAppThemeCommand { get; set; } + private IAuthenticationProvider _authenticationProvider; /// /// Gets or sets the authentication provider. @@ -336,6 +342,8 @@ namespace Tango.MachineStudio.UI.ViewModels TangoMessenger.Default.Register((x) => DisableCheckForUpdates = true); AboutCommand = new RelayCommand(ShowAboutDialog); + + ChangeAppThemeCommand = new RelayCommand(ChangeTheme); } private void MachineEventsStateProvider_EventsResolved(object sender, IEnumerable e) @@ -926,5 +934,15 @@ namespace Tango.MachineStudio.UI.ViewModels IsApplicationReady = true; } } + + private void ChangeTheme(MachineStudioTheme theme) + { + var settings = SettingsManager.Default.GetOrCreate(); + //add current theme + settings.Theme = theme; + settings.Save(); + + _notificationProvider.ShowInfo("Changes will be applies after application restart."); + } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml index bf9a52b98..a5ffe9964 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml @@ -10,7 +10,7 @@ xmlns:bl="clr-namespace:Tango.BL;assembly=Tango.BL" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" - d:DesignHeight="300" d:DesignWidth="300" Width="600" Height="700" Background="White" d:DataContext="{d:DesignInstance Type=vm:AboutViewVM, IsDesignTimeCreatable=False}" DataContext="{Binding AboutViewVM, Source={StaticResource Locator}}"> + d:DesignHeight="300" d:DesignWidth="300" Width="600" Height="700" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:AboutViewVM, IsDesignTimeCreatable=False}" DataContext="{Binding AboutViewVM, Source={StaticResource Locator}}" Foreground="{StaticResource MainWindow.Foreground}"> @@ -61,23 +61,23 @@ Data Source: - () + () Caching Mode: - (Requires restart) + (Requires restart) Job Upload Strategy: - (Requires restart) + (Requires restart) Change Log: - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml index 8dfb04f1f..1734a9c94 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml @@ -12,7 +12,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" - d:DesignHeight="300" d:DesignWidth="300" Width="640" Height="500" Background="White" DataContext="{Binding ConnectedMachineViewVM, Source={StaticResource Locator}}"> + d:DesignHeight="300" d:DesignWidth="300" Width="640" Height="500" Background="{StaticResource Dialog.Background}" DataContext="{Binding ConnectedMachineViewVM, Source={StaticResource Locator}}" Foreground="{StaticResource MainWindow.Foreground}"> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectionLostView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectionLostView.xaml index ded02ab47..b2fa2b3e3 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectionLostView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectionLostView.xaml @@ -7,7 +7,7 @@ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" - Width="559" Height="266" Background="White" d:DataContext="{d:DesignInstance Type=vm:ConnectionLostViewVM, IsDesignTimeCreatable=False}"> + Width="559" Height="266" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:ConnectionLostViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource MainWindow.Foreground}"> @@ -43,7 +43,7 @@ Reason: - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml index 9af5c6b06..233f8e4cb 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/FirmwareUpgradeView.xaml @@ -9,7 +9,7 @@ xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" mc:Ignorable="d" - d:DesignHeight="300" d:DesignWidth="300" Width="800" Height="400" Background="White" d:DataContext="{d:DesignInstance Type=vm:FirmwareUpgradeViewVM, IsDesignTimeCreatable=False}"> + d:DesignHeight="300" d:DesignWidth="300" Width="800" Height="400" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:FirmwareUpgradeViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource MainWindow.Foreground}"> @@ -39,7 +39,7 @@ FIRMWARE UPGRADE - + @@ -61,7 +61,7 @@ - + @@ -86,7 +86,7 @@ Upgrading Machine Firmware - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml index 6e804c61d..df1c1b831 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml @@ -27,7 +27,7 @@ - + v diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml index d39b1226c..69ce4c855 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml @@ -10,7 +10,7 @@ xmlns:emulations="clr-namespace:Tango.Emulations.ExternalBridge;assembly=Tango.Emulations" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" - d:DesignHeight="300" d:DesignWidth="300" Width="630" Height="400" Background="White" DataContext="{Binding MachineConnectionViewVM, Source={StaticResource Locator}}"> + d:DesignHeight="300" d:DesignWidth="300" Width="630" Height="400" Background="{StaticResource Dialog.Background}" DataContext="{Binding MachineConnectionViewVM, Source={StaticResource Locator}}" Foreground="{StaticResource MainWindow.Foreground}"> @@ -53,7 +53,7 @@ - + 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 14967686f..7d0b2e25c 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml @@ -9,7 +9,7 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" - d:DesignHeight="200" d:DesignWidth="550" Background="White" DataContext="{Binding MachineLoginViewVM, Source={StaticResource Locator}}"> + d:DesignHeight="200" d:DesignWidth="550" Background="{StaticResource MainWindow.Background}" DataContext="{Binding MachineLoginViewVM, Source={StaticResource Locator}}" Foreground="{StaticResource MainWindow.Foreground}"> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineSerialView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineSerialView.xaml index b988d0a76..eea90c7b9 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineSerialView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineSerialView.xaml @@ -8,7 +8,7 @@ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" - mc:Ignorable="d" Width="559" Height="266" Background="White" d:DataContext="{d:DesignInstance Type=vm:MachineSerialViewVM, IsDesignTimeCreatable=False}"> + mc:Ignorable="d" Width="559" Height="266" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:MachineSerialViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource MainWindow.Foreground}"> @@ -54,7 +54,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml index 57b8335c5..5513b65ac 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml @@ -9,6 +9,7 @@ xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:common="clr-namespace:Tango.MachineStudio.Common;assembly=Tango.MachineStudio.Common" xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" @@ -43,7 +44,7 @@ - + - MODULES - + MODULES + @@ -125,7 +126,7 @@ - + @@ -142,11 +143,11 @@ + Mode="PrimaryMid" DockPanel.Dock="Top" Background="{StaticResource MainWindow.Header}"> - + + + + + + + - + - - + + @@ -470,7 +480,7 @@ @@ -132,7 +132,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml index d1ff75fc7..92317a5d5 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml @@ -12,7 +12,7 @@ xmlns:tfs="clr-namespace:Tango.TFS;assembly=Tango.TFS" xmlns:tfss="clr-namespace:Tango.MachineStudio.UI.TFS" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" - mc:Ignorable="d" Width="530" Height="580" Background="White" d:DataContext="{d:DesignInstance Type=vm:ResolvedIssuesViewVM, IsDesignTimeCreatable=False}"> + mc:Ignorable="d" Width="530" Height="580" Background="{StaticResource MainWindow.Background}" d:DataContext="{d:DesignInstance Type=vm:ResolvedIssuesViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource MainWindow.Foreground}"> @@ -39,7 +39,7 @@ - +