Exemple #1
0
            /// <summary>
            ///     Executes the action
            /// </summary>
            /// <param name="e"></param>
            protected override void OnClick(EventArgs e)
            {
                Step newStep = (Step)acceptor.getFactory().createStep();

                newStep.Enclosing = TimeLineControl.TestCase;

                SubStep subStep = (SubStep)acceptor.getFactory().createSubStep();

                subStep.Name = "Substep 1";
                newStep.appendSubSteps(subStep);

                TestCase testCase = GetTestCase();

                if (Step != null)
                {
                    newStep.Name = "NewStep";
                    int index = TimeLineControl.Steps.IndexOf(Step);
                    testCase.Steps.Insert(index + 1, newStep);
                    newStep.setFather(testCase);
                }
                else
                {
                    newStep.Name = "Step " + (TimeLineControl.Steps.Count + 1);
                    testCase.Steps.Add(newStep);
                    newStep.setFather(testCase);
                }

                base.OnClick(e);
            }