From cb34af5399446fb3c7ac6f7597569d7da5485ffd Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Thu, 9 Jun 2022 10:01:58 +0300 Subject: PPC. Added setting Default Color Space Related Work Items: #6349 --- .../ViewModels/MainViewVM.cs | 19 +++++++++++++++++++ .../Tango.PPC.MachineSettings/Views/MainView.xaml | 8 ++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs index f057f2e73..fbce06296 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs @@ -101,6 +101,13 @@ namespace Tango.PPC.MachineSettings.ViewModels set { _selectedColorSpaces = value; RaisePropertyChangedAuto(); } } + private ObservableCollection _tabsColorSpaces; + public ObservableCollection TabsColorSpaces + { + get { return _tabsColorSpaces; } + set { _tabsColorSpaces = value; RaisePropertyChangedAuto(); } + } + private ObservableCollection _rmls; public ObservableCollection Rmls { @@ -185,6 +192,13 @@ namespace Tango.PPC.MachineSettings.ViewModels set { _selectedSpoolType = value; RaisePropertyChangedAuto(); } } + private ColorSpaces _defaultTabColorSpace; + public ColorSpaces DefaultTabColorSpace + { + get { return _defaultTabColorSpace; } + set { _defaultTabColorSpace = value; RaisePropertyChangedAuto(); } + } + private bool _synchronizeJobs; public bool SynchronizeJobs { @@ -309,6 +323,7 @@ namespace Tango.PPC.MachineSettings.ViewModels { Settings.SupportedJobTypes = SelectedJobTypes.SynchedSource.ToList(); Settings.SupportedColorSpaces = SelectedColorSpaces.SynchedSource.ToList(); + Machine.MapPropertiesTo(MachineProvider.Machine, MappingFlags.NoReferenceTypes); Settings.EnableHotSpot = EnableHotSpot; @@ -325,6 +340,7 @@ namespace Tango.PPC.MachineSettings.ViewModels Settings.SynchronizeDiagnostics = SynchronizeDiagnostics; Settings.AutoCheckForUpdates = AutoCheckForUpdates; Settings.LubricationLevels = LubricationLevels.Where(x => x.LubricationLevel != LubricationLevel.Standard).Select(x => x.ToRmlLubricationLevel()).ToList(); + Settings.DefaultTabColorSpace = DefaultTabColorSpace; Settings.FineTuningTrialLengthMeters = FineTuningLength; MachineDataSynchronizer.IsEnabled = SynchronizeJobs || SynchronizeDiagnostics; @@ -533,6 +549,9 @@ namespace Tango.PPC.MachineSettings.ViewModels SelectedJobTypes = new SelectedObjectCollection(Enum.GetValues(typeof(JobTypes)).Cast().ToObservableCollection(), Settings.SupportedJobTypes.ToObservableCollection()); SelectedColorSpaces = new SelectedObjectCollection(Enum.GetValues(typeof(ColorSpaces)).Cast().Where(x => x.IsUserSpace()).ToObservableCollection(), Settings.SupportedColorSpaces.ToObservableCollection()); + TabsColorSpaces = new ObservableCollection(Enum.GetValues(typeof(ColorSpaces)).Cast().Where(x => x!= ColorSpaces.Volume && x!= ColorSpaces.HSB).ToObservableCollection()); + DefaultTabColorSpace = Settings.DefaultTabColorSpace == null? ColorSpaces.CMYK : TabsColorSpaces.SingleOrDefault(x => x == Settings.DefaultTabColorSpace); + DefaultRML = Rmls.SingleOrDefault(x => x.Guid == Settings.DefaultRmlGuid); SelectedSpoolType = SpoolTypes.SingleOrDefault(x => x.Guid == Settings.SpoolTypeGuid); diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml index 74b0ce7e1..b3b4bfeec 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml @@ -126,7 +126,7 @@ - Supported Color Spaces/Catalogs + Default Thread @@ -159,6 +159,10 @@ Default Segment Length + + Default Color Space + + Vector Fine Tuning Job Length -- cgit v1.3.1