diff options
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.cs | 19 |
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); |
