添加 MX-PD-盘古 项目文件
将 MX-PD-盘古 - new 目录下的所有文件添加到主仓库
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
using MainShell.Common;
|
||||
using MW.WorkFlow;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MainShell.Process
|
||||
{
|
||||
public class PreTransferValidationActivity : ActivityAbstractBase
|
||||
{
|
||||
public PreTransferValidationActivity(string name)
|
||||
: base(name)
|
||||
{
|
||||
}
|
||||
|
||||
protected override Task<ActivityResult> OnExecuteAsync(WorkflowContext context, ActivityControl activityControl)
|
||||
{
|
||||
activityControl.ThrowIfCancellationRequested();
|
||||
|
||||
SubstrateLifecycleState substrateState;
|
||||
if (!context.TryGetData<SubstrateLifecycleState>(WorkflowContextKeys.SubstrateProcessState, out substrateState) ||
|
||||
substrateState != SubstrateLifecycleState.HeightMeasured)
|
||||
{
|
||||
return Task.FromResult(Fail(
|
||||
context,
|
||||
MessageKey.ProcessStepFailedWithReason,
|
||||
new object[]
|
||||
{
|
||||
Name,
|
||||
"<22><><EFBFBD><EFBFBD>״̬δ<CCAC><CEB4><EFBFBD>ɲ<EFBFBD><C9B2><EFBFBD>У<EFBFBD>顣"
|
||||
}));
|
||||
}
|
||||
|
||||
bool pendingChipLoad;
|
||||
if (!context.TryGetData<bool>(WorkflowContextKeys.PendingChipLoad, out pendingChipLoad))
|
||||
{
|
||||
pendingChipLoad = false;
|
||||
}
|
||||
|
||||
if (pendingChipLoad)
|
||||
{
|
||||
return Task.FromResult(Fail(
|
||||
context,
|
||||
MessageKey.ProcessStepFailedWithReason,
|
||||
new object[]
|
||||
{
|
||||
Name,
|
||||
"оƬ<D0BE><C6AC>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD>"
|
||||
}));
|
||||
}
|
||||
|
||||
CurrentChipLifecycleState chipState;
|
||||
if (!context.TryGetData<CurrentChipLifecycleState>(WorkflowContextKeys.CurrentChipState, out chipState))
|
||||
{
|
||||
return Task.FromResult(Fail(
|
||||
context,
|
||||
MessageKey.ProcessStepFailedWithReason,
|
||||
new object[]
|
||||
{
|
||||
Name,
|
||||
"<22><>ǰоƬ״̬ȱʧ<C8B1><CAA7>"
|
||||
}));
|
||||
}
|
||||
|
||||
if (chipState != CurrentChipLifecycleState.LoadedPendingTransfer &&
|
||||
chipState != CurrentChipLifecycleState.InUse)
|
||||
{
|
||||
return Task.FromResult(Fail(
|
||||
context,
|
||||
MessageKey.ProcessStepFailedWithReason,
|
||||
new object[]
|
||||
{
|
||||
Name,
|
||||
"оƬ״̬δ<CCAC>ﵽ<EFBFBD><EFB5BD>װǰҪ<C7B0><D2AA><EFBFBD><EFBFBD>"
|
||||
}));
|
||||
}
|
||||
|
||||
return Task.FromResult(ActivityResult.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user