aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels
diff options
context:
space:
mode:
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();