diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-10-11 12:56:58 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-10-11 12:56:58 +0300 |
| commit | 59f9474345812250ee62cd8ce5d6405821706feb (patch) | |
| tree | a1dcdfaaf8e1b3e40192f6c07d061023b3185aa6 /Software/Visual_Studio/MachineStudio/Modules | |
| parent | 469ba6f2c0fdeeb942578084c3c6c1d76d040c2d (diff) | |
| download | Tango-59f9474345812250ee62cd8ce5d6405821706feb.tar.gz Tango-59f9474345812250ee62cd8ce5d6405821706feb.zip | |
Attempt to resolve issue with multiple active process group for RML.
Added "enable color calibration" option for research module.
Some minor changes..
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
4 files changed, 39 insertions, 9 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 1b9720335..dfba1a79c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -519,6 +519,17 @@ namespace Tango.MachineStudio.Developer.ViewModels /// Gets or sets a value indicating whether the job details view is visible. /// </summary> public bool IsJobVisible { get; set; } + + private bool _enableColorConversion; + /// <summary> + /// Gets or sets a value indicating whether to enable color conversion processes. + /// </summary> + public bool EnableColorConversion + { + get { return _enableColorConversion; } + set { _enableColorConversion = value; RaisePropertyChangedAuto(); } + } + #endregion #region Commands @@ -675,6 +686,7 @@ namespace Tango.MachineStudio.Developer.ViewModels public MainViewVM(IStudioApplicationManager applicationManager, INotificationProvider notificationProvider, IDiagnosticsFrameProvider diagnosticsFrameProvider, IVideoCaptureProvider videoCaptureProvider, DeveloperNavigationManager navigation, IAuthenticationProvider authentication, IEventLogger eventLogger, ISpeechProvider speech) { CanWork = true; + EnableColorConversion = true; _authentication = authentication; @@ -719,7 +731,7 @@ namespace Tango.MachineStudio.Developer.ViewModels ImportEmbroideryFileCommand = new RelayCommand(ImportEmbroideryFile, () => SelectedMachine != null && CanWork); DisplayJobEmbroideryFileCommand = new RelayCommand<Job>(DisplayJobEmbroideryFile, () => CanWork); ReloadMachinesCommand = new RelayCommand(() => LoadMachine(), () => CanWork && SelectedMachine != null); - ResetProcessParametersCommand = new RelayCommand(ResetProcessParameters); + ResetProcessParametersCommand = new RelayCommand(ResetProcessParameters,() => CanWork && MachineOperator != null); ApplicationManager.ConnectedMachineChanged += ApplicationManager_ConnectedMachineChanged; @@ -782,7 +794,7 @@ namespace Tango.MachineStudio.Developer.ViewModels { while (true) { - if (!_disable_gamut_check && IsJobVisible && IsVisible && ActiveJob != null && ActiveJob.Segments != null) + if (EnableColorConversion && !_disable_gamut_check && IsJobVisible && IsVisible && ActiveJob != null && ActiveJob.Segments != null) { try { @@ -1463,6 +1475,18 @@ namespace Tango.MachineStudio.Developer.ViewModels using (_notification.PushTaskItem("Saving Parameters Group...")) { + using (var db = ObservablesContext.CreateDefault()) + { + var active_groups = db.ProcessParametersTablesGroups.Where(x => x.RmlGuid == SelectedRML.Guid && x.Active).ToList(); + + foreach (var g in active_groups) + { + g.Active = false; + } + + await db.SaveChangesAsync(); + } + LogManager.Log(String.Format("Saving process parameters group under the name {0}...", response)); ProcessParametersTablesGroup group = new ProcessParametersTablesGroup(); 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 b9c2b816f..dec815020 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 @@ -687,11 +687,17 @@ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Foreground="DimGray" FontSize="16" FontWeight="SemiBold">SEGMENT BRUSH</TextBlock> </StackPanel> - <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="15" Margin="200 0 10 0" StrokeThickness="1" Stroke="Gainsboro"> - <Rectangle.Fill> - <LinearGradientBrush StartPoint="0,0" EndPoint="1,0" x:Name="gradientBrush"></LinearGradientBrush> - </Rectangle.Fill> - </Rectangle> + <DockPanel> + <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" VerticalAlignment="Center" Margin="0 0 15 0"> + <ToggleButton IsChecked="{Binding EnableColorConversion}" /> + <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" Foreground="DimGray">Enable Color Conversion</TextBlock> + </StackPanel> + <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="15" Margin="200 0 10 0" StrokeThickness="1" Stroke="Gainsboro"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0,0" EndPoint="1,0" x:Name="gradientBrush"></LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + </DockPanel> </Grid> <Grid Margin="0 10 10 0"> <controls:MultiSelectListBox AutomationProperties.AutomationId="{x:Static automation:Developer.BrushStopsListBox}" SelectionMode="Extended" Style="{x:Null}" Background="Transparent" ScrollViewer.CanContentScroll="False" BorderThickness="0" ItemsSource="{Binding BrushStopsCollectionView}" SelectedItem="{Binding SelectedBrushStop}" SelectedItemsList="{Binding SelectedBrushStops,Mode=TwoWay}" HorizontalContentAlignment="Stretch"> 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 8a3c7c25f..e70619a4f 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 @@ -59,7 +59,7 @@ <Button Margin="0 10 0 0" Command="{Binding ResetMinMaxToDefaultCommand}" Style="{StaticResource MaterialDesignFlatButton}">Set To Default</Button> </StackPanel> - <CheckBox IsChecked="{Binding UseAutoRange}">Use auto ranges</CheckBox> + <CheckBox IsChecked="{Binding UseAutoRange}">Auto Range</CheckBox> <CheckBox Margin="0 10 0 0" IsChecked="{Binding IsPaused}">Pause</CheckBox> <Button Margin="0 10" Command="{Binding ClearCommand}">CLEAR</Button> 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 a9d341b01..541467fe9 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 @@ -59,7 +59,7 @@ <Button Margin="0 10 0 0" Command="{Binding ResetMinMaxToDefaultCommand}" Style="{StaticResource MaterialDesignFlatButton}">Set To Default</Button> </StackPanel> - <CheckBox IsChecked="{Binding UseAutoRange}">Use auto ranges</CheckBox> + <CheckBox IsChecked="{Binding UseAutoRange}">Auto Range</CheckBox> <CheckBox Margin="0 10 0 0" IsChecked="{Binding IsPaused}">Pause</CheckBox> <Button Margin="0 10" Command="{Binding ClearCommand}">CLEAR</Button> |
