aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2022-06-09 10:01:58 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2022-06-09 10:01:58 +0300
commitcb34af5399446fb3c7ac6f7597569d7da5485ffd (patch)
treef4273530a2f15af5b795cdc406773985287b9262 /Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
parentcec797266fbb4041495c939f9ece248591e0db41 (diff)
downloadTango-cb34af5399446fb3c7ac6f7597569d7da5485ffd.tar.gz
Tango-cb34af5399446fb3c7ac6f7597569d7da5485ffd.zip
PPC. Added setting Default Color Space
Related Work Items: #6349
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
index 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<ColorSpaces> _tabsColorSpaces;
+ public ObservableCollection<ColorSpaces> TabsColorSpaces
+ {
+ get { return _tabsColorSpaces; }
+ set { _tabsColorSpaces = value; RaisePropertyChangedAuto(); }
+ }
+
private ObservableCollection<Rml> _rmls;
public ObservableCollection<Rml> 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<JobTypes>(Enum.GetValues(typeof(JobTypes)).Cast<JobTypes>().ToObservableCollection(), Settings.SupportedJobTypes.ToObservableCollection());
SelectedColorSpaces = new SelectedObjectCollection<ColorSpaces>(Enum.GetValues(typeof(ColorSpaces)).Cast<ColorSpaces>().Where(x => x.IsUserSpace()).ToObservableCollection(), Settings.SupportedColorSpaces.ToObservableCollection());
+ TabsColorSpaces = new ObservableCollection<ColorSpaces>(Enum.GetValues(typeof(ColorSpaces)).Cast<ColorSpaces>().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);