diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
2 files changed, 37 insertions, 7 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"> |
