diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-06-09 10:01:58 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-06-09 10:01:58 +0300 |
| commit | cb34af5399446fb3c7ac6f7597569d7da5485ffd (patch) | |
| tree | f4273530a2f15af5b795cdc406773985287b9262 /Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings | |
| parent | cec797266fbb4041495c939f9ece248591e0db41 (diff) | |
| download | Tango-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')
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs | 19 | ||||
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml | 8 |
2 files changed, 25 insertions, 2 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); 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 @@ </ItemsControl.ItemTemplate> </ItemsControl> - <TextBlock VerticalAlignment="Center">Supported Color Spaces/Catalogs</TextBlock> + <!--<TextBlock VerticalAlignment="Center">Supported Color Spaces/Catalogs</TextBlock> <ItemsControl ItemsSource="{Binding SelectedColorSpaces}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> @@ -149,7 +149,7 @@ </touch:TouchToggleButton> </DataTemplate> </ItemsControl.ItemTemplate> - </ItemsControl> + </ItemsControl>--> <TextBlock VerticalAlignment="Bottom">Default Thread</TextBlock> <touch:TouchComboBox HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" ItemsSource="{Binding Rmls}" SelectedItem="{Binding DefaultRML}" DisplayMemberPath="FinalName"></touch:TouchComboBox> @@ -159,6 +159,10 @@ <TextBlock VerticalAlignment="Bottom">Default Segment Length</TextBlock> <touch:TouchNumericTextBox HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" Minimum="1" Maximum="1000" Value="{Binding Settings.DefaultSegmentLength}" HasDecimalPoint="True" KeyboardContainer="{Binding ElementName=Container}"></touch:TouchNumericTextBox> + + <TextBlock VerticalAlignment="Bottom">Default Color Space</TextBlock> + <touch:TouchComboBox HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" ItemsSource="{Binding TabsColorSpaces}" SelectedItem="{Binding DefaultTabColorSpace}" DisplayMemberPath="FinalName"></touch:TouchComboBox> + <TextBlock VerticalAlignment="Bottom">Vector Fine Tuning Job Length</TextBlock> <touch:TouchNumericTextBox HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200" Minimum="100" Maximum="500" Value="{Binding FineTuningLength}" HasDecimalPoint="False" KeyboardContainer="{Binding ElementName=Container}"></touch:TouchNumericTextBox> |
