|
|
@ -24,7 +24,6 @@ namespace SparkClient.ViewModel.Grading; |
|
|
|
public class GradingLoadingVM : BaseViewModel,IDisposable |
|
|
|
public class GradingLoadingVM : BaseViewModel,IDisposable |
|
|
|
{ |
|
|
|
{ |
|
|
|
private double _progress; |
|
|
|
private double _progress; |
|
|
|
private SOCClientService _socClientService; |
|
|
|
|
|
|
|
public AlgorithmResultEntity Parameter; |
|
|
|
public AlgorithmResultEntity Parameter; |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// 进度 |
|
|
|
/// 进度 |
|
|
@ -134,12 +133,13 @@ public class GradingLoadingVM : BaseViewModel,IDisposable |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// 开始检测 |
|
|
|
/// 开始检测 |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|
|
|
|
|
//[Log] |
|
|
|
public async Task<int> Start(int type = 0) |
|
|
|
public async Task<int> Start(int type = 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
try |
|
|
|
try |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
var progress = RunProgressAsync(_progressCts.Token); |
|
|
|
var progress = RunProgressAsync(_progressCts.Token); |
|
|
|
|
|
|
|
|
|
|
|
if (type == 11) |
|
|
|
if (type == 11) |
|
|
@ -168,15 +168,17 @@ public class GradingLoadingVM : BaseViewModel,IDisposable |
|
|
|
|
|
|
|
|
|
|
|
if(type == 0) |
|
|
|
if(type == 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
string openpupmStatus = await SOCClientService.Service.OpenPump(true); |
|
|
|
|
|
|
|
if (!StatusCodes.Success.Equals(openpupmStatus)) |
|
|
|
await SOCClientService.Service.OpenPump(true); |
|
|
|
{ |
|
|
|
// if (!StatusCodes.Success.Equals(openpupmStatus)) |
|
|
|
new MessageBox().Show("气泵开启失败!"); |
|
|
|
// { |
|
|
|
return -1; |
|
|
|
// new MessageBox().Show("气泵开启失败!"); |
|
|
|
} |
|
|
|
// return -1; |
|
|
|
|
|
|
|
// } |
|
|
|
var processImage = _socClientService.ProcessImageCollectionAsync(); |
|
|
|
|
|
|
|
|
|
|
|
var processImage = SOCClientService.Service.ProcessImageCollectionAsync(); |
|
|
|
//通知页面可以播放图片 |
|
|
|
//通知页面可以播放图片 |
|
|
|
|
|
|
|
|
|
|
|
await processImage; |
|
|
|
await processImage; |
|
|
|
|
|
|
|
|
|
|
|
if (!("ok".Equals(processImage.Result.Status) || "S000".Equals(processImage.Result.Status))) |
|
|
|
if (!("ok".Equals(processImage.Result.Status) || "S000".Equals(processImage.Result.Status))) |
|
|
|