aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2022-11-19 14:43:46 +0200
committerRoy <Roy.mail.net@gmail.com>2022-11-19 14:43:46 +0200
commit4cd4807ca5a7490c8d7edac496a19d618bf9197e (patch)
treee1f6c1565c242584f4cd8f62160ce2777779881a /Software
parentaa2170bb476e627ae3aaccb8f5835b1b9331c82a (diff)
downloadTango-4cd4807ca5a7490c8d7edac496a19d618bf9197e.tar.gz
Tango-4cd4807ca5a7490c8d7edac496a19d618bf9197e.zip
Statistics Fine Tuning Adaptation.
Diffstat (limited to 'Software')
-rw-r--r--Software/DB/PPC/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/PPC/Tango_log.ldfbin53673984 -> 53673984 bytes
-rw-r--r--Software/DB/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/Tango_log.ldfbin22675456 -> 22675456 bytes
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Models/StopModel.cs41
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs89
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml119
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/SelectionComboBox.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialogVM.cs248
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs16
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs4
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/TrialsLogModel.cs3
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/MainViewVM.cs10
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Statistics/DefaultStatisticsService.cs8
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/Filters.cs2
-rw-r--r--Software/Visual_Studio/Tango.BL/DTO/JobRunDTOBase.cs8
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Job.cs11
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs38
-rw-r--r--Software/Visual_Studio/Tango.BL/FineTuning/VectorFineTuningRunModel.cs25
-rw-r--r--Software/Visual_Studio/Tango.BL/Tango.BL.csproj3
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/JOB_RUNS.cs1
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx3
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram192
-rw-r--r--Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs36
-rw-r--r--Software/Visual_Studio/Tango.sln13
26 files changed, 640 insertions, 234 deletions
diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf
index 9ac33e441..9b7b7ea3c 100644
--- a/Software/DB/PPC/Tango.mdf
+++ b/Software/DB/PPC/Tango.mdf
Binary files differ
diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf
index 84fd2c5b6..deecbaaaf 100644
--- a/Software/DB/PPC/Tango_log.ldf
+++ b/Software/DB/PPC/Tango_log.ldf
Binary files differ
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf
index be2aaf23e..5cfd85867 100644
--- a/Software/DB/Tango.mdf
+++ b/Software/DB/Tango.mdf
Binary files differ
diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf
index 545096d43..c500561d4 100644
--- a/Software/DB/Tango_log.ldf
+++ b/Software/DB/Tango_log.ldf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Models/StopModel.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Models/StopModel.cs
index 487a75970..79331b222 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Models/StopModel.cs
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Models/StopModel.cs
@@ -7,6 +7,7 @@ using System.Windows.Media;
using Tango.BL.DTO;
using Tango.BL.Entities;
using Tango.BL.Enumerations;
+using Tango.BL.FineTuning;
using Tango.Core.Commands;
using Tango.PPC.Shared.Statistics;
@@ -26,6 +27,16 @@ namespace Tango.FSE.Statistics.Models
public RelayCommand<StopModel> CopyCommand { get; set; }
public JobRunExtendedInfo ExtendedInfo { get; set; }
public bool IsAdvancedMode { get; set; }
+ public VectorFineTuningRunModel FineTuningModel { get; set; }
+
+ public bool IsFineTuning
+ {
+ get { return FineTuningModel != null; }
+ }
+
+ public bool IsFineTuningApproved { get; set; }
+
+ public bool IsFineTuningSelected { get; set; }
public String Input
{
@@ -148,5 +159,35 @@ namespace Tango.FSE.Statistics.Models
{
get { return JobRun.NumberOfUnits > 1 ? $"{JobRun.JobLogicalLength} x{JobRun.NumberOfUnits}" : JobRun.JobLogicalLength.ToString(); }
}
+
+ public String FineTuningMeasured
+ {
+ get
+ {
+ if (FineTuningModel == null) return "";
+
+ return $"{FineTuningModel.FineTuningMeasuredL}, {FineTuningModel.FineTuningMeasuredA}, {FineTuningModel.FineTuningMeasuredB}";
+ }
+ }
+
+ public String FineTuningSuggested
+ {
+ get
+ {
+ if (FineTuningModel == null) return "";
+
+ return $"{FineTuningModel.FineTuningSuggestionL.ToString("0.00")}, {FineTuningModel.FineTuningSuggestionA.ToString("0.00")}, {FineTuningModel.FineTuningSuggestionB.ToString("0.00")}";
+ }
+ }
+
+ public String FineTuningTarget
+ {
+ get
+ {
+ if (FineTuningModel == null) return "";
+
+ return $"{FineTuningModel.FineTuningTargetL.ToString("0.00")}, {FineTuningModel.FineTuningTargetA.ToString("0.00")}, {FineTuningModel.FineTuningTargetB.ToString("0.00")}";
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs
index 2b46ad72f..7d71193f9 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs
@@ -1,4 +1,5 @@
-using System;
+using Newtonsoft.Json;
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data.Entity;
@@ -13,6 +14,7 @@ using Tango.BL;
using Tango.BL.DTO;
using Tango.BL.Entities;
using Tango.BL.Enumerations;
+using Tango.BL.FineTuning;
using Tango.Core;
using Tango.Core.Commands;
using Tango.Core.ExtensionMethods;
@@ -35,6 +37,8 @@ namespace Tango.FSE.Statistics.ViewModels
private const int NULL_JOB_INDEX = -1000;
private int _currentJobIndex;
private StatisticsModel _model;
+ private String _currentFineTuningSessionID;
+ private List<StopModel> _fineTuningStops;
#region Properties
@@ -92,6 +96,13 @@ namespace Tango.FSE.Statistics.ViewModels
set { _jobRunSelectedStatuses = value; RaisePropertyChangedAuto(); }
}
+ private SelectedObjectCollection<JobDesignations> _jobRunSelectedDesignations;
+ public SelectedObjectCollection<JobDesignations> JobRunSelectedDesignations
+ {
+ get { return _jobRunSelectedDesignations; }
+ set { _jobRunSelectedDesignations = value; RaisePropertyChangedAuto(); }
+ }
+
private SelectedObjectCollection<ThreadFilterData> _selectedThreads;
public SelectedObjectCollection<ThreadFilterData> SelectedThreads
{
@@ -176,6 +187,8 @@ namespace Tango.FSE.Statistics.ViewModels
public RelayCommand OpenStreamingSettingsCommand { get; set; }
+ public RelayCommand ClearCommand { get; set; }
+
#endregion
#region Suggestions Providers
@@ -205,9 +218,25 @@ namespace Tango.FSE.Statistics.ViewModels
JobRunStatus.Failed,
});
+
+ JobRunSelectedDesignations = new SelectedObjectCollection<JobDesignations>(new ObservableCollection<JobDesignations>()
+ {
+ JobDesignations.Default,
+ JobDesignations.FineTuning,
+
+ }, new ObservableCollection<JobDesignations>()
+ {
+ JobDesignations.Default,
+ JobDesignations.FineTuning,
+ });
+
+
JobRunSelectedStatuses.SelectionChanged -= (x, y) => RaisePropertyChanged(nameof(JobRunSelectedStatuses));
JobRunSelectedStatuses.SelectionChanged += (x, y) => RaisePropertyChanged(nameof(JobRunSelectedStatuses));
+ JobRunSelectedDesignations.SelectionChanged -= (x, y) => RaisePropertyChanged(nameof(JobRunSelectedDesignations));
+ JobRunSelectedDesignations.SelectionChanged += (x, y) => RaisePropertyChanged(nameof(JobRunSelectedDesignations));
+
JobsAutoCompleteProvider = new AutoCompleteSource<string>(AutoCompleteJobs);
StartSelectedDate = DateTime.Now.AddMonths(-1);
@@ -230,6 +259,7 @@ namespace Tango.FSE.Statistics.ViewModels
CopyCommand = new RelayCommand<StopModel>(CopyStopToClipboard);
ExportToCsvCommand = new RelayCommand(ExportToCSV, () => IsResultsAvailable);
OpenStreamingSettingsCommand = new RelayCommand(OpenStreamingSettings);
+ ClearCommand = new RelayCommand(Clear);
}
#endregion
@@ -281,7 +311,7 @@ namespace Tango.FSE.Statistics.ViewModels
}
#endregion
-
+
#region Statistics Methods
private async Task LoadFiltersData()
@@ -311,6 +341,7 @@ namespace Tango.FSE.Statistics.ViewModels
filters.StartDateUTC = StartSelectedDate;
filters.EndDateUTC = EndSelectedDate;
filters.EndStatuses = JobRunSelectedStatuses.SynchedSource.Cast<int>().ToList();
+ filters.JobDesignation = JobRunSelectedDesignations.SynchedSource.Cast<int>().ToList();
filters.IncludeHeadCleaning = IncludeHeadCleaning;
filters.JobName = JobName;
filters.ExactJobName = JobNameExact;
@@ -323,6 +354,8 @@ namespace Tango.FSE.Statistics.ViewModels
List<StopModel> stops = new List<StopModel>();
_currentJobIndex = 0;
+ _currentFineTuningSessionID = null;
+ _fineTuningStops = new List<StopModel>();
foreach (var job in _model.StatisticsResult.JobRuns.OrderByDescending(x => x.JobRun.StartDate))
{
@@ -351,7 +384,7 @@ namespace Tango.FSE.Statistics.ViewModels
}
catch (Exception ex)
{
- NotificationProvider.PushErrorReportingSnackbar(ex, "Statistics Module Error", "Error statistics from the remote machine.");
+ NotificationProvider.PushErrorReportingSnackbar(ex, "Statistics Module Error", "Error getting statistics from the remote machine.");
}
}
@@ -361,7 +394,22 @@ namespace Tango.FSE.Statistics.ViewModels
var rmlName = FiltersData.Rmls.FirstOrDefault(x => x.Guid == job.JobRun.RmlGuid)?.Name;
- _currentJobIndex++;
+ VectorFineTuningRunModel fineTuningModel = null;
+
+ if (job.JobRun.JobDesignation == (int)JobDesignations.FineTuning && job.JobRun.FineTuningString != null)
+ {
+ fineTuningModel = JsonConvert.DeserializeObject<VectorFineTuningRunModel>(job.JobRun.FineTuningString);
+ if (fineTuningModel.FineTuningSessionID != _currentFineTuningSessionID)
+ {
+ _fineTuningStops = new List<StopModel>();
+ _currentFineTuningSessionID = fineTuningModel.FineTuningSessionID;
+ _currentJobIndex++;
+ }
+ }
+ else
+ {
+ _currentJobIndex++;
+ }
foreach (var jobSegment in job.Job.Segments)
{
@@ -373,6 +421,20 @@ namespace Tango.FSE.Statistics.ViewModels
stop.SegmentIndex = job.Job.Segments.IndexOf(jobSegment) + 1;
stop.ThreadName = rmlName;
stop.IsAdvancedMode = !BuildProvider.IsTwineRSM && CurrentUser.HasRole(Roles.FSEAdvancedTechnician);
+ stop.FineTuningModel = fineTuningModel;
+
+ if (fineTuningModel != null)
+ {
+ stop.IsFineTuningApproved = fineTuningModel.Approved;
+ stop.IsFineTuningSelected = fineTuningModel.Approved;
+
+ _fineTuningStops.Add(stop);
+
+ if (_fineTuningStops.Exists(x => x.IsFineTuningApproved))
+ {
+ _fineTuningStops.ForEach(x => x.IsFineTuningApproved = true);
+ }
+ }
stop.ColorSpace = jobStop.ColorSpace;
@@ -479,6 +541,12 @@ namespace Tango.FSE.Statistics.ViewModels
return FiltersData.Jobs.Where(x => x != null).Where(x => x.ToLower().Contains(key.ToLower())).ToList();
}
+ private void Clear()
+ {
+ Stops?.Clear();
+ Stats = new StatsModel();
+ }
+
#endregion
#region Stop Commands Handler
@@ -578,7 +646,7 @@ namespace Tango.FSE.Statistics.ViewModels
}
#endregion
-
+
#region CSV Export
private async void ExportToCSV()
@@ -734,6 +802,17 @@ namespace Tango.FSE.Statistics.ViewModels
Stops.Clear();
}
+ if (stops.First().IsFineTuning && stops.First().FineTuningModel != null)
+ {
+ var sessionStop = Stops.Where(x => x.IsFineTuning).FirstOrDefault(x => x.FineTuningModel.FineTuningSessionID == stops[0].FineTuningModel.FineTuningSessionID);
+
+ if (sessionStop != null)
+ {
+ stops.First().JobIndex = sessionStop.JobIndex;
+ stops.First().IsFineTuningApproved = sessionStop.IsFineTuningApproved;
+ }
+ }
+
foreach (var stop in stops)
{
Stops.Insert(0, stop);
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml
index 29d12d773..31dee1093 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml
@@ -21,9 +21,11 @@
<Setter Property="BorderThickness" Value="0 0 0 1"></Setter>
<Setter Property="Margin" Value="15 0 0 -1"></Setter>
<Setter Property="Padding" Value="0"></Setter>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}"></Setter>
+ <Setter Property="BorderThickness" Value="0"></Setter>
</Trigger>
</Style.Triggers>
</Style>
@@ -31,17 +33,36 @@
<DataTemplate x:Key="EmptyColumnTemplate">
<Grid>
<Border Width="30" HorizontalAlignment="Left" Background="{StaticResource FSE_PrimaryBackgroundBrush}" Margin="-28 -10 0 -10" Height="35" />
- <Border Background="{Binding BestMatchBrush,Mode=OneWay}" Width="20" Height="20" HorizontalAlignment="Left" Margin="10 0 0 0">
- <Border.ToolTip>
+ <StackPanel Orientation="Horizontal">
+ <Border Background="{Binding BestMatchBrush,Mode=OneWay}" Width="20" Height="20" HorizontalAlignment="Left" Margin="10 0 0 0">
+ <Border.ToolTip>
+ <TextBlock>
+ <Run FontWeight="SemiBold">Best Match</Run>
+ <LineBreak/>
+ <Run Text="{Binding BestMatchR}"></Run>,
+ <Run Text="{Binding BestMatchG}"></Run>,
+ <Run Text="{Binding BestMatchB}"></Run>
+ </TextBlock>
+ </Border.ToolTip>
+ </Border>
+ <material:PackIcon Margin="-5 0 0 -10" Background="Transparent" ToolTip="Approved" Kind="CheckBold" Foreground="{StaticResource FSE_SuccessBrush}" VerticalAlignment="Center" Visibility="{Binding IsFineTuningSelected,Converter={StaticResource BooleanToVisibilityConverter}}" />
+ </StackPanel>
+
+ <StackPanel Margin="45 0 0 0" HorizontalAlignment="Left" VerticalAlignment="Center" Background="Transparent" Visibility="{Binding IsFineTuning,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <StackPanel.ToolTip>
<TextBlock>
- <Run FontWeight="SemiBold">Best Match</Run>
- <LineBreak/>
- <Run Text="{Binding BestMatchR}"></Run>,
- <Run Text="{Binding BestMatchG}"></Run>,
- <Run Text="{Binding BestMatchB}"></Run>
+ <Run>Measured: </Run><Run/> <Run Text="{Binding FineTuningMeasured,Mode=OneWay}"></Run>
+ <LineBreak/>
+ <Run>Suggested: </Run><Run/> <Run Text="{Binding FineTuningSuggested,Mode=OneWay}"></Run>
</TextBlock>
- </Border.ToolTip>
- </Border>
+ </StackPanel.ToolTip>
+ <TextBlock FontSize="{StaticResource FSE_SmallerFontSize}" Foreground="{StaticResource FSE_GrayBrush}">
+ <Run>Measured:</Run>
+ <Run Text="{Binding FineTuningModel.FineTuningMeasuredL,StringFormat=0.00}"></Run>,
+ <Run Text="{Binding FineTuningModel.FineTuningMeasuredA,StringFormat=0.00}"></Run>,
+ <Run Text="{Binding FineTuningModel.FineTuningMeasuredB,StringFormat=0.00}"></Run>
+ </TextBlock>
+ </StackPanel>
</Grid>
</DataTemplate>
@@ -51,9 +72,11 @@
<Setter Property="BorderThickness" Value="0 0 0 1"></Setter>
<Setter Property="Margin" Value="0 0 0 -1"></Setter>
<Setter Property="Padding" Value="0"></Setter>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}"></Setter>
+ <Setter Property="BorderThickness" Value="0"></Setter>
</Trigger>
</Style.Triggers>
</Style>
@@ -75,29 +98,39 @@
<Border Background="{StaticResource FSE_PrimaryBackgroundLightBrush}" MinHeight="60" BorderBrush="{StaticResource FSE_BorderBrush}" BorderThickness="1">
<Grid>
<StackPanel Margin="10 0 0 0" Orientation="Horizontal">
- <material:PackIcon Background="Transparent" Width="24" Height="24" VerticalAlignment="Center" DataContext="{Binding Items[0].Items[0].JobRun}">
+ <material:PackIcon Background="Transparent" Width="24" Height="24" VerticalAlignment="Center" DataContext="{Binding Items[0].Items[0]}">
<material:PackIcon.Style>
<Style TargetType="material:PackIcon">
<Setter Property="Kind" Value="CheckBold"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_SuccessBrush}"></Setter>
<Setter Property="ToolTip" Value="Completed"></Setter>
<Style.Triggers>
- <DataTrigger Binding="{Binding Status}" Value="1">
+ <DataTrigger Binding="{Binding JobRun.Status}" Value="1">
<Setter Property="Kind" Value="Alert"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_WarningBrush}"></Setter>
<Setter Property="ToolTip" Value="Aborted By User"></Setter>
</DataTrigger>
- <DataTrigger Binding="{Binding Status}" Value="2">
+ <DataTrigger Binding="{Binding JobRun.Status}" Value="2">
<Setter Property="Kind" Value="Alert"></Setter>
<Setter Property="Foreground" Value="{StaticResource FSE_ErrorBrush}"></Setter>
<Setter Property="ToolTip" Value="Failed"></Setter>
</DataTrigger>
+ <DataTrigger Binding="{Binding JobRun.JobDesignation}" Value="2">
+ <Setter Property="Kind" Value="Tune"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource FSE_WarningBrush}"></Setter>
+ <Setter Property="ToolTip" Value="Vector Fine Tuning Session"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsFineTuningApproved}" Value="True">
+ <Setter Property="Kind" Value="Tune"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource FSE_SuccessBrush}"></Setter>
+ <Setter Property="ToolTip" Value="Vector Fine Tuning Session - Approved"></Setter>
+ </DataTrigger>
</Style.Triggers>
</Style>
</material:PackIcon.Style>
</material:PackIcon>
- <TextBlock Margin="10 0 0 0" Width="140" TextWrapping="Wrap" FontWeight="Bold" VerticalAlignment="Center" FontSize="14" Text="{Binding Items[0].Items[0].JobRun.JobName}" />
- <TextBlock Margin="20 0 0 0" Text="{Binding Items[0].Items[0].ThreadName}" VerticalAlignment="Center" Width="100" TextWrapping="Wrap"></TextBlock>
+ <TextBlock Margin="10 0 0 0" Width="140" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" FontWeight="Bold" VerticalAlignment="Center" FontSize="14" Text="{Binding Items[0].Items[0].JobRun.JobName}" />
+ <TextBlock Margin="55 0 0 0" Text="{Binding Items[0].Items[0].ThreadName}" VerticalAlignment="Center" Width="100" TextWrapping="Wrap"></TextBlock>
<TextBlock Margin="20 0 0 0" Text="{Binding Items[0].Items[0].LogicalLength,Mode=OneWay}" Background="Transparent" VerticalAlignment="Center" Width="80">
<TextBlock.ToolTip>
<TextBlock>
@@ -123,10 +156,14 @@
<Run Text="{Binding JobRun.CeVersion,TargetNullValue='N/A'}"></Run>
</TextBlock>
- <Button Command="{Binding ShowExtendedInfoCommand}" CommandParameter="{Binding}" Background="Transparent" Style="{StaticResource FSE_FlatButton_ForegroundAccentHover}" Foreground="{StaticResource FSE_PrimaryAccentBrush}" FontSize="{StaticResource FSE_SmallerFontSize}" Height="Auto" Padding="0" Cursor="Hand" Margin="0 0 0 0">More info...</Button>
+ <Button Command="{Binding ShowExtendedInfoCommand}" CommandParameter="{Binding}" Background="Transparent" Style="{StaticResource FSE_FlatButton_ForegroundAccentHover}" Foreground="{StaticResource FSE_PrimaryAccentBrush}" FontSize="{StaticResource FSE_SmallerFontSize}" Height="Auto" Padding="0" Cursor="Hand" Margin="0 0 0 0" Visibility="{Binding IsFineTuning,Converter={StaticResource BooleanToVisibilityInverseConverter}}">More info...</Button>
</StackPanel>
</Grid>
+ <Grid DataContext="{Binding Items[0].Items[0]}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="45 0 0 5" Visibility="{Binding IsFineTuning,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <TextBlock Foreground="{StaticResource FSE_GrayBrush}" FontSize="{StaticResource FSE_SmallerFontSize}" FontStyle="Italic" Text="Vector Fine Tuning"></TextBlock>
+ </Grid>
+
<controls:IconButton DataContext="{Binding Items[0].Items[0]}" Command="{Binding ShowFailedMessageCommand}" CommandParameter="{Binding}" Width="32" Height="32" ToolTip="Show failure reason" Cursor="Hand" HorizontalAlignment="Right" VerticalAlignment="Center" Icon="MessageAlert" Foreground="{StaticResource FSE_ErrorBrush}" Margin="0 0 10 0">
<controls:IconButton.Style>
<Style TargetType="controls:IconButton" BasedOn="{StaticResource {x:Type controls:IconButton}}">
@@ -153,15 +190,29 @@
<GroupStyle.HeaderTemplate>
<DataTemplate>
<StackPanel>
- <Border Margin="20 0 0 0" Background="#383838" Padding="0 5" BorderBrush="{StaticResource FSE_PrimaryBackgroundMidBrush}" BorderThickness="0 0 0 1">
- <StackPanel Orientation="Horizontal">
- <TextBlock Margin="10 0 0 0" FontWeight="Bold" VerticalAlignment="Center" Foreground="{StaticResource FSE_GrayBrush}">
+ <Border Margin="20 0 0 0" Background="#383838" Padding="0 5" BorderBrush="{StaticResource FSE_PrimaryBackgroundMidBrush}" BorderThickness="0 0 0 1" Height="28">
+ <Grid>
+ <StackPanel DataContext="{Binding Items[0]}" Orientation="Horizontal" Visibility="{Binding IsFineTuning,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
+ <TextBlock Margin="10 0 0 0" FontWeight="Bold" VerticalAlignment="Center" Foreground="{StaticResource FSE_GrayBrush}">
<Run>Segment</Run>
- <Run Text="{Binding Name,Mode=OneWay}"></Run>
- </TextBlock>
+ <Run Text="{Binding SegmentIndex,Mode=OneWay}"></Run>
+ </TextBlock>
- <TextBlock Margin="233 0 0 0" Text="{Binding Items[0].Segment.Length,StringFormat=N1}" VerticalAlignment="Center" Width="80" Foreground="{StaticResource FSE_GrayBrush}" FontSize="12"></TextBlock>
- </StackPanel>
+ <TextBlock Margin="233 0 0 0" Text="{Binding Segment.Length,StringFormat=N1}" VerticalAlignment="Center" Width="80" Foreground="{StaticResource FSE_GrayBrush}" FontSize="12"></TextBlock>
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal" Visibility="{Binding Items[0].IsFineTuning,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <TextBlock Margin="10 0 0 0" FontWeight="Bold" VerticalAlignment="Center" Foreground="{StaticResource FSE_GrayBrush}">
+ <Run Text="{Binding Items.Count,Mode=OneWay}"></Run>
+ <Run>Trials</Run>
+ </TextBlock>
+
+ <TextBlock Margin="20 0 0 0" FontWeight="Bold" VerticalAlignment="Center" Foreground="{StaticResource FSE_GrayBrush}">
+ <Run>Target: </Run>
+ <Run Text="{Binding Items[0].FineTuningTarget,Mode=OneWay}"></Run>
+ </TextBlock>
+ </StackPanel>
+ </Grid>
</Border>
</StackPanel>
</DataTemplate>
@@ -184,13 +235,13 @@
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
- <DataGridTemplateColumn Header=" NAME" Width="190" CellStyle="{StaticResource EmptyColumnStyle}" CellTemplate="{StaticResource EmptyColumnTemplate}" />
+ <DataGridTemplateColumn Header=" NAME" Width="225" CellStyle="{StaticResource EmptyColumnStyle}" CellTemplate="{StaticResource EmptyColumnTemplate}" />
<DataGridTextColumn Header="THREAD" Width="120" CellStyle="{StaticResource EmptyColumnStyle2}" />
<DataGridTextColumn Header="LENGTH" Width="80" CellStyle="{StaticResource EmptyColumnStyle2}" />
<DataGridTextColumn Header="START TIME" Width="120" CellStyle="{StaticResource EmptyColumnStyle2}" />
<DataGridTextColumn Header="DURATION" Width="100" CellStyle="{StaticResource EmptyColumnStyle2}" />
- <DataGridTextColumn Header="END POSITION" Width="120" CellStyle="{StaticResource EmptyColumnStyle2}" />
- <DataGridTextColumn Header="OFFSET" Width="90" Binding="{Binding StartMeters}" />
+ <DataGridTextColumn Header="END POINT" Width="100" CellStyle="{StaticResource EmptyColumnStyle2}" />
+ <DataGridTextColumn Header="OFFSET" Width="75" Binding="{Binding StartMeters}" />
<DataGridTextColumn Header="COLOR SPACE" Width="120" Binding="{Binding ColorSpace}" />
<DataGridTextColumn Header="INPUT" Width="150" Binding="{Binding Input}" />
<DataGridTemplateColumn Header="OUTPUT" Width="*">
@@ -218,6 +269,8 @@
</TextBlock>
</Grid>
</StackPanel>
+
+ <Button Command="{Binding ShowExtendedInfoCommand}" CommandParameter="{Binding}" Background="Transparent" Style="{StaticResource FSE_FlatButton_ForegroundAccentHover}" Foreground="{StaticResource FSE_PrimaryAccentBrush}" FontSize="{StaticResource FSE_SmallerFontSize}" Height="Auto" Padding="0" Cursor="Hand" Margin="0 0 0 0" Visibility="{Binding IsFineTuning,Converter={StaticResource BooleanToVisibilityConverter}}" HorizontalAlignment="Right">More info...</Button>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
@@ -266,6 +319,11 @@
<material:PackIcon Kind="FileCsv" />
</MenuItem.Icon>
</MenuItem>
+ <MenuItem Header="Clear Data" Command="{Binding ClearCommand}">
+ <MenuItem.Icon>
+ <material:PackIcon Kind="Recycle" />
+ </MenuItem.Icon>
+ </MenuItem>
</MenuItem>
<MenuItem Header="Tools">
<MenuItem Header="Streaming" Command="{Binding OpenStreamingSettingsCommand}">
@@ -279,8 +337,8 @@
<DockPanel>
<Button DockPanel.Dock="Bottom" Command="{Binding GetStatisticsCommand}" HorizontalAlignment="Center" Width="250" Style="{StaticResource FSE_Button_Polygon}" Height="40" FontSize="14" Margin="0 20 0 30" IsEnabled="{Binding MachineProvider.IsPPCAvailable}">Get Statistics</Button>
- <ScrollViewer IsEnabled="{Binding IsFiltersAvailable}" Margin="0 30 0 0" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
- <Border Padding="20">
+ <ScrollViewer IsEnabled="{Binding IsFiltersAvailable}" Margin="0 10 0 0" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
+ <Border Padding="20 0 20 20">
<StackPanel VerticalAlignment="Top">
<StackPanel>
<GroupBox Padding="5 0 0 0" Style="{StaticResource FSE_Game_GroupBox}" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}">
@@ -311,6 +369,13 @@
<controls:SelectionComboBox Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" Margin="-5 0 0 0" Width="Auto" ItemsSource="{Binding JobRunSelectedStatuses}" FontSize="{StaticResource FSE_SmallFontSize}" />
</GroupBox>
+ <GroupBox Margin="0 30 0 0" Padding="5 0 0 0" Style="{StaticResource FSE_Game_GroupBox}" Height="49" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}">
+ <GroupBox.Header>
+ <TextBox FontSize="{StaticResource FSE_SmallerFontSize}">Kind</TextBox>
+ </GroupBox.Header>
+ <controls:SelectionComboBox Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" Margin="-5 0 0 0" Width="Auto" ItemsSource="{Binding JobRunSelectedDesignations}" FontSize="{StaticResource FSE_SmallFontSize}" />
+ </GroupBox>
+
<GroupBox Margin="0 30 0 0" Padding="5 0 0 0" Style="{StaticResource FSE_Game_GroupBox}" Height="55" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}">
<GroupBox.Header>
<TextBox FontSize="{StaticResource FSE_SmallerFontSize}">Job</TextBox>
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/SelectionComboBox.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/SelectionComboBox.xaml
index 551693f2f..08a94663d 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/SelectionComboBox.xaml
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/SelectionComboBox.xaml
@@ -58,7 +58,7 @@
</DockPanel>
<DockPanel Margin="2 0 0 5" DockPanel.Dock="Top">
<CheckBox IsChecked="{Binding RelativeSource={RelativeSource AncestorType=local:SelectionComboBox},Path=AllSelected}" />
- <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" Text="All"></TextBlock>
+ <TextBlock VerticalAlignment="Center" Margin="7 0 0 0" Text="All"></TextBlock>
</DockPanel>
<ListBox Style="{StaticResource FSE_BlankListBox}" Padding="0" Margin="0" BorderThickness="0" HorizontalAlignment="Stretch" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=local:SelectionComboBox},Path=ItemsSource}" MaxHeight="200" DisplayMemberPath="Data" HorizontalContentAlignment="Stretch">
<ListBox.ItemTemplate>
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 596eb9316..752ae08b2 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
@@ -1,6 +1,8 @@
-using System;
+using Newtonsoft.Json;
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.Data.Entity;
using System.IO;
using System.Linq;
using System.Text;
@@ -12,6 +14,7 @@ using Tango.BL;
using Tango.BL.Builders;
using Tango.BL.Entities;
using Tango.BL.Enumerations;
+using Tango.BL.FineTuning;
using Tango.Core;
using Tango.Core.Commands;
using Tango.Core.DI;
@@ -38,6 +41,7 @@ namespace Tango.PPC.Jobs.Dialogs
public class VectorFineTuningDialogVM : DialogViewVM
{
private JobHandler _handler;
+ private String _sessionID;
#region Properties
@@ -68,7 +72,7 @@ namespace Tango.PPC.Jobs.Dialogs
/// </summary>
[TangoInject]
public IPrintingManager PrintingManager { get; set; }
-
+
[TangoInject]
public INavigationManager NavigationManager { get; set; }
@@ -236,7 +240,7 @@ namespace Tango.PPC.Jobs.Dialogs
}
}
}
-
+
protected Double _cyan;
/// <summary>
@@ -371,11 +375,11 @@ namespace Tango.PPC.Jobs.Dialogs
get { return _selectedLog; }
set
{
-
- _selectedLog = value;
- RaisePropertyChangedAuto();
- OKCommand.RaiseCanExecuteChanged();
-
+
+ _selectedLog = value;
+ RaisePropertyChangedAuto();
+ OKCommand.RaiseCanExecuteChanged();
+
}
}
@@ -394,14 +398,16 @@ namespace Tango.PPC.Jobs.Dialogs
public bool IsJobRunning
{
get { return _isJobRunning; }
- set { _isJobRunning = value;
+ set
+ {
+ _isJobRunning = value;
RaisePropertyChangedAuto();
- Application.Current.Dispatcher.Invoke(() =>
- {
- OKCommand.RaiseCanExecuteChanged();
- RaisePropertyChanged(nameof(IsDisableInputLAB));
- });
- }
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ OKCommand.RaiseCanExecuteChanged();
+ RaisePropertyChanged(nameof(IsDisableInputLAB));
+ });
+ }
}
private bool _isJobFailed;
@@ -455,7 +461,7 @@ namespace Tango.PPC.Jobs.Dialogs
TestCommand = new RelayCommand(StartJob, CanStartJob);
StopCommand = new RelayCommand(StopTest);
DeleteTrialCommand = new RelayCommand(DeleteTrialLog);
- PressedCommand = new RelayCommand((x)=>{ });;
+ PressedCommand = new RelayCommand((x) => { }); ;
IsExpanderOpened = true;
@@ -464,16 +470,19 @@ namespace Tango.PPC.Jobs.Dialogs
public void Init(BrushStopModel brushstop, double l, double a, double b, System.Windows.Media.Color targetColor)
{
+ _sessionID = brushstop.Guid + $"{l}{a}{b}";
+
MachineProvider.MachineOperator.PrintingStarted += MachineOperator_PrintingStarted;
MachineProvider.MachineOperator.PrintingEnded += MachineOperator_PrintingEnded;
MachineProvider.MachineOperator.PrintingCompleted += MachineOperator_PrintingCompleted;
+ MachineProvider.MachineOperator.JobRunsLogger.JobRunAvailable += JobRunsLogger_JobRunAvailable;
BrushStopModel = brushstop.Clone();
BrushStopModel.Guid = brushstop.Guid;
TargetL = l;
TargetB = b;
TargetA = a;
-
+
TargetColor = targetColor;
BrushStopModel.ConvertColorToVolume();
@@ -497,18 +506,18 @@ namespace Tango.PPC.Jobs.Dialogs
TrialsLogitems = new SynchronizedObservableCollection<TrialsLogModel>();
TrialsLogitems.Add(ActiveLogModel);
//TEST
- //for(int i = 1; i < 10; i++)
- //{
- // var model = new TrialsLogModel(i , Cyan, Magenta, Yellow, Black);
- // TrialsLogitems.Insert(0, model);
- //}
-
+ //for(int i = 1; i < 10; i++)
+ //{
+ // var model = new TrialsLogModel(i , Cyan, Magenta, Yellow, Black);
+ // TrialsLogitems.Insert(0, model);
+ //}
+
}
else
{
- TrialsLogitems = new SynchronizedObservableCollection<TrialsLogModel>(TestColor.TrialslogList.OrderByDescending(x=>x.TrialNumber));
-
- int maxTrialsNumber = TrialsLogitems.Max( x=>x.TrialNumber);
+ TrialsLogitems = new SynchronizedObservableCollection<TrialsLogModel>(TestColor.TrialslogList.OrderByDescending(x => x.TrialNumber));
+
+ int maxTrialsNumber = TrialsLogitems.Max(x => x.TrialNumber);
ActiveLogModel = TrialsLogitems.FirstOrDefault(x => x.TrialNumber == maxTrialsNumber);
if (ActiveLogModel == null)
{
@@ -520,7 +529,7 @@ namespace Tango.PPC.Jobs.Dialogs
}
if (ActiveLogModel.IsTested == false)
{
- if(ActiveLogModel.L != null)
+ if (ActiveLogModel.L != null)
{
MeasuredL = ActiveLogModel.L;
}
@@ -537,13 +546,13 @@ namespace Tango.PPC.Jobs.Dialogs
ActiveLogModel.IsActiveTrial = true;
ActiveLogModel.IsSelectionEnable = true;
-
+
var minValue = TrialsLogitems.Min(x => x.DeltaE);
- if(minValue != null && minValue < 2)
+ if (minValue != null && minValue < 2)
{
- TrialsLogitems.Where(x=>x.DeltaE == minValue).ToList().ForEach(i => i.IsBest = true);
+ TrialsLogitems.Where(x => x.DeltaE == minValue).ToList().ForEach(i => i.IsBest = true);
}
-
+
OKCommand.RaiseCanExecuteChanged();
TestCommand.RaiseCanExecuteChanged();
@@ -580,8 +589,8 @@ namespace Tango.PPC.Jobs.Dialogs
// Filter = ExplorerFileDefinition.PDFFile.Extension,
// Title = "Save Color Correction Report",
// });
-
- // if (result != null)
+
+ // if (result != null)
{
DateTime reportDateTime = DateTime.UtcNow.ToLocalTime();
ColorCorrectionRepotVM vm = new ColorCorrectionRepotVM()
@@ -606,13 +615,13 @@ namespace Tango.PPC.Jobs.Dialogs
PdfWpfWriter writer = new PdfWpfWriter();
writer.AddElement(new ColorCorrectionReport() { DataContext = vm });
string path = StorageProvider.Drive.Name + "\\Color Correction Report_" + reportDateTime.ToString(@"MM_dd_y_HH_mm") + ExplorerFileDefinition.PDFFile.Extension;
- if(File.Exists(path))
+ if (File.Exists(path))
{
path = StorageProvider.Drive.Name + "\\Color Correction Report_" + reportDateTime.ToString(@"MM_dd_y_HH_mm") + "_1" + ExplorerFileDefinition.PDFFile.Extension;
}
writer.Save(path);
await NotificationProvider.ShowSuccess("Color Correction Report saved successfully.");
- LogManager.Log( $"Color Correction Report saved successfully to file {path}.");
+ LogManager.Log($"Color Correction Report saved successfully to file {path}.");
}
catch (Exception ex)
{
@@ -630,7 +639,7 @@ namespace Tango.PPC.Jobs.Dialogs
{
return;
}
- ActiveLogModel = TrialsLogitems.FirstOrDefault(x=> x.TrialNumber == 0);
+ ActiveLogModel = TrialsLogitems.FirstOrDefault(x => x.TrialNumber == 0);
ActiveLogModel.L = ActiveLogModel.A = ActiveLogModel.B = null;
ActiveLogModel.NewSuggestionL = ActiveLogModel.NewSuggestionA = ActiveLogModel.NewSuggestionB = 0;
ActiveLogModel.DeltaE = null;
@@ -650,22 +659,22 @@ namespace Tango.PPC.Jobs.Dialogs
private void DeleteTrialLog(object obj)
{
- if (SelectedLog != null )
+ if (SelectedLog != null)
{
- if (SelectedLog.TrialNumber != 0 )
+ if (SelectedLog.TrialNumber != 0)
{
bool isLastItem = (TrialsLogitems.Count - 1) == SelectedLog.TrialNumber;
TrialsLogitems.Remove(SelectedLog);
-
+
int trialNumber = 0;
- foreach ( var trial in TrialsLogitems.OrderBy(x=>x.TrialNumber))
+ foreach (var trial in TrialsLogitems.OrderBy(x => x.TrialNumber))
{
trial.TrialNumber = trialNumber;
trialNumber++;
}
- var max = TrialsLogitems.Max(x=>x.TrialNumber);
+ var max = TrialsLogitems.Max(x => x.TrialNumber);
ActiveLogModel = TrialsLogitems.FirstOrDefault(x => x.TrialNumber == max);
- if(isLastItem)
+ if (isLastItem)
{
ActiveLogModel.IsTested = false;
_measuredL = ActiveLogModel.L;
@@ -682,7 +691,7 @@ namespace Tango.PPC.Jobs.Dialogs
TestColor.TrialslogList.AddRange(TrialsLogitems);
TrialsLogEngine.Default.UpdateTest(TestColor);
}
-
+
RaisePropertyChanged(nameof(IsDisableInputLAB));
SelectedLog = null;
var minDelataE = TrialsLogitems.Min(x => x.DeltaE);
@@ -690,7 +699,7 @@ namespace Tango.PPC.Jobs.Dialogs
TrialsLogitems.ToList().ForEach(x => x.IsBest = (x.DeltaE == minDelataE));
RaisePropertyChanged(nameof(TrialNumber));
}
- else if( TrialsLogitems.Count == 1)
+ else if (TrialsLogitems.Count == 1)
{
ActiveLogModel.L = ActiveLogModel.A = ActiveLogModel.B = null;
ActiveLogModel.NewSuggestionL = ActiveLogModel.NewSuggestionA = ActiveLogModel.NewSuggestionB = 0;
@@ -715,44 +724,66 @@ namespace Tango.PPC.Jobs.Dialogs
protected override async void Accept()
{
- if(IsBusy)
+ if (IsBusy)
return;
IsBusy = true;
OnClose();
-
- if(SelectedLog.TrialNumber == 0 )
+
+ if (SelectedLog.TrialNumber == 0)
{
IsBusy = false;
base.Accept();
return;
}
- var prevtrial = TrialsLogitems.FirstOrDefault( x=> x.TrialNumber == (SelectedLog.TrialNumber -1));
- if(prevtrial != null && prevtrial.DeltaE >=2)
+ var prevtrial = TrialsLogitems.FirstOrDefault(x => x.TrialNumber == (SelectedLog.TrialNumber - 1));
+ if (prevtrial != null && prevtrial.DeltaE >= 2)
{
- if( false == await NotificationProvider.ShowQuestion("Please note that the color you have chosen is not the closest one."))
+ if (false == await NotificationProvider.ShowQuestion("Please note that the color you have chosen is not the closest one."))
{
IsBusy = false;
return;
}
}
-
+
BrushStopModel.PreventPropertyUpdate = true;
BrushStopModel.Cyan = SelectedLog.C;
BrushStopModel.Magenta = SelectedLog.M;
BrushStopModel.Yellow = SelectedLog.Y;
BrushStopModel.PreventPropertyUpdate = false;
BrushStopModel.Black = SelectedLog.K;
-
+
BrushStopModel.PreventPropertyUpdate = true;
BrushStopModel.L = SelectedLog.SuggestionL;
BrushStopModel.A = SelectedLog.SuggestionA;
BrushStopModel.B = SelectedLog.SuggestionB;
BrushStopModel.PreventPropertyUpdate = false;
-
+
+
+
if (TestColor != null)
{
TrialsLogEngine.Default.Delete(TestColor);
}
+
+ try
+ {
+ using (ObservablesContext db = ObservablesContext.CreateDefault())
+ {
+ var selectedRun = await db.JobRuns.FirstOrDefaultAsync(x => x.Guid == SelectedLog.JobRunGuid);
+ if (selectedRun != null)
+ {
+ VectorFineTuningRunModel model = JsonConvert.DeserializeObject<VectorFineTuningRunModel>(selectedRun.FineTuningString);
+ model.Approved = true;
+ selectedRun.FineTuningString = JsonConvert.SerializeObject(model);
+ await db.SaveChangesAsync();
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error updating the selected job run fine tuning db entry.");
+ }
+
IsBusy = false;
base.Accept();
}
@@ -761,7 +792,7 @@ namespace Tango.PPC.Jobs.Dialogs
{
OnClose();
- if (TestColor != null )
+ if (TestColor != null)
{
if (TrialsLogitems.Count > 0)
{
@@ -776,7 +807,7 @@ namespace Tango.PPC.Jobs.Dialogs
//else
// TrialsLogEngine.Default.Delete(TestColor);
}
- else if(TrialsLogitems.Count > 0)
+ else if (TrialsLogitems.Count > 0)
{
TestColor = new TestColor();
TestColor.BrushStopGuid = BrushStopModel.Guid;
@@ -794,6 +825,7 @@ namespace Tango.PPC.Jobs.Dialogs
MachineProvider.MachineOperator.PrintingStarted -= MachineOperator_PrintingStarted;
MachineProvider.MachineOperator.PrintingEnded -= MachineOperator_PrintingEnded;
MachineProvider.MachineOperator.PrintingCompleted -= MachineOperator_PrintingCompleted;
+ MachineProvider.MachineOperator.JobRunsLogger.JobRunAvailable -= JobRunsLogger_JobRunAvailable;
}
private bool IsValidLAB()
@@ -805,7 +837,7 @@ namespace Tango.PPC.Jobs.Dialogs
return true;
}
- private void OnLABChanged()
+ private void OnLABChanged()
{
if (ActiveLogModel == null)
return;
@@ -822,7 +854,7 @@ namespace Tango.PPC.Jobs.Dialogs
//{
// await NotificationProvider.ShowInfo("Color is out of gamut!");
//}
-
+
var deltaE = DeltaE_CMC(TargetL, TargetA, TargetB, (double)MeasuredL, (double)MeasuredA, (double)MeasuredB);
ActiveLogModel.DeltaE = deltaE;
ValidationTests();
@@ -838,22 +870,24 @@ namespace Tango.PPC.Jobs.Dialogs
{
if (ActiveLogModel.DeltaE <= 0.5)
{
- if(true == await NotificationProvider.ShowQuestion("Previous trial seems to be very close; no more trials are recommended"))
+ if (true == await NotificationProvider.ShowQuestion("Previous trial seems to be very close; no more trials are recommended"))
return;
}
BrushStopModel.PreventPropertyUpdate = true;
-
- CalculateSuggestionLAB( ActiveLogModel);
-
+
+ CalculateSuggestionLAB(ActiveLogModel);
+
BrushStopModel.PreventPropertyUpdate = true;
BrushStopModel.L = ActiveLogModel.NewSuggestionL;
BrushStopModel.A = ActiveLogModel.NewSuggestionA;
BrushStopModel.B = ActiveLogModel.NewSuggestionB;
BrushStopModel.PreventPropertyUpdate = false;
-
+
+
+
//calculate CMYK
BrushStopModel.FineTuningConverter();
- if(BrushStopModel.IsOutOfGamut)
+ if (BrushStopModel.IsOutOfGamut)
{
ActiveLogModel.NewSuggestionL = BrushStopModel.L;
ActiveLogModel.NewSuggestionA = BrushStopModel.A;
@@ -866,20 +900,21 @@ namespace Tango.PPC.Jobs.Dialogs
using (ObservablesContext db = ObservablesContext.CreateDefault())
{
Job job = new Job();
+ job.Guid = BrushStopModel.SegmentModel.Job.Guid;
+ job.ID = BrushStopModel.SegmentModel.Job.ID;
job.EnableLubrication = true;
job.Designation = JobDesignations.FineTuning;
job.Machine = await new MachineBuilder(db).Set(MachineProvider.Machine.Guid).WithConfiguration().WithSpools().WithCats().WithVersion().BuildAsync();
var trialNumber = ActiveLogModel.TrialNumber + 1;
- job.Name = $"Manual color test #{trialNumber}";
+ job.Name = BrushStopModel.SegmentModel.Job.Name;
job.Rml = await new RmlBuilder(db).Set(BrushStopModel.SegmentModel.Job.Rml.Guid).WithActiveParametersGroup().WithCAT(MachineProvider.Machine.Guid).WithCCT().WithGbdAndLub().WithLiquidFactors().WithSpools().BuildAsync();
job.SpoolType = db.SpoolTypes.FirstOrDefault(x => x.Guid == settings.SpoolTypeGuid);
job.WindingMethod = db.WindingMethods.FirstOrDefault();
-
-
+ job.VectorFineTuningRunModel = CreateFineTuningRunModel();
Segment segment = new Segment();
- segment.Name = "Standard Segment";
+ segment.Name = "VFT Segment";
segment.Length = settings.FineTuningTrialLengthMeters;
segment.Job = job;
segment.JobGuid = job.Guid;
@@ -891,6 +926,14 @@ namespace Tango.PPC.Jobs.Dialogs
stop.ColorSpace = db.ColorSpaces.FirstOrDefault(x => x.Code == (int)ColorSpaces.Volume);
stop.SetLiquidVolumes(job.Machine.Configuration, job.Rml, job.Rml.GetActiveProcessGroup().ProcessParametersTables.FirstOrDefault());
+ stop.BestMatchR = BrushStopModel.BestMatchRed;
+ stop.BestMatchG = BrushStopModel.BestMatchGreen;
+ stop.BestMatchB = BrushStopModel.BestMatchBlue;
+
+ stop.L = BrushStopModel.L;
+ stop.A = BrushStopModel.A;
+ stop.B = BrushStopModel.B;
+
stop.SetVolume(LiquidTypes.Cyan, BrushStopModel.Cyan);
stop.SetVolume(LiquidTypes.Magenta, BrushStopModel.Magenta);
stop.SetVolume(LiquidTypes.Yellow, BrushStopModel.Yellow);
@@ -932,7 +975,7 @@ namespace Tango.PPC.Jobs.Dialogs
IsJobFailed = false;
IsJobRunning = true;
});
-
+
//e.JobHandler.CanCancelChanged += JobHandler_CanCancelChanged;
}
}
@@ -982,7 +1025,7 @@ namespace Tango.PPC.Jobs.Dialogs
private void MachineOperator_PrintingEnded(object sender, PrintingEventArgs e)
{
-
+
}
private void MachineOperator_PrintingCompleted(object sender, PrintingEventArgs e)
@@ -1049,9 +1092,9 @@ namespace Tango.PPC.Jobs.Dialogs
ActiveLogModel.SuggestionA = suggestionA;
ActiveLogModel.SuggestionB = suggestionB;
TrialsLogitems.Insert(0, ActiveLogModel);
- var minDelataE = TrialsLogitems.Min(x=>x.DeltaE);
- if(minDelataE != null && minDelataE < 2)
- TrialsLogitems.ToList().ForEach( x=> x.IsBest = (x.DeltaE == minDelataE));
+ var minDelataE = TrialsLogitems.Min(x => x.DeltaE);
+ if (minDelataE != null && minDelataE < 2)
+ TrialsLogitems.ToList().ForEach(x => x.IsBest = (x.DeltaE == minDelataE));
RaisePropertyChanged(nameof(TrialsLogitems));
_measuredL = null;
@@ -1143,7 +1186,7 @@ namespace Tango.PPC.Jobs.Dialogs
return Math.Sqrt(Math.Pow(L1 - L2, 2) + Math.Pow(a1 - a2, 2) + Math.Pow(b1 - b2, 2));
}
- private async void ValidationTests()
+ private async void ValidationTests()
{
//if (ActiveLogModel.DeltaE <= 0.5)
//{
@@ -1151,25 +1194,25 @@ namespace Tango.PPC.Jobs.Dialogs
// return ;
//}
if (TrialsLogitems.Count == 1 || ActiveLogModel.DeltaE == null)
- return ;
+ return;
int currentTrialNumber = ActiveLogModel.TrialNumber;
- if(TrialsLogitems.Count >= 3)
+ if (TrialsLogitems.Count >= 3)
{
- var item = TrialsLogitems.FirstOrDefault( x=>x.TrialNumber == currentTrialNumber - 2);
+ 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)
+ 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)
+ 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 ;
+ 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)
+ 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;
@@ -1180,7 +1223,7 @@ namespace Tango.PPC.Jobs.Dialogs
{
var item = TrialsLogitems.FirstOrDefault(x => x.TrialNumber == currentTrialNumber - 1);
var item1 = ActiveLogModel;
- if(item == null || item1 == null)
+ if (item == null || item1 == null)
return;
var deltaE_reg = DeltaE_regular(TargetL, TargetA, TargetB, (double)MeasuredL, (double)MeasuredA, (double)MeasuredB);
@@ -1190,7 +1233,7 @@ namespace Tango.PPC.Jobs.Dialogs
await NotificationProvider.ShowInfo("It seems that we can’t get you any closer");
return;
}
- if(Math.Abs((double)item1.C - (double)item.C) < 0.1
+ if (Math.Abs((double)item1.C - (double)item.C) < 0.1
&& Math.Abs((double)item1.M - (double)item.M) < 0.1
&& Math.Abs((double)item1.Y - (double)item.Y) < 0.1
&& Math.Abs((double)item1.K - (double)item.K) < 0.1)
@@ -1202,13 +1245,13 @@ namespace Tango.PPC.Jobs.Dialogs
return;
}
- private bool CalculateSuggestionLAB( TrialsLogModel trial)
+ private bool CalculateSuggestionLAB(TrialsLogModel trial)
{
- if(MeasuredL != null && MeasuredA != null && MeasuredB != null)
+ if (MeasuredL != null && MeasuredA != null && MeasuredB != null)
{
- trial.NewSuggestionL = LimitToRange((trial.SuggestionL + (TargetL - (double)MeasuredL)),0, 100) ;
+ trial.NewSuggestionL = LimitToRange((trial.SuggestionL + (TargetL - (double)MeasuredL)), 0, 100);
trial.NewSuggestionA = LimitToRange((trial.SuggestionA + (TargetA - (double)MeasuredA)), -128, 127);
- trial.NewSuggestionB = LimitToRange((trial.SuggestionB + (TargetB - (double)MeasuredB )), -128, 127);
+ trial.NewSuggestionB = LimitToRange((trial.SuggestionB + (TargetB - (double)MeasuredB)), -128, 127);
LogManager.Log($" Fine Tuning. Suggestion (calculated) LAB L:'{trial.NewSuggestionL}'A:'{trial.NewSuggestionA}' B:'{trial.NewSuggestionB}'.");
return true;
@@ -1231,5 +1274,38 @@ namespace Tango.PPC.Jobs.Dialogs
#endregion
+ #region JobRun Extensions
+
+ private VectorFineTuningRunModel CreateFineTuningRunModel()
+ {
+ VectorFineTuningRunModel model = new VectorFineTuningRunModel();
+
+ model.FineTuningSessionID = _sessionID;
+ model.FineTuningTrialNumber = ActiveLogModel.TrialNumber + 1;
+ model.JobName = BrushStopModel.SegmentModel.Job.Name;
+
+ model.FineTuningTargetL = TargetL;
+ model.FineTuningTargetA = TargetA;
+ model.FineTuningTargetB = TargetB;
+
+ model.FineTuningSuggestionL = BrushStopModel.L;
+ model.FineTuningSuggestionA = BrushStopModel.A;
+ model.FineTuningSuggestionB = BrushStopModel.B;
+
+ model.FineTuningMeasuredL = MeasuredL;
+ model.FineTuningMeasuredA = MeasuredA;
+ model.FineTuningMeasuredB = MeasuredB;
+
+ return model;
+ }
+
+ private void JobRunsLogger_JobRunAvailable(object sender, Integration.JobRuns.JobRunAvailableEventArgs e)
+ {
+ ActiveLogModel.JobRunGuid = e.JobRun.Guid;
+ }
+
+
+ #endregion
+
}
}
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 f4a239c98..2a347df3d 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
@@ -17,6 +17,7 @@ using Tango.Core.ExtensionMethods;
using Newtonsoft.Json;
using Tango.Settings;
using Tango.PPC.Common;
+using Tango.PMR.ColorLab;
namespace Tango.PPC.Jobs.Models
{
@@ -375,6 +376,10 @@ namespace Tango.PPC.Jobs.Models
}
}
+ public int BestMatchRed { get; set; }
+ public int BestMatchGreen { get; set; }
+ public int BestMatchBlue { get; set; }
+
protected Double _offsetpercent;
/// <summary>
@@ -1405,10 +1410,13 @@ namespace Tango.PPC.Jobs.Models
ColorSpaces colorSpace = ColorSpaces.LAB;
BrushStop stop = CreateBrushStop(colorSpace);
+
+ ConversionOutput output = null;
+
try
{
IsBusy = true;
- var output = _converter.Convert(stop, SegmentModel.Job.Machine.Configuration, SegmentModel.Job.Rml, false, false, false);
+ 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);
@@ -1424,7 +1432,11 @@ namespace Tango.PPC.Jobs.Models
_l = output.SingleCoordinates.L;
_a = output.SingleCoordinates.A;
_b = output.SingleCoordinates.B;
- }
+ }
+
+ BestMatchRed = output.SingleCoordinates.Red;
+ BestMatchGreen = output.SingleCoordinates.Green;
+ BestMatchBlue = output.SingleCoordinates.Blue;
}
catch (Exception ex)
{
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs
index 2176b230a..d2ad7e96b 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs
@@ -20,6 +20,10 @@ namespace Tango.PPC.Jobs.Models
#region Properties
+ public String Guid { get; set; }
+
+ public int ID { get; set; }
+
protected String _name;
public String Name
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 a4913dbef..bae1df037 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
@@ -12,6 +12,9 @@ namespace Tango.PPC.Jobs.Models
{
#region Properties
+ [BsonIgnore]
+ public String JobRunGuid { get; set; }
+
private int _trialNumber;
public int TrialNumber
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 3e94a42c5..60db14e21 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
@@ -515,6 +515,8 @@ namespace Tango.PPC.Jobs.ViewModels
var jobModel = new JobModel(ColorSpaces)
{
Name = Job.Name,
+ Guid = Job.Guid,
+ ID = Job.ID,
CreationDate = Job.CreationDate,
LengthPercentageFactor = Job.LengthPercentageFactor,
NumberOfUnits = Job.NumberOfUnits,
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/MainViewVM.cs
index 769a9a5c9..1ceb47ebd 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/MainViewVM.cs
@@ -143,11 +143,11 @@ namespace Tango.PPC.Jobs.ViewModels
}
else if (e.Job.Designation == BL.Enumerations.JobDesignations.FineTuning)
{
- NotificationProvider.PushNotification(new MessageNotificationItem(String.Format("'{0}' fine tuning completed successfully", e.Job.Name), "Tap to approve or repeat.", MessageNotificationItem.MessageNotificationItemTypes.Success, () =>
- {
- NavigationManager.NavigateWithObject<JobsV2Module, JobView, JobNavigationObject>(new JobNavigationObject() { Job = e.Job, Intent = JobNavigationIntent.FineTuning });
- NavigationManager.ClearHistoryExcept<JobsView>();
- }));
+ //NotificationProvider.PushNotification(new MessageNotificationItem(String.Format("'{0}' fine tuning completed successfully", e.Job.Name), "Tap to approve or repeat.", MessageNotificationItem.MessageNotificationItemTypes.Success, () =>
+ //{
+ // NavigationManager.NavigateWithObject<JobsV2Module, JobView, JobNavigationObject>(new JobNavigationObject() { Job = e.Job, Intent = JobNavigationIntent.FineTuning });
+ // NavigationManager.ClearHistoryExcept<JobsView>();
+ //}));
}
else
{
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Statistics/DefaultStatisticsService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Statistics/DefaultStatisticsService.cs
index f699f4a7e..a275d95bb 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Statistics/DefaultStatisticsService.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Statistics/DefaultStatisticsService.cs
@@ -117,6 +117,12 @@ namespace Tango.PPC.Common.Statistics
db_JobRuns = db_JobRuns.Where(x => jobRunStatusArr.Contains(x.Status));
}
+ int[] jobDesignationArr = filters.JobDesignation.Distinct().ToArray();
+ if (jobDesignationArr.Length > 0)
+ {
+ db_JobRuns = db_JobRuns.Where(x => jobDesignationArr.Contains(x.JobDesignation));
+ }
+
if (!filters.IncludeHeadCleaning)
{
db_JobRuns = db_JobRuns.Where(x => !x.IsHeadCleaning);
@@ -205,7 +211,7 @@ namespace Tango.PPC.Common.Statistics
break;
case ColorSpaces.LAB:
pbs.L = stop.L;
- pbs.A = stop.B;
+ pbs.A = stop.A;
pbs.B = stop.B;
break;
case ColorSpaces.Volume:
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/Filters.cs b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/Filters.cs
index eda91ab9e..196618f46 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/Filters.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Shared/Statistics/Filters.cs
@@ -16,12 +16,14 @@ namespace Tango.PPC.Shared.Statistics
public int MinLength { get; set; }
public int MaxLength { get; set; }
public List<int> EndStatuses { get; set; }
+ public List<int> JobDesignation { get; set; }
public bool IncludeHeadCleaning { get; set; }
public Filters()
{
RmlGuids = new List<string>();
EndStatuses = new List<int>();
+ JobDesignation = new List<int>();
}
}
}
diff --git a/Software/Visual_Studio/Tango.BL/DTO/JobRunDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/JobRunDTOBase.cs
index 999f0dcf8..02e445c09 100644
--- a/Software/Visual_Studio/Tango.BL/DTO/JobRunDTOBase.cs
+++ b/Software/Visual_Studio/Tango.BL/DTO/JobRunDTOBase.cs
@@ -318,6 +318,14 @@ namespace Tango.BL.DTO
}
/// <summary>
+ /// fine tuning string
+ /// </summary>
+ public String FineTuningString
+ {
+ get; set;
+ }
+
+ /// <summary>
/// is synchronized
/// </summary>
public Boolean IsSynchronized
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Job.cs b/Software/Visual_Studio/Tango.BL/Entities/Job.cs
index 614c6f8c6..c6a6ea226 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Job.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Job.cs
@@ -13,6 +13,7 @@ using System.Windows.Media.Imaging;
using Tango.BL.ActionLogs;
using Tango.BL.Builders;
using Tango.BL.Enumerations;
+using Tango.BL.FineTuning;
using Tango.BL.Interfaces;
using Tango.BL.ValueObjects;
using Tango.Core;
@@ -33,7 +34,7 @@ namespace Tango.BL.Entities
/// </summary>
public Job() : base()
{
-
+ VectorFineTuningRunModel = new VectorFineTuningRunModel();
}
/// <summary>
@@ -319,6 +320,14 @@ namespace Tango.BL.Entities
#endregion
+ #region Unmapped Fine Tuning
+
+ [NotMapped]
+ [JsonIgnore]
+ public VectorFineTuningRunModel VectorFineTuningRunModel { get; set; }
+
+ #endregion
+
#region Event Handlers
/// <summary>
diff --git a/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs b/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs
index abfe9d321..4c0092e55 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/JobRunBase.cs
@@ -91,6 +91,8 @@ namespace Tango.BL.Entities
public event EventHandler<String> CeVersionChanged;
+ public event EventHandler<String> FineTuningStringChanged;
+
public event EventHandler<Boolean> IsSynchronizedChanged;
protected String _machineguid;
@@ -1084,6 +1086,33 @@ namespace Tango.BL.Entities
}
}
+ protected String _finetuningstring;
+
+ /// <summary>
+ /// Gets or sets the jobrunbase fine tuning string.
+ /// </summary>
+
+ [Column("FINE_TUNING_STRING")]
+
+ public String FineTuningString
+ {
+ get
+ {
+ return _finetuningstring;
+ }
+
+ set
+ {
+ if (_finetuningstring != value)
+ {
+ _finetuningstring = value;
+
+ OnFineTuningStringChanged(value);
+
+ }
+ }
+ }
+
protected Boolean _issynchronized;
/// <summary>
@@ -1400,6 +1429,15 @@ namespace Tango.BL.Entities
}
/// <summary>
+ /// Called when the FineTuningString has changed.
+ /// </summary>
+ protected virtual void OnFineTuningStringChanged(String finetuningstring)
+ {
+ FineTuningStringChanged?.Invoke(this, finetuningstring);
+ RaisePropertyChanged(nameof(FineTuningString));
+ }
+
+ /// <summary>
/// Called when the IsSynchronized has changed.
/// </summary>
protected virtual void OnIsSynchronizedChanged(Boolean issynchronized)
diff --git a/Software/Visual_Studio/Tango.BL/FineTuning/VectorFineTuningRunModel.cs b/Software/Visual_Studio/Tango.BL/FineTuning/VectorFineTuningRunModel.cs
new file mode 100644
index 000000000..e5666c095
--- /dev/null
+++ b/Software/Visual_Studio/Tango.BL/FineTuning/VectorFineTuningRunModel.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.BL.FineTuning
+{
+ public class VectorFineTuningRunModel
+ {
+ public String JobName { get; set; }
+ public String FineTuningSessionID { get; set; }
+ public int FineTuningTrialNumber { get; set; }
+ public double FineTuningTargetL { get; set; }
+ public double FineTuningTargetA { get; set; }
+ public double FineTuningTargetB { get; set; }
+ public double FineTuningSuggestionL { get; set; }
+ public double FineTuningSuggestionA { get; set; }
+ public double FineTuningSuggestionB { get; set; }
+ public double? FineTuningMeasuredL { get; set; }
+ public double? FineTuningMeasuredA { get; set; }
+ public double? FineTuningMeasuredB { get; set; }
+ public bool Approved { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
index aaf7d362b..55e6b7efc 100644
--- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
+++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj
@@ -599,6 +599,7 @@
<Compile Include="Enumerations\YarnUnits.cs" />
<Compile Include="ExtensionMethods\ColorCatalogItemsExtensions.cs" />
<Compile Include="ExtensionMethods\ColorMineExtensions.cs" />
+ <Compile Include="FineTuning\VectorFineTuningRunModel.cs" />
<Compile Include="Helpers\EventTypeTextConverter.cs" />
<Compile Include="Helpers\SegmentsCsvHelper.cs" />
<Compile Include="Interfaces\ISegment.cs" />
@@ -830,7 +831,7 @@
</Target>
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/JOB_RUNS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/JOB_RUNS.cs
index 5ed87ecd8..1f863e723 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/JOB_RUNS.cs
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/JOB_RUNS.cs
@@ -54,6 +54,7 @@ namespace Tango.DAL.Remote.DB
public string FIRMWARE_VERSION { get; set; }
public string CE_VERSION { get; set; }
public string PROCESS_PARAMETERS_TABLE_GUID { get; set; }
+ public string FINE_TUNING_STRING { get; set; }
public bool IS_SYNCHRONIZED { get; set; }
}
}
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
index f27945995..5d288984b 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
@@ -789,6 +789,7 @@
<Property Name="FIRMWARE_VERSION" Type="varchar" MaxLength="30" />
<Property Name="CE_VERSION" Type="varchar" MaxLength="30" />
<Property Name="PROCESS_PARAMETERS_TABLE_GUID" Type="varchar" MaxLength="36" />
+ <Property Name="FINE_TUNING_STRING" Type="varchar" MaxLength="300" />
<Property Name="IS_SYNCHRONIZED" Type="bit" Nullable="false" />
</EntityType>
<EntityType Name="JOBS">
@@ -6401,6 +6402,7 @@
<Property Name="FIRMWARE_VERSION" Type="String" MaxLength="30" FixedLength="false" Unicode="false" />
<Property Name="CE_VERSION" Type="String" MaxLength="30" FixedLength="false" Unicode="false" />
<Property Name="PROCESS_PARAMETERS_TABLE_GUID" Type="String" MaxLength="36" FixedLength="false" Unicode="false" />
+ <Property Name="FINE_TUNING_STRING" Type="String" MaxLength="300" FixedLength="false" Unicode="false" />
<Property Name="IS_SYNCHRONIZED" Type="Boolean" Nullable="false" />
</EntityType>
<EntityType Name="JOB">
@@ -9811,6 +9813,7 @@
<EntityTypeMapping TypeName="RemoteModel.JOB_RUNS">
<MappingFragment StoreEntitySet="JOB_RUNS">
<ScalarProperty Name="IS_SYNCHRONIZED" ColumnName="IS_SYNCHRONIZED" />
+ <ScalarProperty Name="FINE_TUNING_STRING" ColumnName="FINE_TUNING_STRING" />
<ScalarProperty Name="PROCESS_PARAMETERS_TABLE_GUID" ColumnName="PROCESS_PARAMETERS_TABLE_GUID" />
<ScalarProperty Name="CE_VERSION" ColumnName="CE_VERSION" />
<ScalarProperty Name="FIRMWARE_VERSION" ColumnName="FIRMWARE_VERSION" />
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
index 6d7f9ff14..72ac56ec8 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
@@ -5,102 +5,102 @@
<!-- Diagram content (shape and connector positions) -->
<edmx:Diagrams>
<Diagram DiagramId="f9ae01d708754bbd997add25a4bacc79" Name="Diagram1" ZoomLevel="87">
- <EntityTypeShape EntityType="RemoteModel.ACTION_LOGS" Width="1.5" PointX="11.25" PointY="28.25" />
- <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="4.5" PointY="58.5" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="4.5" PointY="74.75" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="4.5" PointY="77.625" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="4.5" PointY="80.625" />
- <EntityTypeShape EntityType="RemoteModel.BIT_TYPES" Width="1.5" PointX="5.75" PointY="6.75" />
- <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="18" PointY="17.125" />
- <EntityTypeShape EntityType="RemoteModel.BTSR_APPLICATION_TYPES" Width="1.5" PointX="0.75" PointY="34" />
- <EntityTypeShape EntityType="RemoteModel.BTSR_YARN_TYPES" Width="1.5" PointX="0.75" PointY="10.125" />
- <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="9.75" PointY="48.25" />
- <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="8.25" PointY="24.75" />
- <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="0.75" PointY="16.75" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="1.5" PointY="1.5" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_GROUPS" Width="1.5" PointX="3.75" PointY="2" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_ITEMS" Width="1.5" PointX="6" PointY="0.75" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_ITEMS_RECIPES" Width="1.5" PointX="8.25" PointY="16.625" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_PROCESS_INK_UPTAKE" Width="1.5" PointX="8.75" PointY="4.75" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="9" PointY="41" />
- <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="6.75" PointY="73.125" />
- <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="4.5" PointY="62.5" />
- <EntityTypeShape EntityType="RemoteModel.CUSTOMER" Width="1.5" PointX="9" PointY="60.875" />
- <EntityTypeShape EntityType="RemoteModel.DATA_STORE_ITEMS" Width="1.5" PointX="11.25" PointY="83.625" />
- <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="7.5" PointY="12.25" />
- <EntityTypeShape EntityType="RemoteModel.DISPENSER" Width="1.5" PointX="9.75" PointY="11.75" />
- <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="4.5" PointY="67.5" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="9" PointY="91.375" />
- <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="28" />
- <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="25" />
- <EntityTypeShape EntityType="RemoteModel.FSE_VERSIONS" Width="1.5" PointX="11.25" PointY="32.5" />
- <EntityTypeShape EntityType="RemoteModel.GBD" Width="1.5" PointX="0.75" PointY="13.375" />
- <EntityTypeShape EntityType="RemoteModel.GLOBAL_DATA_STORE_ITEMS" Width="1.5" PointX="14.75" PointY="4.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWER_TYPES" Width="1.5" PointX="12.5" PointY="49" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWERS" Width="1.5" PointX="14.75" PointY="65.625" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSOR_TYPES" Width="1.5" PointX="9.5" PointY="97" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSORS" Width="1.5" PointX="11.75" PointY="77.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="12.5" PointY="88" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="14.75" PointY="70" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="9.5" PointY="88" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="11.75" PointY="67.625" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="4.5" PointY="55" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="6.75" PointY="66.125" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="4.5" PointY="84" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="6.75" PointY="78.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="4.5" PointY="70.5" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="9.5" PointY="68" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="11.75" PointY="63.875" />
- <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="9.75" PointY="45" />
- <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="12" PointY="41.125" />
- <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="16.75" PointY="4.75" />
- <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="11.25" PointY="17" />
- <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="37.25" />
- <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="3" PointY="9.375" />
- <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="5.25" PointY="16.875" />
- <EntityTypeShape EntityType="RemoteModel.LUB" Width="1.5" PointX="0.75" PointY="21" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE_PROTOTYPES" Width="1.5" PointX="14.75" PointY="14.75" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="11.25" PointY="37.375" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="6.75" PointY="83.5" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="9" PointY="71.5" />
- <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="11.25" PointY="56.75" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="40.25" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="30.875" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="7.125" />
- <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="9.75" PointY="8.25" />
- <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="6.75" PointY="60.375" />
- <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="12" PointY="6.375" />
- <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="48.125" />
- <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="51.125" />
- <EntityTypeShape EntityType="RemoteModel.PUBLISHED_PROCEDURE_PROJECTS" Width="1.5" PointX="13.75" PointY="1" />
- <EntityTypeShape EntityType="RemoteModel.PUBLISHED_PROCEDURE_PROJECTS_VERSIONS" Width="1.5" PointX="16" PointY="1.25" />
- <EntityTypeShape EntityType="RemoteModel.RML_EXTENSION_TEST_WASHING_RESULTS" Width="1.5" PointX="11" PointY="1" />
- <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="14.625" />
- <EntityTypeShape EntityType="RemoteModel.RMLS_SPOOLS" Width="1.5" PointX="5.25" PointY="20.375" />
- <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="12" PointY="10.375" />
- <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="14.25" PointY="10.375" />
- <EntityTypeShape EntityType="RemoteModel.RUBBING_RESULTS" Width="1.5" PointX="18.75" PointY="0.75" />
- <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="15.75" PointY="20.75" />
- <EntityTypeShape EntityType="RemoteModel.SEGMENTS_GROUPS" Width="1.5" PointX="13.5" PointY="21" />
- <EntityTypeShape EntityType="RemoteModel.SITE" Width="1.5" PointX="6" PointY="25.75" />
- <EntityTypeShape EntityType="RemoteModel.SITES_CATALOGS" Width="1.5" PointX="12.25" PointY="14" />
- <EntityTypeShape EntityType="RemoteModel.SITES_RMLS" Width="1.5" PointX="8.25" PointY="21.125" />
- <EntityTypeShape EntityType="RemoteModel.SITES_SPOOL_TYPES" Width="1.5" PointX="14.25" PointY="28.875" />
- <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="9" PointY="29.5" />
- <EntityTypeShape EntityType="RemoteModel.SPOOL" Width="1.5" PointX="11.25" PointY="52.125" />
- <EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="13.75" PointY="17.75" />
- <EntityTypeShape EntityType="RemoteModel.TANGO_UPDATES" Width="1.5" PointX="18.75" PointY="4.75" />
- <EntityTypeShape EntityType="RemoteModel.TANGO_VERSIONS" Width="1.5" PointX="14.25" PointY="58.625" />
- <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="18.75" PointY="9.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="18.75" PointY="13.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_HEATERS" Width="1.5" PointX="20.75" PointY="0.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="20.75" PointY="3.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="20.75" PointY="8.75" />
- <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="20.75" PointY="13.75" />
- <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="9" PointY="35" />
- <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="14.25" PointY="36.375" />
- <EntityTypeShape EntityType="RemoteModel.WASHING_TEST_MATERIALS" Width="1.5" PointX="8.75" PointY="1.5" />
- <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="9" PointY="64.375" />
+ <EntityTypeShape EntityType="RemoteModel.ACTION_LOGS" Width="1.5" PointX="11.25" PointY="13.125" />
+ <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="1.5" PointY="56.75" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="1.5" PointY="67.625" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="73.5" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="1.5" PointY="64.75" />
+ <EntityTypeShape EntityType="RemoteModel.BIT_TYPES" Width="1.5" PointX="0.75" PointY="3.125" />
+ <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="18" PointY="19.5" />
+ <EntityTypeShape EntityType="RemoteModel.BTSR_APPLICATION_TYPES" Width="1.5" PointX="0.75" PointY="23.375" />
+ <EntityTypeShape EntityType="RemoteModel.BTSR_YARN_TYPES" Width="1.5" PointX="0.75" PointY="26.875" />
+ <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="9" PointY="56.5" />
+ <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="8.25" PointY="19.125" />
+ <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="0.75" PointY="30.125" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="1.5" PointY="84.875" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_GROUPS" Width="1.5" PointX="3.75" PointY="85.375" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_ITEMS" Width="1.5" PointX="6" PointY="84.125" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_ITEMS_RECIPES" Width="1.5" PointX="8.25" PointY="23" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_PROCESS_INK_UPTAKE" Width="1.5" PointX="2.75" PointY="3.125" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="9" PointY="27.5" />
+ <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="3.75" PointY="70.25" />
+ <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="1.5" PointY="60.875" />
+ <EntityTypeShape EntityType="RemoteModel.CUSTOMER" Width="1.5" PointX="9" PointY="39.5" />
+ <EntityTypeShape EntityType="RemoteModel.DATA_STORE_ITEMS" Width="1.5" PointX="8.25" PointY="76.75" />
+ <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="6.75" PointY="1.625" />
+ <EntityTypeShape EntityType="RemoteModel.DISPENSER" Width="1.5" PointX="9" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="70.625" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="9" PointY="89.75" />
+ <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="16" />
+ <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="33.5" />
+ <EntityTypeShape EntityType="RemoteModel.FSE_VERSIONS" Width="1.5" PointX="11.25" PointY="31.25" />
+ <EntityTypeShape EntityType="RemoteModel.GBD" Width="1.5" PointX="0.75" PointY="42.25" />
+ <EntityTypeShape EntityType="RemoteModel.GLOBAL_DATA_STORE_ITEMS" Width="1.5" PointX="2.75" PointY="7.125" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWER_TYPES" Width="1.5" PointX="11.5" PointY="66" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWERS" Width="1.5" PointX="13.75" PointY="76.625" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSOR_TYPES" Width="1.5" PointX="9.5" PointY="62" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSORS" Width="1.5" PointX="11.75" PointY="69.75" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="6.5" PointY="81" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="8.75" PointY="83.875" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="8.5" PointY="94.875" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="10.75" PointY="73.625" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="6.5" PointY="61" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="8.75" PointY="66.125" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="1.5" PointY="81" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="3.75" PointY="76.75" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="76.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="9.5" PointY="99" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="11.75" PointY="83.75" />
+ <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="9" PointY="43.25" />
+ <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="11.25" PointY="37.625" />
+ <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="18.75" PointY="7.125" />
+ <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="11.25" PointY="19.5" />
+ <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="18.875" />
+ <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="6" PointY="5.125" />
+ <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="5.25" PointY="19.25" />
+ <EntityTypeShape EntityType="RemoteModel.LUB" Width="1.5" PointX="0.75" PointY="12.625" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE_PROTOTYPES" Width="1.5" PointX="4.75" PointY="10.125" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="11.25" PointY="9" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="3.75" PointY="80.625" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="6" PointY="64.625" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="11.25" PointY="43.125" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="39.25" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="9.625" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="36.375" />
+ <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="9" PointY="8.5" />
+ <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="3.75" PointY="58.75" />
+ <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="12" PointY="57.875" />
+ <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="46.625" />
+ <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="49.625" />
+ <EntityTypeShape EntityType="RemoteModel.PUBLISHED_PROCEDURE_PROJECTS" Width="1.5" PointX="16.75" PointY="3.375" />
+ <EntityTypeShape EntityType="RemoteModel.PUBLISHED_PROCEDURE_PROJECTS_VERSIONS" Width="1.5" PointX="19" PointY="3.625" />
+ <EntityTypeShape EntityType="RemoteModel.RML_EXTENSION_TEST_WASHING_RESULTS" Width="1.5" PointX="16" PointY="8.375" />
+ <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="17" />
+ <EntityTypeShape EntityType="RemoteModel.RMLS_SPOOLS" Width="1.5" PointX="5.25" PointY="26.875" />
+ <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="12" PointY="4.875" />
+ <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="14.25" PointY="4.875" />
+ <EntityTypeShape EntityType="RemoteModel.RUBBING_RESULTS" Width="1.5" PointX="5.75" PointY="13.125" />
+ <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="15.75" PointY="23.125" />
+ <EntityTypeShape EntityType="RemoteModel.SEGMENTS_GROUPS" Width="1.5" PointX="13.5" PointY="23.375" />
+ <EntityTypeShape EntityType="RemoteModel.SITE" Width="1.5" PointX="3" PointY="13.25" />
+ <EntityTypeShape EntityType="RemoteModel.SITES_CATALOGS" Width="1.5" PointX="5.25" PointY="45.625" />
+ <EntityTypeShape EntityType="RemoteModel.SITES_RMLS" Width="1.5" PointX="5.25" PointY="23.5" />
+ <EntityTypeShape EntityType="RemoteModel.SITES_SPOOL_TYPES" Width="1.5" PointX="14.25" PointY="27.75" />
+ <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="9" PointY="34.125" />
+ <EntityTypeShape EntityType="RemoteModel.SPOOL" Width="1.5" PointX="11.25" PointY="53" />
+ <EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="8.75" PointY="5.125" />
+ <EntityTypeShape EntityType="RemoteModel.TANGO_UPDATES" Width="1.5" PointX="13.75" PointY="17.125" />
+ <EntityTypeShape EntityType="RemoteModel.TANGO_VERSIONS" Width="1.5" PointX="11.25" PointY="48" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="20.75" PointY="7.125" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="20.75" PointY="11.125" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_HEATERS" Width="1.5" PointX="20.75" PointY="14.125" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="20.75" PointY="17.125" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="20.75" PointY="22.125" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="21.75" PointY="3.125" />
+ <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="9" PointY="12.5" />
+ <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="14.25" PointY="13.875" />
+ <EntityTypeShape EntityType="RemoteModel.WASHING_TEST_MATERIALS" Width="1.5" PointX="13.75" PointY="8.875" />
+ <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="9" PointY="31" />
<AssociationConnector Association="RemoteModel.FK_ACTION_LOGS_USERS" />
<AssociationConnector Association="RemoteModel.FK_ORGANIZATIONS_ADDRESSES" />
<AssociationConnector Association="RemoteModel.FK_USERS_ADDRESSES" />
diff --git a/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs b/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs
index 40f1d0789..e80b1f652 100644
--- a/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs
+++ b/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs
@@ -1,4 +1,5 @@
-using System;
+using Newtonsoft.Json;
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@@ -132,6 +133,8 @@ namespace Tango.Integration.JobRuns
{
using (var db = ObservablesContext.CreateDefault())
{
+ var colorSpaces = db.ColorSpaces.ToList();
+
JobRun run = new JobRun();
run.UserGuid = _job.UserGuid;
@@ -154,7 +157,22 @@ namespace Tango.Integration.JobRuns
run.LiquidQuantities = e.LiquidQuantities;
run.IsGradient = _job.Segments.Any(x => x.BrushStops.Count > 1);
run.GradientResolutionCm = MachineOperator.GradientGenerationConfiguration.ResolutionCM;
- run.JobString = e.Job.ToJobFileWhenLoaded().ToString();
+
+ var jobFile = e.Job.ToJobFileWhenLoaded();
+
+ try
+ {
+ if (_job.Designation == JobDesignations.FineTuning)
+ {
+ jobFile.Segments.First().BrushStops.First().ColorSpaceGuid = colorSpaces.First(x => x.Code == (int)ColorSpaces.LAB).Guid;
+ }
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error setting brush stop color space to LAB on fine tuning job run (JobFileString).");
+ }
+
+ run.JobString = jobFile.ToString();
run.ApplicationVersion = Assembly.GetEntryAssembly().GetName().Version.ToString();
run.FirmwareVersion = MachineOperator.DeviceInformation?.Version;
@@ -208,6 +226,18 @@ namespace Tango.Integration.JobRuns
run.FailedMessage = exception.FlattenMessage();
}
+ if (_job.Designation == JobDesignations.FineTuning)
+ {
+ try
+ {
+ run.FineTuningString = JsonConvert.SerializeObject(_job.VectorFineTuningRunModel);
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error serializing fine tuning model for job run.");
+ }
+ }
+
db.JobRuns.Add(run);
e.Job.LastRun = DateTime.UtcNow;
@@ -403,7 +433,7 @@ namespace Tango.Integration.JobRuns
_startMachineStatus = MachineOperator.MachineStatus?.Clone();
_jobTicket = e.JobHandler.JobTicket;
- if (_job.Designation == JobDesignations.FineTuning) return;
+ //if (_job.Designation == JobDesignations.FineTuning) return;
if (e.IsResumed)
{
diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln
index 75e0e75fc..61a334aad 100644
--- a/Software/Visual_Studio/Tango.sln
+++ b/Software/Visual_Studio/Tango.sln
@@ -17426,6 +17426,7 @@ Global
{90B53209-C60C-4655-B28D-A1B3E1044BA3} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958}
{F079FB0A-A8ED-4216-B6A5-345756751A04} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958}
{43ECCD8D-EE54-44EF-A51A-D77E3DF7263F} = {4443B71C-216E-4D4C-8D19-868F50803813}
+ {CD2513CC-7596-498C-957D-DE6473561A1C} = {C81ED1A3-D18C-4D80-A8F5-061994A14A60}
{09EE4BC6-F1C6-46DD-B4FE-918377A4EF02} = {CD2513CC-7596-498C-957D-DE6473561A1C}
{0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0} = {C81ED1A3-D18C-4D80-A8F5-061994A14A60}
{654BEDA3-16FB-44FF-ADE7-B52E50B02E63} = {C81ED1A3-D18C-4D80-A8F5-061994A14A60}
@@ -17557,12 +17558,12 @@ Global
{7A30B35F-94DC-4A9C-B9D2-CB5CAA735788} = {4EE6DBA1-71BC-49E2-8DC7-266487E61050}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
- BuildVersion_UseGlobalSettings = False
- BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs
- BuildVersion_StartDate = 2000/1/1
- BuildVersion_UpdateFileVersion = False
- BuildVersion_UpdateAssemblyVersion = True
- BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear
SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6}
+ BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear
+ BuildVersion_UpdateAssemblyVersion = True
+ BuildVersion_UpdateFileVersion = False
+ BuildVersion_StartDate = 2000/1/1
+ BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs
+ BuildVersion_UseGlobalSettings = False
EndGlobalSection
EndGlobal