| | |
| | | _isdoing = true; |
| | | } |
| | | |
| | | MachineState = MachineState.Running; |
| | | MeasureState = MachineState = MachineState.Running; |
| | | |
| | | OnCheckHintUpload?.Invoke(hint, true); |
| | | OnMeasureStart?.Invoke(); |
| | |
| | | |
| | | return new ProcessResponse(); |
| | | } |
| | | |
| | | [ProcessMethod("KeyUnitGenerate", "GenerateKeyUnitByKeyNames", "生成单键配置", InvokeType.TestInvoke)] |
| | | public ProcessResponse GenerateKeyUnitByKeyNames(IOperationConfig opConfig, IDevice invokeDevice, IDevice sourceDevice) |
| | | { |
| | | if (opConfig is KeyUnitGenerateConfig config) |
| | | { |
| | | int i = 1; |
| | | bool isStart = false; |
| | | bool isEnd = false; |
| | | foreach (string k in Config.KeyNameCollection) |
| | | { |
| | | if (k == config.StartKey) |
| | | { |
| | | isStart = true; |
| | | } |
| | | else if (k == config.EndKey) |
| | | { |
| | | isEnd = true; |
| | | } |
| | | |
| | | if (isStart) |
| | | { |
| | | KeyUnit unit = new KeyUnit(); |
| | | unit.Key = unit.AliasName = k; |
| | | unit.SnapshotPointId = config.SnapshotPointId; |
| | | unit.KeyAlgorithemId = config.KeyAlgorithemId; |
| | | unit.KeyResultId = config.KeyResultId; |
| | | unit.ImageSeq = i; |
| | | |
| | | Config.KeyUnitCollection.Add(unit); |
| | | i++; |
| | | } |
| | | |
| | | if (isEnd) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return new ProcessResponse(true); |
| | | } |
| | | #endregion |
| | | |
| | | #region 私有方法 |
| | |
| | | //if (MachineState == MachineState.Running) |
| | | // MachineState = MachineState.Ready; |
| | | |
| | | MeasureState = MachineState.Ready; |
| | | if (MachineState != MachineState.Alarm) |
| | | { |
| | | if (MachineState == MachineState.Pause) |
| | |
| | | kb.FillKeyValues(resultDict); |
| | | } |
| | | else |
| | | { |
| | | |
| | | { |
| | | |
| | | } |
| | | }); |
| | | }); |