aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2022-08-22 11:25:28 +0300
committerRoy <Roy.mail.net@gmail.com>2022-08-22 11:25:28 +0300
commit44fb561bfbf73b950cdcb3c59b5ff74172d1ebcb (patch)
treef2751343696118fd743efc7349b253a802b601d0 /Software/Visual_Studio
parentdc84d4dd42ce66902e6256f11c9412aa7d309f17 (diff)
parentc97019debd77e918f2c6c2eaef8a51ec8cba2127 (diff)
downloadTango-44fb561bfbf73b950cdcb3c59b5ff74172d1ebcb.tar.gz
Tango-44fb561bfbf73b950cdcb3c59b5ff74172d1ebcb.zip
Merge branch 'software' of https://twinetfs.visualstudio.com/Tango/_git/Tango into software
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txtbin52 -> 52 bytes
-rw-r--r--Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip25
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs23
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/JobCreationView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialog.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialogVM.cs176
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs40
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/SegmentModel.cs13
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/TrialsLogModel.cs9
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/AddBrushStopCommand.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs10
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Segment.cs18
13 files changed, 209 insertions, 115 deletions
diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt
index 1a2038cfa..5fe5afe5a 100644
--- a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt
+++ b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer-cache/cacheIndex.txt
Binary files differ
diff --git a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip
index 649c7fd38..f946c3818 100644
--- a/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip
+++ b/Software/Visual_Studio/Advanced Installer Projects/PPC Installer.aip
@@ -18,10 +18,10 @@
<ROW Property="ARPNOREPAIR" Value="1" MultiBuildValue="DefaultBuild:1"/>
<ROW Property="ARPSYSTEMCOMPONENT" Value="1"/>
<ROW Property="Manufacturer" Value="Twine"/>
- <ROW Property="ProductCode" Value="1033:{53284F5E-4789-4C30-AA87-2F5AD5E474E9} " Type="16"/>
+ <ROW Property="ProductCode" Value="1033:{0EB40F80-AFA6-4CF9-93D1-3F97574E41B4} " Type="16"/>
<ROW Property="ProductLanguage" Value="1033"/>
<ROW Property="ProductName" Value="Tango"/>
- <ROW Property="ProductVersion" Value="1.7.12.0" Type="32"/>
+ <ROW Property="ProductVersion" Value="1.7.15.0" Type="32"/>
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
<ROW Property="UpgradeCode" Value="{F8EAB8B4-FD57-45B7-8307-D52DF760273D}"/>
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
@@ -217,11 +217,13 @@
<ROW Component="mscoree.dll" ComponentId="{85F439D0-8FD0-4B99-888D-336C7A125E3D}" Directory_="APPDIR" Attributes="0" KeyPath="mscoree.dll"/>
<ROW Component="msvcp140d.dll" ComponentId="{69E32675-9ACF-4C23-A495-300B78913B66}" Directory_="APPDIR" Attributes="0" KeyPath="msvcp140d.dll"/>
<ROW Component="protobufnet.dll" ComponentId="{163F1E17-6462-4ABE-BC86-E055F7690139}" Directory_="APPDIR" Attributes="0" KeyPath="protobufnet.dll"/>
+ <ROW Component="turbojpeg.dll" ComponentId="{FF7284F2-F571-45D1-BE39-5534B0F9F88E}" Directory_="win7x64_Dir" Attributes="256" KeyPath="turbojpeg.dll"/>
+ <ROW Component="turbojpeg.dll.meta" ComponentId="{9B8CCCFD-4C70-4100-83F3-9DB936600354}" Directory_="win7x64_Dir" Attributes="0" KeyPath="turbojpeg.dll.meta" Type="0"/>
+ <ROW Component="turbojpeg.dll.meta_1" ComponentId="{04EED170-BD66-4EC6-B4D9-E81D54F1F8F6}" Directory_="win7x86_Dir" Attributes="0" KeyPath="turbojpeg.dll.meta_1" Type="0"/>
+ <ROW Component="turbojpeg.dll_1" ComponentId="{C0557FE9-4422-44F3-A417-29FC253E567C}" Directory_="win7x86_Dir" Attributes="0" KeyPath="turbojpeg.dll_1"/>
<ROW Component="ucrtbased.dll" ComponentId="{B8D025EA-CD16-4EE7-A3E7-713E2BE82BF3}" Directory_="APPDIR" Attributes="0" KeyPath="ucrtbased.dll"/>
<ROW Component="vcruntime140.dll" ComponentId="{144594CC-D19B-45E4-A420-7A1BBB122EE3}" Directory_="APPDIR" Attributes="0" KeyPath="vcruntime140.dll"/>
<ROW Component="vcruntime140d.dll" ComponentId="{7653420C-C6C3-4F31-97E8-D6DE417D3DF2}" Directory_="APPDIR" Attributes="0" KeyPath="vcruntime140d.dll"/>
- <ROW Component="win7x64" ComponentId="{BB6CEC4B-8243-43BA-8FF5-1989AEFB6A3A}" Directory_="win7x64_Dir" Attributes="0"/>
- <ROW Component="win7x86" ComponentId="{BE851CE7-4364-4D58-A44D-302E457E8A12}" Directory_="win7x86_Dir" Attributes="0"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0"/>
@@ -493,6 +495,11 @@
<ROW File="System.Spatial.dll" Component_="System.Spatial.dll" FileName="SYSTE~11.DLL|System.Spatial.dll" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\Build\PPC\Release\System.Spatial.dll" SelfReg="false"/>
<ROW File="Tango.PDF.dll" Component_="Tango.PDF.dll" FileName="TANGO~17.DLL|Tango.PDF.dll" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\Build\PPC\Release\Tango.PDF.dll" SelfReg="false"/>
<ROW File="Tango.PDF.pdb" Component_="Tango.PDF.dll" FileName="TANGO~18.PDB|Tango.PDF.pdb" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\Build\PPC\Release\Tango.PDF.pdb" SelfReg="false"/>
+ <ROW File="LibGit2Sharp.dll.config" Component_="CommandLine.xml" FileName="LIBGIT~1.CON|LibGit2Sharp.dll.config" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\Build\PPC\Release\LibGit2Sharp.dll.config" SelfReg="false"/>
+ <ROW File="turbojpeg.dll" Component_="turbojpeg.dll" FileName="TURBOJ~1.DLL|turbojpeg.dll" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\Build\PPC\Release\win7-x64\turbojpeg.dll" SelfReg="false"/>
+ <ROW File="turbojpeg.dll.meta" Component_="turbojpeg.dll.meta" FileName="TURBOJ~1.MET|turbojpeg.dll.meta" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\Build\PPC\Release\win7-x64\turbojpeg.dll.meta" SelfReg="false"/>
+ <ROW File="turbojpeg.dll_1" Component_="turbojpeg.dll_1" FileName="TURBOJ~1.DLL|turbojpeg.dll" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\Build\PPC\Release\win7-x86\turbojpeg.dll" SelfReg="false"/>
+ <ROW File="turbojpeg.dll.meta_1" Component_="turbojpeg.dll.meta_1" FileName="TURBOJ~1.MET|turbojpeg.dll.meta" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\Build\PPC\Release\win7-x86\turbojpeg.dll.meta" SelfReg="false"/>
<ATTRIBUTE name="DontAddFileAttributes" value="true"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.BootstrOptComponent">
@@ -502,7 +509,7 @@
<ROW Action="AI_DetectSoftware" Sequence="101"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
- <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="..\Build\Installers\PPC" PackageFileName="PPC Installer_v1.7.12" Languages="en" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" ExtUI="true" UseLargeSchema="true" ExeName="PPC Installer_v1.7.12"/>
+ <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="..\Build\Installers\PPC" PackageFileName="PPC Installer_v1.7.15" Languages="en" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" ExtUI="true" UseLargeSchema="true" ExeName="PPC Installer_v1.7.15"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
<ROW Path="&lt;AI_DICTS&gt;ui.ail"/>
@@ -570,8 +577,6 @@
<COMPONENT cid="caphyon.advinst.msicomp.MsiCreateFolderComponent">
<ROW Directory_="SHORTCUTDIR" Component_="SHORTCUTDIR" ManualDelete="false"/>
<ROW Directory_="APPDIR" Component_="APPDIR" ManualDelete="true"/>
- <ROW Directory_="win7x64_Dir" Component_="win7x64" ManualDelete="false"/>
- <ROW Directory_="win7x86_Dir" Component_="win7x86" ManualDelete="false"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
<ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH_ORIGINAL" Target="[AI_SETUPEXEPATH]"/>
@@ -777,8 +782,10 @@
<ROW Feature_="MainFeature" Component_="Microsoft.Data.Services.Client.dll"/>
<ROW Feature_="MainFeature" Component_="System.Spatial.dll"/>
<ROW Feature_="MainFeature" Component_="Tango.PDF.dll"/>
- <ROW Feature_="MainFeature" Component_="win7x86"/>
- <ROW Feature_="MainFeature" Component_="win7x64"/>
+ <ROW Feature_="MainFeature" Component_="turbojpeg.dll"/>
+ <ROW Feature_="MainFeature" Component_="turbojpeg.dll.meta"/>
+ <ROW Feature_="MainFeature" Component_="turbojpeg.dll_1"/>
+ <ROW Feature_="MainFeature" Component_="turbojpeg.dll.meta_1"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstExSeqComponent">
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1502"/>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs
index 923f045f1..6c402fe45 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs
@@ -518,7 +518,7 @@ namespace Tango.PPC.Jobs.Dialogs
else if (SelectedBrushStop.ColorSpace == ColorSpaces.Catalog)
{
SelectedColorTab = ColorTab.Catalog;
- if (SelectedBrushStop.ColorCatalogsItem != null)
+ if (SelectedBrushStop.ColorCatalogsItem != null && SelectedBrushStop.ColorCatalogsItem.ColorCatalogsGroup != null && SelectedBrushStop.ColorCatalogsItem.ColorCatalogsGroup.ColorCatalog != null)
{
SelectedCatalog = SelectedBrushStop.ColorCatalogsItem.ColorCatalogsGroup.ColorCatalog;
}
@@ -614,7 +614,7 @@ namespace Tango.PPC.Jobs.Dialogs
protected void OnColorSelectionItemChanged(object sender, EventArgs args)
{
- if (SelectedBrushStop.ColorCatalogsItem != null)
+ if (SelectedBrushStop.ColorCatalogsItem != null && SelectedBrushStop.ColorCatalogsItem.ColorCatalogsGroup != null && SelectedBrushStop.ColorCatalogsItem.ColorCatalogsGroup.ColorCatalog != null)
{
SelectedCatalog = SelectedBrushStop.ColorCatalogsItem.ColorCatalogsGroup.ColorCatalog;
}
@@ -723,8 +723,14 @@ namespace Tango.PPC.Jobs.Dialogs
protected override void Cancel()
{
if(IsOpenVectorFineTuningDialog)
- return;
-
+ return;
+
+ var TestColor = TrialsLogEngine.Default.GetByBrushStopGuid(_selectedBrushStop.Guid);
+ if (TestColor != null && InitialBrushStop != null && (InitialBrushStop.ColorSpace != ColorSpaces.LAB || TestColor.L != InitialBrushStop.L || TestColor.A != InitialBrushStop.A || TestColor.B != InitialBrushStop.B ))
+ {
+ TrialsLogEngine.Default.Delete(TestColor);
+ }
+
_selectedBrushStop.LiquidVolumesOutOfRangeChanged -= OnLiquidVolumesOutOfRangeChanged;
base.Cancel();
}
@@ -1035,7 +1041,7 @@ namespace Tango.PPC.Jobs.Dialogs
{
SelectedBrushStop.SaveLABBeforeChanges();
- VectorFineTuningDialogVM.Init( SelectedBrushStop, SelectedBrushStop.L, SelectedBrushStop.A, SelectedBrushStop.B, SelectedBrushStop.Color);
+ VectorFineTuningDialogVM.Init( SelectedBrushStop, SelectedBrushStop.BestMatchL, SelectedBrushStop.BestMatchA, SelectedBrushStop.BestMatchB, SelectedBrushStop.Color);
IsOpenVectorFineTuningDialog = true;
@@ -1064,9 +1070,10 @@ namespace Tango.PPC.Jobs.Dialogs
&& VectorFineTuningDialogVM.SelectedLog.B != null)
{
_selectedBrushStop.PreventPropertyUpdate = true;
- _selectedBrushStop.L = (double)VectorFineTuningDialogVM.SelectedLog.L;
- _selectedBrushStop.A = (double)VectorFineTuningDialogVM.SelectedLog.A;
- _selectedBrushStop.B = (double)VectorFineTuningDialogVM.SelectedLog.B;
+ _selectedBrushStop.L = (double)VectorFineTuningDialogVM.SelectedLog.SuggestionL;
+ _selectedBrushStop.A = (double)VectorFineTuningDialogVM.SelectedLog.SuggestionA;
+ _selectedBrushStop.B = (double)VectorFineTuningDialogVM.SelectedLog.SuggestionB;
+ //if not tested
_selectedBrushStop.PreventPropertyUpdate = false;
_selectedBrushStop.ConvertColor();
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/JobCreationView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/JobCreationView.xaml
index dd98a8f71..97fb1d590 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/JobCreationView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/JobCreationView.xaml
@@ -82,7 +82,7 @@
</touch:TouchComboBox.ItemTemplate>
<touch:TouchComboBox.SelectedItemTemplate>
<DataTemplate>
- <TextBlock Margin="0 0 0 5" FontSize="{StaticResource TangoDialogFontSize}" Text="{Binding Name}" VerticalAlignment="Center"></TextBlock>
+ <TextBlock Margin="0 0 0 5" FontSize="{StaticResource TangoDialogFontSize}" Text="{Binding FinalName}" VerticalAlignment="Center"></TextBlock>
</DataTemplate>
</touch:TouchComboBox.SelectedItemTemplate>
</touch:TouchComboBox>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialog.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialog.xaml
index 4c9ab61e0..56e3ff211 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialog.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialog.xaml
@@ -197,7 +197,7 @@
</StackPanel>
</UniformGrid>
- <UniformGrid Grid.Column="1" x:Name="cmyk_grid" Margin="0 16 0 0" Rows="4" Columns="1" HorizontalAlignment="Left" Height=" 100" VerticalAlignment="Top">
+ <!--<UniformGrid Grid.Column="1" x:Name="cmyk_grid" Margin="0 16 0 0" Rows="4" Columns="1" HorizontalAlignment="Left" Height=" 100" VerticalAlignment="Top">
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="{StaticResource TangoSmallFontSize}" Width="12" HorizontalAlignment="Center" VerticalAlignment="Center">C</TextBlock>
<Rectangle Margin="10 0 0 0" Width="{Binding Cyan, Mode=OneWay}" Height="12" Fill="#00C3FF"/>
@@ -218,7 +218,7 @@
<Rectangle Margin="10 0 0 0" Width="{Binding Black, Mode=OneWay}" Height="12" Fill="black"/>
<TextBlock Margin="10 0 0 0" Text="{Binding Black, StringFormat={}{0:0.##}}" FontSize="{StaticResource TangoSmallFontSizeBar}" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}"></TextBlock>
</StackPanel>
- </UniformGrid>
+ </UniformGrid>-->
</Grid>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialogVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialogVM.cs
index 9a3230ea8..8a464d911 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialogVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialogVM.cs
@@ -494,7 +494,6 @@ namespace Tango.PPC.Jobs.Dialogs
ActiveLogModel.SuggestionL = TargetL;
ActiveLogModel.SuggestionA = TargetA;
ActiveLogModel.SuggestionB = TargetB;
- ActiveLogModel.HasSuggestionsLAB = true;
TrialsLogitems = new SynchronizedObservableCollection<TrialsLogModel>();
TrialsLogitems.Add(ActiveLogModel);
//TEST
@@ -508,19 +507,7 @@ namespace Tango.PPC.Jobs.Dialogs
else
{
TrialsLogitems = new SynchronizedObservableCollection<TrialsLogModel>(TestColor.TrialslogList.OrderByDescending(x=>x.TrialNumber));
- double lastSuggestionL = TargetL;
- double lastSuggestionA = TargetA;
- double lastSuggestionB = TargetB;
- foreach ( var trial in TrialsLogitems.OrderBy(x=>x.TrialNumber))
- {
- trial.IsTested = true;
- CalculateSuggestionLAB(lastSuggestionL, lastSuggestionA, lastSuggestionB, trial);
- lastSuggestionL = trial.SuggestionL;
- lastSuggestionA = trial.SuggestionA;
- lastSuggestionB = trial.SuggestionB;
- }
- //TrialsLogitems.ToList().ForEach(x => x.IsTested = true);
int maxTrialsNumber = TrialsLogitems.Max( x=>x.TrialNumber);
ActiveLogModel = TrialsLogitems.FirstOrDefault(x => x.TrialNumber == maxTrialsNumber);
if (ActiveLogModel == null)
@@ -528,14 +515,26 @@ namespace Tango.PPC.Jobs.Dialogs
ActiveLogModel = new TrialsLogModel(0, Cyan, Magenta, Yellow, Black);
TrialsLogitems.Add(ActiveLogModel);
}
+ if (ActiveLogModel.IsTested == false)
+ {
+ if(ActiveLogModel.L != null)
+ {
+ MeasuredL = ActiveLogModel.L;
+ }
+ if (ActiveLogModel.A != null)
+ {
+ MeasuredA = ActiveLogModel.A;
+ }
+ if (ActiveLogModel.B != null)
+ {
+ MeasuredB = ActiveLogModel.B;
+ }
+ TestCommand.RaiseCanExecuteChanged();
+ }
+
ActiveLogModel.IsActiveTrial = true;
- ActiveLogModel.IsTested = false;
ActiveLogModel.IsSelectionEnable = true;
- ActiveLogModel.SuggestionL = lastSuggestionL;
- ActiveLogModel.SuggestionA = lastSuggestionA;
- ActiveLogModel.SuggestionB = lastSuggestionB;
-
var minValue = TrialsLogitems.Min(x => x.DeltaE);
if(minValue != null && minValue < 2)
{
@@ -543,7 +542,8 @@ namespace Tango.PPC.Jobs.Dialogs
}
OKCommand.RaiseCanExecuteChanged();
-
+ TestCommand.RaiseCanExecuteChanged();
+
}
IsVisible = true;
RaisePropertyChanged(nameof(TrialsLogitems));
@@ -629,6 +629,7 @@ namespace Tango.PPC.Jobs.Dialogs
ActiveLogModel = TrialsLogitems.FirstOrDefault(x=> x.TrialNumber == 0);
ActiveLogModel.L = ActiveLogModel.A = ActiveLogModel.B = null;
ActiveLogModel.DeltaE = null;
+ ActiveLogModel.IsTested = false;
TrialsLogitems.Clear();
if (TestColor != null)
{
@@ -643,14 +644,50 @@ namespace Tango.PPC.Jobs.Dialogs
private void DeleteTrialLog(object obj)
{
- if (SelectedLog != null && SelectedLog.TrialNumber != 0)
+ if (SelectedLog != null )
{
- TrialsLogitems.Remove(SelectedLog);
- RaisePropertyChanged(nameof(IsDisableInputLAB));
- SelectedLog = null;
- var minDelataE = TrialsLogitems.Min(x => x.DeltaE);
- if (minDelataE != null && minDelataE < 2)
- TrialsLogitems.ToList().ForEach(x => x.IsBest = (x.DeltaE == minDelataE));
+ if (SelectedLog.TrialNumber != 0)
+ {
+ TrialsLogitems.Remove(SelectedLog);
+ int trialNumber = 0;
+ foreach( var trial in TrialsLogitems.OrderBy(x=>x.TrialNumber))
+ {
+ trial.TrialNumber = trialNumber;
+ trialNumber++;
+ }
+ if (TestColor != null)
+ {
+ TestColor.TrialslogList.Clear();
+ TestColor.TrialslogList.AddRange(TrialsLogitems);
+ TrialsLogEngine.Default.UpdateTest(TestColor);
+ }
+ var max = TrialsLogitems.Max(x=>x.TrialNumber);
+ ActiveLogModel = TrialsLogitems.FirstOrDefault(x => x.TrialNumber == max);
+ RaisePropertyChanged(nameof(IsDisableInputLAB));
+ SelectedLog = null;
+ var minDelataE = TrialsLogitems.Min(x => x.DeltaE);
+ if (minDelataE != null && minDelataE < 2)
+ TrialsLogitems.ToList().ForEach(x => x.IsBest = (x.DeltaE == minDelataE));
+ }
+ else if( TrialsLogitems.Count == 1)
+ {
+ ActiveLogModel.L = ActiveLogModel.A = ActiveLogModel.B = null;
+ ActiveLogModel.DeltaE = null;
+ ActiveLogModel.IsTested = false;
+ if (TestColor != null)
+ {
+ TrialsLogEngine.Default.Delete(TestColor);
+ }
+ SelectedLog = null;
+ _measuredL = null;
+ _measuredB = null;
+ _measuredA = null;
+ RaisePropertyChanged(nameof(MeasuredL));
+ RaisePropertyChanged(nameof(MeasuredA));
+ RaisePropertyChanged(nameof(MeasuredB));
+ RaisePropertyChanged(nameof(TrialsLogitems));
+ RaisePropertyChanged(nameof(IsDisableInputLAB));
+ }
}
}
@@ -687,7 +724,7 @@ namespace Tango.PPC.Jobs.Dialogs
BrushStopModel.Black = SelectedLog.TestK;
}
- if(false == SelectedLog.HasSuggestionsLAB)
+ if(!SelectedLog.IsTested)
{
double lastSuggestionL = TargetL;
double lastSuggestionA = TargetA;
@@ -719,9 +756,9 @@ namespace Tango.PPC.Jobs.Dialogs
{
OnClose();
- if (TestColor != null && TrialsLogitems.Count > 1)
+ if (TestColor != null )
{
- if (TrialsLogitems.Count > 1)
+ if (TrialsLogitems.Count > 0)
{
TestColor.L = TargetL;
TestColor.A = TargetA;
@@ -731,10 +768,10 @@ namespace Tango.PPC.Jobs.Dialogs
TestColor.TrialslogList.AddRange(TrialsLogitems);
TrialsLogEngine.Default.UpdateTest(TestColor);
}
- else
- TrialsLogEngine.Default.Delete(TestColor);
+ //else
+ // TrialsLogEngine.Default.Delete(TestColor);
}
- else if(TrialsLogitems.Count > 1)
+ else if(TrialsLogitems.Count > 0)
{
TestColor = new TestColor();
TestColor.BrushStopGuid = BrushStopModel.Guid;
@@ -803,17 +840,16 @@ namespace Tango.PPC.Jobs.Dialogs
double lastSuggestionL = TargetL;
double lastSuggestionA = TargetA;
double lastSuggestionB = TargetB;
- if (!ActiveLogModel.HasSuggestionsLAB)
+
+ TrialsLogModel lastTested = TrialsLogitems.OrderBy(x => x.TrialNumber).LastOrDefault(y=>y.IsTested);
+ if(lastTested != null)
{
- TrialsLogModel lastTested = TrialsLogitems.OrderBy(x => x.TrialNumber).LastOrDefault(y=>y.IsTested);
- if(lastTested != null)
- {
- lastSuggestionL = lastTested.SuggestionL;
- lastSuggestionA = lastTested.SuggestionA;
- lastSuggestionB = lastTested.SuggestionB;
- }
- CalculateSuggestionLAB(lastSuggestionL, lastSuggestionA, lastSuggestionB, ActiveLogModel);
+ lastSuggestionL = lastTested.SuggestionL;
+ lastSuggestionA = lastTested.SuggestionA;
+ lastSuggestionB = lastTested.SuggestionB;
}
+ CalculateSuggestionLAB(lastSuggestionL, lastSuggestionA, lastSuggestionB, ActiveLogModel);
+
BrushStopModel.PreventPropertyUpdate = true;
BrushStopModel.L = ActiveLogModel.SuggestionL;
BrushStopModel.A = ActiveLogModel.SuggestionA;
@@ -821,7 +857,14 @@ namespace Tango.PPC.Jobs.Dialogs
BrushStopModel.PreventPropertyUpdate = false;
//calculate CMYK
- BrushStopModel.ConvertColorToVolume();
+ BrushStopModel.FineTuningConverter();
+ if(BrushStopModel.IsOutOfGamut)
+ {
+ ActiveLogModel.SuggestionL = BrushStopModel.L;
+ ActiveLogModel.SuggestionA = BrushStopModel.A;
+ ActiveLogModel.SuggestionB = BrushStopModel.B;
+ }
+
BrushStopModel.ColorSpace = ColorSpaces.LAB;
var settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
@@ -831,7 +874,8 @@ namespace Tango.PPC.Jobs.Dialogs
job.EnableLubrication = true;
job.Designation = JobDesignations.FineTuning;
job.Machine = await new MachineBuilder(db).Set(MachineProvider.Machine.Guid).WithConfiguration().WithSpools().WithCats().WithVersion().BuildAsync();
- job.Name = $"Manual color test #{ActiveLogModel.TrialNumber}";
+ var trialNumber = ActiveLogModel.TrialNumber + 1;
+ job.Name = $"Manual color test #{trialNumber}";
job.Rml = await new RmlBuilder(db).Set(BrushStopModel.SegmentModel.Job.Rml.Guid).WithActiveParametersGroup().WithCAT(MachineProvider.Machine.Guid).WithCCT().WithLiquidFactors().WithSpools().BuildAsync();
job.SpoolType = db.SpoolTypes.FirstOrDefault(x => x.Guid == settings.SpoolTypeGuid);
job.WindingMethod = db.WindingMethods.FirstOrDefault();
@@ -1108,32 +1152,36 @@ namespace Tango.PPC.Jobs.Dialogs
if (TrialsLogitems.Count == 1 || ActiveLogModel.DeltaE == null)
return ;
+ int currentTrialNumber = ActiveLogModel.TrialNumber;
+
if(TrialsLogitems.Count >= 3)
{
- var currentTrialNumber = ActiveLogModel.TrialNumber;
- var item = TrialsLogitems [TrialsLogitems.Count- 3];
- var item1 = TrialsLogitems[TrialsLogitems.Count - 2];
- var item2 = TrialsLogitems[TrialsLogitems.Count - 1];
- //dEi+2- dEi+1>0.5 and dEi+1-dEi>0.5
- if (( item2.DeltaE - item1.DeltaE) > 0.5 && (item1.DeltaE - item.DeltaE) > 0.5)
- {
- await NotificationProvider.ShowInfo("It seems that we can’t get you any closer");
- return ;
- }
- //Math.Abs
- //| dEi+1- dEi | and |dEi+2 -dEi+1|<=0.1.
- if(Math.Abs((double)item1.DeltaE - (double)item.DeltaE)<= 0.1 && Math.Abs((double)item2.DeltaE - (double)item1.DeltaE) <= 0.1)
- {
- await NotificationProvider.ShowInfo("It seems that we can’t get you any closer");
- return;
+ var item = TrialsLogitems.FirstOrDefault( x=>x.TrialNumber == currentTrialNumber - 2);
+ var item1 = TrialsLogitems.FirstOrDefault(x => x.TrialNumber == currentTrialNumber - 1);
+ var item2 = ActiveLogModel;
+ if(item1 != null && item2 != null && item != null)
+ {//dEi+2- dEi+1>0.5 and dEi+1-dEi>0.5
+ if (( item2.DeltaE - item1.DeltaE) > 0.5 && (item1.DeltaE - item.DeltaE) > 0.5)
+ {
+ await NotificationProvider.ShowInfo("It seems that we can’t get you any closer");
+ return ;
+ }
+ //Math.Abs
+ //| dEi+1- dEi | and |dEi+2 -dEi+1|<=0.1.
+ if(Math.Abs((double)item1.DeltaE - (double)item.DeltaE)<= 0.1 && Math.Abs((double)item2.DeltaE - (double)item1.DeltaE) <= 0.1)
+ {
+ await NotificationProvider.ShowInfo("It seems that we can’t get you any closer");
+ return;
+ }
}
}
-
-
if (TrialsLogitems.Count >= 2)
{
- var item = TrialsLogitems[TrialsLogitems.Count - 2];
- var item1 = TrialsLogitems[TrialsLogitems.Count - 1];
+ var item = TrialsLogitems.FirstOrDefault(x => x.TrialNumber == currentTrialNumber - 1);
+ var item1 = ActiveLogModel;
+ if(item == null || item1 == null)
+ return;
+
var deltaE_reg = DeltaE_regular(TargetL, TargetA, TargetB, (double)MeasuredL, (double)MeasuredA, (double)MeasuredB);
if ((Math.Abs((double)item1.L - (double)item.L) < 0.1 && Math.Abs((double)item1.A - (double)item.A) < 0.1 && Math.Abs((double)item1.B - (double)item.B) < 0.1)
|| deltaE_reg < 0.2)
@@ -1160,7 +1208,7 @@ namespace Tango.PPC.Jobs.Dialogs
trial.SuggestionL = LimitToRange((lastSuggestionL + (TargetL - (double)MeasuredL)),0, 100) ;
trial.SuggestionA = LimitToRange((lastSuggestionA + (TargetA - (double)MeasuredA)), -128, 127);
trial.SuggestionB = LimitToRange((lastSuggestionB + (TargetB - (double)MeasuredB )), -128, 127);
- trial.HasSuggestionsLAB = true;
+ LogManager.Log($" Fine Tuning. Suggestion (calculated) LAB L:'{trial.SuggestionL}'A:'{trial.SuggestionA}' B:'{trial.SuggestionB}'.");
return true;
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs
index 07bf2fa5c..2775f33c4 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs
@@ -518,8 +518,9 @@ namespace Tango.PPC.Jobs.Models
get
{
if (ColorCatalogsItem != null && ColorCatalogsItem.ColorCatalogsGroup != null)
+ {
return ColorCatalogsItem.ColorCatalogsGroup.ColorCatalog;
-
+ }
return null;
}
}
@@ -1397,6 +1398,43 @@ namespace Tango.PPC.Jobs.Models
}
}
+ public void FineTuningConverter()
+ {
+ RequiredMaxLiquidTest = true;
+
+ ColorSpaces colorSpace = ColorSpaces.LAB;
+ BrushStop stop = CreateBrushStop(colorSpace);
+ try
+ {
+ IsBusy = true;
+ var output = _converter.Convert(stop, SegmentModel.Job.Machine.Configuration, SegmentModel.Job.Rml, false, false, false);
+
+ _cyan = (output.SingleCoordinates.OutputLiquids.SingleOrDefault(x => x.LiquidType == PMR.ColorLab.LiquidType.Cyan).Volume);
+ _yellow = (output.SingleCoordinates.OutputLiquids.SingleOrDefault(x => x.LiquidType == PMR.ColorLab.LiquidType.Yellow).Volume);
+ _magenta = (output.SingleCoordinates.OutputLiquids.SingleOrDefault(x => x.LiquidType == PMR.ColorLab.LiquidType.Magenta).Volume);
+ _black = (output.SingleCoordinates.OutputLiquids.SingleOrDefault(x => x.LiquidType == PMR.ColorLab.LiquidType.Black).Volume);
+ IsOutOfGamut = output.OutOfGamut;
+ if(IsOutOfGamut)
+ {
+ BrushStop stopLAB = CreateBrushStop(ColorSpaces.Volume);
+
+ IsBusy = true;
+ var outputLAB = _converter.Convert(stopLAB, SegmentModel.Job.Machine.Configuration, SegmentModel.Job.Rml, false, false, false);
+ _l = output.SingleCoordinates.L;
+ _a = output.SingleCoordinates.A;
+ _b = output.SingleCoordinates.B;
+ }
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "An error occurred while trying to get volume => RGB from conversion engine." + ex);
+ }
+ finally
+ {
+ IsBusy = false;
+ }
+ }
+
public void RaiseOffsetChanged()
{
RaisePropertyChanged(nameof(OffsetPercent));
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/SegmentModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/SegmentModel.cs
index f8712fd35..b8b19b42b 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/SegmentModel.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/SegmentModel.cs
@@ -643,7 +643,7 @@ namespace Tango.PPC.Jobs.Models
brushStop.IsOutOfGamut = false;
BrushStops.Add(brushStop);
- BrushStopModel colorbrushStop = firstBrush.Clone();
+ BrushStopModel colorbrushStop = firstBrush;
colorbrushStop.Position = BrushStopModel.PositionStatus.FirstColor;
colorbrushStop.StopIndex = 2;
colorbrushStop.OffsetPercent = 0;
@@ -665,7 +665,7 @@ namespace Tango.PPC.Jobs.Models
{
RemoveSecondColorOfGradient();
- BrushStopModel secondbrushStop = secondBrush.Clone();
+ BrushStopModel secondbrushStop = secondBrush;
secondbrushStop.StopIndex = 4;
secondbrushStop.Position = BrushStopModel.PositionStatus.SecondColor;
secondbrushStop.OffsetPercent = 100;
@@ -782,15 +782,6 @@ namespace Tango.PPC.Jobs.Models
{
stop.RaiseOffsetChanged();
}
-
- if (BrushStops.Count > 0)
- {
- BrushStops.First().OffsetPercent = 0;
- }
- if (BrushStops.Count > 1)
- {
- BrushStops.Last().OffsetPercent = 100;
- }
RaiseSegmentBrushChanged();
});
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/TrialsLogModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/TrialsLogModel.cs
index 3b16a65a2..b4e01c1bd 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/TrialsLogModel.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/TrialsLogModel.cs
@@ -58,14 +58,12 @@ namespace Tango.PPC.Jobs.Models
set { _b = value; RaisePropertyChanged(nameof(LAB)); OnLABChanged(); }
}
- [BsonIgnore]
+
public double SuggestionL { get; set; }
- [BsonIgnore]
+
public double SuggestionA { get; set; }
- [BsonIgnore]
+
public double SuggestionB { get; set; }
- [BsonIgnore]
- public bool HasSuggestionsLAB { get; set; }
public double C { get; set; }
public double M { get; set; }
@@ -195,7 +193,6 @@ namespace Tango.PPC.Jobs.Models
IsTested = false;
IsSelectionEnable = true;
IsBest = false;
- HasSuggestionsLAB = false;
}
#region Methods
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/AddBrushStopCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/AddBrushStopCommand.cs
index 1a9ee005b..1b07d9eac 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/AddBrushStopCommand.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/AddBrushStopCommand.cs
@@ -48,7 +48,7 @@ namespace Tango.PPC.Jobs.UndoRedoCommands
_createdNewSegment.Length = length;
_segment.Length = length;
_createdNewSegment.SegmentIndex = _segment.SegmentIndex + 1;
- _createdNewSegment.CreateGradientBrushes(_brushStopModelToAdd, _segment.SecondBrushStop);
+ _createdNewSegment.CreateGradientBrushes(_brushStopModelToAdd.Clone(), _segment.SecondBrushStop);
_createdNewSegment.RaiseSegmentBrushChanged();
_segment.AddOrReplaceSecondBrush(_brushStopModelToAdd);
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
index dac84bc7b..1cc98bede 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs
@@ -1415,12 +1415,14 @@ namespace Tango.PPC.Jobs.ViewModels
dbSegment.SegmentIndex = segment.SegmentIndex;
dbSegment.Length = segment.Length;
_db.Segments.Add(dbSegment);
+ List<BrushStop> brushStopList = new List<BrushStop>();//to prevent collection changed event and override offset in timer
foreach (var stop in innerSegment.BrushStops.OrderBy(x => x.StopIndex).ToList())
{
var dbStop = new BrushStop();
dbStop.Guid = stop.Guid;
dbStop.Segment = dbSegment;
- _db.BrushStops.Add(dbStop);
+ //_db.BrushStops.Add(dbStop);
+ brushStopList.Add(dbStop);
dbStop.ColorSpace = colorSpaces.FirstOrDefault(x => x.Code == (int)stop.ColorSpace);
dbStop.Red = stop.Red;
@@ -1449,6 +1451,7 @@ namespace Tango.PPC.Jobs.ViewModels
dbStop.ColorCatalog = stop.ColorCatalog;
dbStop.ColorCatalogsItem = stop.ColorCatalogsItem;
}
+ _db.BrushStops.AddRange(brushStopList);
}
else if( segment is SegmentsGroupModel group)
{
@@ -1469,11 +1472,13 @@ namespace Tango.PPC.Jobs.ViewModels
dbSegment.Length = segm_group.Length;
dbSegment.SegmentsGroupGuid = dbSegmentsGroup.Guid;
_db.Segments.Add(dbSegment);
+ List<BrushStop> brushStopList = new List<BrushStop>();//to prevent collection changed event and override offset in timer
foreach (var stop in segm_group.BrushStops.OrderBy(x => x.StopIndex).ToList())
{
var dbStop = new BrushStop();
dbStop.Segment = dbSegment;
- _db.BrushStops.Add(dbStop);
+ //_db.BrushStops.Add(dbStop);
+ brushStopList.Add(dbStop);
dbStop.ColorSpace = colorSpaces.FirstOrDefault(x => x.Code == (int)stop.ColorSpace);
dbStop.Red = stop.Red;
@@ -1502,6 +1507,7 @@ namespace Tango.PPC.Jobs.ViewModels
dbStop.ColorCatalog = stop.ColorCatalog;
dbStop.ColorCatalogsItem = stop.ColorCatalogsItem;
}
+ _db.BrushStops.AddRange(brushStopList);
}
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
index 36e71499c..e024e020d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
@@ -8,4 +8,4 @@ using System.Windows;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Tango PPC Application")]
-[assembly: AssemblyVersion("1.7.12.0")]
+[assembly: AssemblyVersion("1.7.15.0")]
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Segment.cs b/Software/Visual_Studio/Tango.BL/Entities/Segment.cs
index f1e601f2a..be72100a5 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Segment.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Segment.cs
@@ -167,15 +167,15 @@ namespace Tango.BL.Entities
{
stop.RaiseOffsetChanged();
}
-
- if (BrushStops.Count > 0)
- {
- BrushStops.First().OffsetPercent = 0;
- }
- if (BrushStops.Count > 1)
- {
- BrushStops.Last().OffsetPercent = 100;
- }
+ //Item#7059 -
+ //if (BrushStops.Count > 0)
+ //{
+ // BrushStops.First().OffsetPercent = 0;
+ //}
+ //if (BrushStops.Count > 1)
+ //{
+ // BrushStops.Last().OffsetPercent = 100;
+ //}
RaiseSegmentBrushChanged();
});