コード例 #1
0
        public void RunStarted(object automationObject,
        Dictionary<string, string> replacementsDictionary,
        WizardRunKind runKind, object[] customParams)
        {
            bool shouldAdd;
              try
              {
            UserInputForm inputForm = new UserInputForm(replacementsDictionary);
            replacementsDictionary["$targetframeworkversion$"] = "3.5";
            shouldAdd = inputForm.ShowDialog() == DialogResult.OK;
              }
              catch (Exception ex)
              {
            MessageBox.Show(ex.ToString());
            throw new WizardCancelledException("An error occurred.", ex);
              }

              if (!shouldAdd)
            throw new WizardBackoutException("User cancelled the wizard.");
        }
        public void RunStarted(object automationObject,
                               Dictionary <string, string> replacementsDictionary,
                               WizardRunKind runKind, object[] customParams)
        {
            bool shouldAdd;

            try
            {
                UserInputForm inputForm = new UserInputForm(replacementsDictionary);
                replacementsDictionary["$targetframeworkversion$"] = "3.5";
                shouldAdd = inputForm.ShowDialog() == DialogResult.OK;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                throw new WizardCancelledException("An error occurred.", ex);
            }

            if (!shouldAdd)
            {
                throw new WizardBackoutException("User cancelled the wizard.");
            }
        }