Esempio n. 1
0
            public void ScriptUpdateWait(SeparationMethodStage stageType, string waitForSymbolName, bool addCommand)
            {
                ITimeStep stage = m_EditMethod.Stages.GetFirstTimeStepOfStage(stageType, addCommand);

                if (!addCommand && stage == null)
                {
                    return;
                }

                string waitForSymbolPath = GetSymbolPath(m_Page, waitForSymbolName);

                ISymbolStep waitForSymbolStep = DDKHelper.FindStepInStage(CommandName.Wait, stage, new string[] { waitForSymbolPath });

                if (addCommand)
                {
                    if (waitForSymbolStep == null)
                    {
                        // System Wait always exist, therefore not checking for nulls
                        ICommand     command     = m_EditMethod.SymbolTable.Child(CommandName.Wait) as ICommand;
                        ICommandStep commandStep = m_Page.Component.CreateStep(command) as ICommandStep;
                        string       path        = m_DeviceSymbol.Child(waitForSymbolName).Path;
                        commandStep.Parameters[0].ValueExpression.Parse(path, ExpressionParseOptions.None);
                        stage.SymbolSteps.Add(commandStep);
                    }
                }
                else
                {
                    if (waitForSymbolStep != null)
                    {
                        waitForSymbolStep.Remove();
                    }
                }
            }
 public static void Execute2(this ICommandStep step, CommandParameters cParams)
 {
     if (step is ICommandStep2 step2)
     {
         step2.PreExecute();
         step2.Execute(cParams);
         step2.PostExecute();
     }
     else
     {
         step2.Execute(cParams);
     }
 }
Esempio n. 3
0
 public ConcreteStepDecorator(ICommandStep commandStep) : base(commandStep)
 {
 }
Esempio n. 4
0
 public StepDecorator(ICommandStep commandStep)
 {
     this._commandStep = commandStep;
 }