aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-10-11 12:56:58 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-10-11 12:56:58 +0300
commit59f9474345812250ee62cd8ce5d6405821706feb (patch)
treea1dcdfaaf8e1b3e40192f6c07d061023b3185aa6 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels
parent469ba6f2c0fdeeb942578084c3c6c1d76d040c2d (diff)
downloadTango-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/Tango.MachineStudio.Developer/ViewModels')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs28
1 files changed, 26 insertions, 2 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();