|
|
|
@ -34,6 +34,7 @@ using Brushes = System.Drawing.Brushes; |
|
|
|
|
using SparkClient.Model.Attributes; |
|
|
|
|
using SparkClient.Model.Common; |
|
|
|
|
using PaperSize = System.Drawing.Printing.PaperSize; |
|
|
|
|
using SharpDX.Direct2D1.Effects; |
|
|
|
|
|
|
|
|
|
namespace SparkClient.ViewModel.Grading; |
|
|
|
|
/// <summary> |
|
|
|
@ -284,7 +285,10 @@ public class GradingResultVM : BaseViewModel |
|
|
|
|
using (var writer = new StreamWriter(filePath,true)) |
|
|
|
|
{ |
|
|
|
|
Measurements info = algorithmResult.measurements; |
|
|
|
|
string line = $"{FormatDouble_A(info.M1)}(mm)," + |
|
|
|
|
string line = |
|
|
|
|
$"{DiamondCode}," + |
|
|
|
|
$"{Wight}(ct)," + |
|
|
|
|
$"{FormatDouble_A(info.M1)}(mm)," + |
|
|
|
|
$"{FormatDouble_A(info.M2)}(mm)," + |
|
|
|
|
$"{FormatDouble_A(info.M3)}(mm)," + |
|
|
|
|
$"{FormatDouble_P(info.TABLE)}%," + |
|
|
|
@ -302,6 +306,35 @@ public class GradingResultVM : BaseViewModel |
|
|
|
|
writer.WriteLine(line); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
File.Create(filePath).Close(); |
|
|
|
|
string header = "Diamond Code,Wight,Measurement1, Measurement2, Measurement3, Table, Crown Height,Pavilion Depth, Total Depth,Crown Angle, Pavilion Angle,Culet Size, Girdle Percent,Girdle Name, POL or Pol/ Sym,SYM,CUT - PROP"; |
|
|
|
|
Measurements info = algorithmResult.measurements; |
|
|
|
|
string line = |
|
|
|
|
$"{DiamondCode}," + |
|
|
|
|
$"{Wight}(ct)," + |
|
|
|
|
$"{FormatDouble_A(info.M1)}(mm)," + |
|
|
|
|
$"{FormatDouble_A(info.M2)}(mm)," + |
|
|
|
|
$"{FormatDouble_A(info.M3)}(mm)," + |
|
|
|
|
$"{FormatDouble_P(info.TABLE)}%," + |
|
|
|
|
$"{FormatDouble_P(info.CROWN_HEIGHT)}%," + |
|
|
|
|
$"{FormatDouble_P(info.PAV_DEPTH)}%," + |
|
|
|
|
$"{FormatDouble_P(info.TOTAL_DEPTH)}%," + |
|
|
|
|
$"{FormatDouble_A(info.CROWN_ANGLE)}°," + |
|
|
|
|
$"{FormatDouble_A(info.PAV_ANGLE)}°," + |
|
|
|
|
$"{FormatDouble_A(info.CULET_SIZE)}(mm)," + |
|
|
|
|
$"{FormatDouble_P(info.GIRDLE)}%," + |
|
|
|
|
$"{calGirdleName(info)}," + |
|
|
|
|
$"," + |
|
|
|
|
$"," + |
|
|
|
|
$"{GetGradeEnName(GetGradeOrder(CutLevelTotal))}"; |
|
|
|
|
using (var writer = new StreamWriter(filePath, true)) |
|
|
|
|
{ |
|
|
|
|
writer.WriteLine(header); |
|
|
|
|
writer.WriteLine(line); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void saveTempDS(string selValue) |
|
|
|
|