public void SetStep(StepEditContext stepEditContext) { this.m_StepEditContext = stepEditContext; cbVariable.DataSource = m_StepEditContext.StateVariables.Primitives(); //Step tpStep.Text = m_StepEditContext.Step.DisplayName; m_StepEditor = StepEditorFactory.GetStepEditor(m_StepEditContext); m_StepEditor.Dock = DockStyle.Fill; tpStep.Controls.Add(m_StepEditor); //Condition if (m_StepEditContext.Step.Condition != null) { m_ConditionalRoot = m_StepEditContext.Step.Condition; //m_CurrentExpression = zUpdateExpressionBuilder(); btnRemoveCondition.Enabled = true; panelExpressionBuilder.Enabled = true; } //Behavior cbStepFailureScope.SelectedItem = m_StepEditContext.Step.FailureScope; zRefreshCondition(); }
private void zEditStep(Step step) { List <StateVariableInfo> variables = AutomationUtils.GetVariablesInStepScope(m_AutomationEngine.Sequence, step); StepEditContext editContext = new StepEditContext(step, m_AutomationEngine.Sequence, m_StepIndex, variables); DialogResult result; using (frmStepEditor editor = new frmStepEditor(editContext)) { result = editor.ShowDialog(); } zRefreshSteps(); if (result == DialogResult.OK) { zOnSequenceChanged(EventArgs.Empty); } }
public frmStepEditor(StepEditContext stepEditContext) : this() { this.SetStep(stepEditContext); }