Esempio n. 1
0
 private void WizardCompletingHandler(object sender, CancellableWizardEventArgs e)
 {
     // Process the data and if it fails prevent the closing of the wizard
     this.mainFileNameTemp = Path.GetTempFileName();
     this.stubFileNameTemp = Path.GetTempFileName();
     try
     {
         this.proxyAssemblies = TraceFileProcessor.ProcessTraceFileInAppDomain(this.scenarioName, e.Data.TraceFile, null, e.Data.Configuration, this.mainFileNameTemp, this.stubFileNameTemp);
     }
     catch (Exception ex)
     {
         this.errorDisplay(ex.Message);
         File.Delete(this.mainFileNameTemp);
         File.Delete(this.stubFileNameTemp);
         e.Cancel = true;
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Raises the <see cref="WizardCompleting"/> event.
        /// </summary>
        /// <param name="e">Cancellable event object.</param>
        protected override void OnClosing(CancelEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            base.OnClosing(e);
            if (this.DialogResult == DialogResult.OK)
            {
                if (this.WizardCompleting != null)
                {
                    CancellableWizardEventArgs cw = new CancellableWizardEventArgs(this.wizardController.FilteredWizardData, e.Cancel);
                    this.WizardCompleting(this, cw);
                    e.Cancel = cw.Cancel;
                }
            }
        }