Beispiel #1
0
        /// <summary>
        /// Runs the executable and gets the data needed by the wizard.
        /// </summary>
        /// <param name="executableFile">The file to be executed.</param>
        /// <param name="runManager">The run manager to be used to execute the program.</param>
        /// <param name="data">The data object to be populated.</param>
        public void RunProgramAndGetWizardData(string executableFile, IScenarioRunManager runManager, WizardData data)
        {
            if (runManager == null)
            {
                throw new ArgumentNullException("runManager");
            }

            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            try
            {
                runManager.Initialize(executableFile);
                data.TraceFile = runManager.SetupForTrace();
                runManager.Run(data.Configuration);
            }
            finally
            {
                runManager.RestoreOriginalConfiguration();
            }
        }
 /// <summary>
 /// Initialises a new instance of the <see cref="WizardController"/> class.
 /// </summary>
 /// <param name="view">The view to be controlled by the controller.</param>
 /// <param name="scenarioRunManager">The manager used to control the scenario.</param>
 /// <param name="uiLogic">The UI logic object to use to run scenarios and parse trace files.</param>
 public WizardController(IWizardView view, IScenarioRunManager scenarioRunManager, IUILogic uiLogic)
 {
     this.view = view;
     this.scenarioRunManager = scenarioRunManager;
     this.uiLogic            = uiLogic;
 }
Beispiel #3
0
        public void RunProgramAndGetWizardData(string executableFile, IScenarioRunManager runManager, WizardData data)
        {
            UILogic uiLogic = new UILogic();

            uiLogic.RunProgramAndGetWizardData(executableFile, runManager, data);
        }