/// <summary> /// PCDmis测量完成响应事件 /// </summary> /// <param name="ExecutionWindow"></param> private void _pcdAppEvents_OnCloseExecutionDialog(PCDLRN.ExecutionWindow ExecutionWindow) { _ExeOK = false; PCDmisEventArgs pce; _monitorTimer.Stop(); if (_partProgram.ExecutionWasCancelled) { LogCollector.Instance.PostSvrErrorMessage("执行被终止"); pce = new PCDmisEventArgs() { IsCompleted = false }; pce.PCDmisRunInfo = "执行被终止"; pce.FaultType = PCDmisFaultType.FT_CancelMeasure; PCDmisMeasureEvent?.Invoke(this, pce); return; } // 响应PCDMIS测量结束事件 pce = new PCDmisEventArgs() { IsCompleted = true }; pce.PCDmisRunInfo = "程序执行完成"; pce.FaultType = PCDmisFaultType.FT_None; PCDmisMeasureEvent?.Invoke(this, pce); LogCollector.Instance.PostSvrWorkStatus("程序执行完成"); }
/// <summary> /// 测量完成 /// </summary> /// <param name="ExecutionWindow"></param> private void _pcdAppEvents_OnCloseExecutionDialog(PCDLRN.ExecutionWindow ExecutionWindow) { if (_partProgram.ExecutionWasCancelled) { // 执行被终止 _partProgram.Close(); return; } _partProgram.Close(); //GotoSafePosition(); // 是否需要回安全位置 // 结果转换及叶片分析 if (_IsMeasured) { //Func<bool> bladeInvoker = new Func<bool>(BladeAnalysis); //IAsyncResult iar = bladeInvoker.BeginInvoke(analysisFinish, null); _eventNotify?.WorkCompleted(true); // 通知测量完成 } }