|
@@ -34,6 +34,7 @@ namespace ST_LINK_MES
|
|
|
Title = Title + string.Format(" V{0}", Assembly.GetEntryAssembly().GetName().Version);
|
|
|
|
|
|
this.stlinkService = new STLinkCliPrograrmService(AppSettingService.Instance.DLinkCliPath);
|
|
|
+ this.fileRrecordService = new FileRrecordService();
|
|
|
//this.loginWindow = new LoginWindow();
|
|
|
this.resultDialog = new ResultDialog();
|
|
|
|
|
@@ -44,6 +45,7 @@ namespace ST_LINK_MES
|
|
|
//private readonly LoginWindow loginWindow;
|
|
|
private ResultDialog resultDialog;
|
|
|
private readonly STLinkCliPrograrmService stlinkService;
|
|
|
+ private readonly FileRrecordService fileRrecordService;
|
|
|
|
|
|
public string UserId { get; internal set; }
|
|
|
public string WorkOrder { get; internal set; }
|
|
@@ -128,6 +130,7 @@ namespace ST_LINK_MES
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ fileRrecordService.Start(uxSN.Text);
|
|
|
var task = new Task(() =>
|
|
|
{
|
|
|
StartProgram(filePath);
|
|
@@ -156,6 +159,7 @@ namespace ST_LINK_MES
|
|
|
|
|
|
if (!string.IsNullOrEmpty(result.ErrorMsg))
|
|
|
{
|
|
|
+ fileRrecordService.Log(result.ErrorMsg);
|
|
|
AddTerminalMsg(result.ErrorMsg);
|
|
|
}
|
|
|
|
|
@@ -198,6 +202,8 @@ namespace ST_LINK_MES
|
|
|
resultDialog.ShowResult(true);
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ fileRrecordService.Complete();
|
|
|
}
|
|
|
|
|
|
private MesErrorCode GetErrorCode(int step)
|
|
@@ -276,6 +282,7 @@ namespace ST_LINK_MES
|
|
|
private void StlinkService_OnMsgReceviced(string msg)
|
|
|
{
|
|
|
AddTerminalMsg(msg);
|
|
|
+ fileRrecordService.Log(msg);
|
|
|
}
|
|
|
|
|
|
private void AddTerminalMsg(string msg)
|