master
Tongg 9 months ago
parent bb800bbd0d
commit bbb8cc3c15
  1. 2
      App.config
  2. 6
      ViewModel/Configuration/SettingsPages/SettingsVM.cs
  3. 16
      ViewModel/Grading/GradingResultVM.cs
  4. 1
      Views/Grading/GradingResult.xaml.cs
  5. 4
      Views/UserControl/ViewportData/Helper/ViewportHelperPro.cs

@ -18,7 +18,7 @@
<add key="ProgressTime" value="50000"/> <add key="ProgressTime" value="50000"/>
<add key="RunModel" value="0" /> <add key="RunModel" value="0" />
<add key="AppVersion" value="1.0.20250311" /> <add key="AppVersion" value="1.0.20250318" />
</appSettings> </appSettings>
<connectionStrings> <connectionStrings>
<add name="" connectionString=""/> <add name="" connectionString=""/>

@ -61,7 +61,10 @@ namespace SparkClient.ViewModel.Configuration.SettingsPages
public string NowRunMode public string NowRunMode
{ {
get { return _nowRunMode; } get { return _nowRunMode; }
set { _nowRunMode = value; OnPropertyChanged(nameof(NowRunMode)); } set {
_nowRunMode = value;
OnPropertyChanged(nameof(NowRunMode));
}
} }
public SettingsVM() public SettingsVM()
@ -232,6 +235,7 @@ namespace SparkClient.ViewModel.Configuration.SettingsPages
ItemName = "运行模式", ItemName = "运行模式",
Value = NowRunMode, Value = NowRunMode,
}; };
Common.RunMode = int.Parse(NowRunMode);
runModeData.insert(); runModeData.insert();
} }
catch (Exception ex) catch (Exception ex)

@ -1624,6 +1624,8 @@ public class GradingResultVM : BaseViewModel
[Log] [Log]
public RowDetail getSelectData(string testItemId) public RowDetail getSelectData(string testItemId)
{
try
{ {
RowDetail row = new RowDetail(); RowDetail row = new RowDetail();
row.itemName = GetName(testItemId); row.itemName = GetName(testItemId);
@ -1634,11 +1636,17 @@ public class GradingResultVM : BaseViewModel
row.Max = data != null ? data.Max : ""; row.Max = data != null ? data.Max : "";
row.Min = data != null ? data.Min : ""; row.Min = data != null ? data.Min : "";
row.CutLevel = data != null ? data.CutLevel : ""; row.CutLevel = data != null ? data.CutLevel : "";
row.SymLevel = GetGradeName(data != null ? data.SymLevel??0 : 0); row.SymLevel = GetGradeName(data != null ? data.SymLevel ?? 0 : 0);
setDetailItems(row, testItemId); setDetailItems(row, testItemId);
this.SelRowDataDetail = row; this.SelRowDataDetail = row;
return row; return row;
} }
catch (Exception ex)
{
Logger.Error($"虾集霸点:{ex.Message}");
return null;
}
}
[Log] [Log]
private void setDetailItems(RowDetail row,string TestItemId) private void setDetailItems(RowDetail row,string TestItemId)
{ {
@ -1964,6 +1972,12 @@ public class GradingResultVM : BaseViewModel
[Log] [Log]
private void ExecuteThermalPrint(object parameter) private void ExecuteThermalPrint(object parameter)
{ {
if (Common.RunMode == 1)
{
new MessageBox().Show("打印功能不可用");
return;
}
Microsoft.Office.Interop.Excel.Application excelApp = null; Microsoft.Office.Interop.Excel.Application excelApp = null;
string tempFilePath = string.Empty; string tempFilePath = string.Empty;
try try

@ -207,6 +207,7 @@ public partial class GradingResult
if(oo == null) return; if(oo == null) return;
var d = DataContext as GradingResultVM; var d = DataContext as GradingResultVM;
RowDetail rowDetail = d.getSelectData((oo.Item as DataInfo).TestItemId); RowDetail rowDetail = d.getSelectData((oo.Item as DataInfo).TestItemId);
if (rowDetail == null) return;
if (!_allPopups.Contains(popup)) if (!_allPopups.Contains(popup))
{ {

@ -589,7 +589,7 @@ public class ViewportHelperPro
{ {
var result = new List<GeometryModel3D>(); var result = new List<GeometryModel3D>();
string steps = ViewportManager.DiamondType.Split(" ").Last(); string steps = ViewportManager.DiamondType.Split(" ").Last();
if (Common.RunMode == 0 && steps.StartsWith("S")) if (Common.RunMode == 0)
{ {
Logger.Info("【面文本生成】开始生成面相关文本信息"); Logger.Info("【面文本生成】开始生成面相关文本信息");
var selFacet = entities; var selFacet = entities;
@ -1037,7 +1037,7 @@ public class ViewportHelperPro
var selFacetType = entities.First().PlaneType; var selFacetType = entities.First().PlaneType;
string step = ViewportManager.DiamondType.Split(" ").Last(); string step = ViewportManager.DiamondType.Split(" ").Last();
if ("S1".Equals(step)) if ("S1".Equals(step) && selFacetType == PlaneType.CrownIncomplete)
{ {
try try
{ {

Loading…
Cancel
Save