aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2020-07-21 16:51:05 +0300
committerAvi Levkovich <avi@twine-s.com>2020-07-21 16:51:05 +0300
commitce21d5e8765e62e487b5b0c576b50cffc6efda60 (patch)
treea9b32c2a63c967391725ead6e2fb4da1df2ac371 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels
parent177130ab882888a5c0713b3ccddcd9ba3c6041ef (diff)
parentde4a450a8d2cea6c4af63f318f1a1a723f0f01db (diff)
downloadTango-ce21d5e8765e62e487b5b0c576b50cffc6efda60.tar.gz
Tango-ce21d5e8765e62e487b5b0c576b50cffc6efda60.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs29
1 files changed, 18 insertions, 11 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs
index d065b58c5..7d05897d5 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs
@@ -222,10 +222,10 @@ namespace Tango.MachineStudio.RML.ViewModels
conversionInput.TargetB = lab.B;
}
CalibrationOutput result = _calibrator.GetLiquidFactor(conversionInput);
-
- ErrorMessage = Regex.Replace(result.ErrorMessage, "[^A-Za-z0-9_., ]+", "");
-
+
+ ErrorMessage = result.ErrorMessage;
HasError = false == String.IsNullOrEmpty(ErrorMessage);
+
return result.LiquidFactor;
}
catch (Exception ex )
@@ -309,6 +309,11 @@ namespace Tango.MachineStudio.RML.ViewModels
LinearizationPlotControl.InvalidatePlot(true);
}
+
+ /// <summary>
+ /// Open file dialog and get name of file
+ /// </summary>
+ /// <returns></returns>
private String GetInkDataFileOpen()
{
OpenFileDialog dlg = new OpenFileDialog();
@@ -321,6 +326,7 @@ namespace Tango.MachineStudio.RML.ViewModels
return null;
}
+
private List<double> GetLinearizationMeasurements(List<ColorLinearizationModel.LinearizationDataItem> items)
{
try
@@ -338,23 +344,24 @@ namespace Tango.MachineStudio.RML.ViewModels
}
LinearizationOutput result = _linearizationMeasurementscalibrator.GetLinearizationMeasurements(linearizationInput);
- ErrorMessage = Regex.Replace(result.ErrorMessage, "[^A-Za-z0-9_., ]+", "");
-
- HasError = false == String.IsNullOrEmpty(ErrorMessage);
+ if(!String.IsNullOrEmpty(result.ErrorMessage))
+ {
+ LogManager.Log(result.ErrorMessage, "Error occurred while trying to call GetLinearizationMeasurements.");
+ }
return result.InkPercentage.ToList();
}
catch (Exception ex)
{
- HasError = true;
- ErrorMessage = "Error occurred while trying to call GetLiquidFactor.";
- LogManager.Log(ex, "Error occurred while trying to call GetLiquidFactor.");
+ LogManager.Log(ex, "Error occurred while trying to call GetLinearizationMeasurements.");
}
return null;
}
#endregion
- #region Export graph
-
+ #region Export graph
+ /// <summary>
+ /// Exports the graph point to Excel file.
+ /// </summary>
protected void ExportGraph()
{
SaveFileDialog dlg = new SaveFileDialog();