예제 #1
0
        public override void RunStarted(object automationObject, Dictionary <string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
        {
            _configuration = new WizardConfiguration(replacementsDictionary);

            using (var form = new WizardForm(_configuration))
            {
                if (form.ShowDialog() != DialogResult.OK)
                {
                    throw new WizardBackoutException();
                }
            }

            // A few variables are still missing.

            _configuration.ReplacementsDictionary["$rootnamespace$"] = _configuration.ReplacementsDictionary["$safeprojectname$"];
            _configuration.ReplacementsDictionary[ReplacementVariables.PackageClass] = _configuration.ReplacementsDictionary["$packagename$"] + "Package";

            // Seed the replacements dictionary with encoded values.

            SeedEncodedValues();

            var vsTemplatePath = (string)customParams[0];

            using (var reader = XmlReader.Create(
                       vsTemplatePath,
                       new XmlReaderSettings
            {
                XmlResolver = null,
                DtdProcessing = DtdProcessing.Prohibit,
                IgnoreWhitespace = false
            })
                   ) {
                _packages = GetPackageConfiguration(XDocument.Load(reader));
            }
        }
예제 #2
0
파일: WizardForm.cs 프로젝트: netide/netide
        public WizardForm(WizardConfiguration configuration)
        {
            if (configuration == null)
                throw new ArgumentNullException("configuration");

            _configuration = configuration;

            _stepControls = LoadStepControls();
            _steps = Enum.GetValues(typeof(WizardStep)).Cast<WizardStep>().ToArray();

            InitializeComponent();

            _title = Text;

            SetCurrentStep(WizardStep.Welcome);
        }
예제 #3
0
        public WizardForm(WizardConfiguration configuration)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }

            _configuration = configuration;

            _stepControls = LoadStepControls();
            _steps        = Enum.GetValues(typeof(WizardStep)).Cast <WizardStep>().ToArray();

            InitializeComponent();

            _title = Text;

            SetCurrentStep(WizardStep.Welcome);
        }
예제 #4
0
        public override void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
        {
            _configuration = new WizardConfiguration(replacementsDictionary);

            using (var form = new WizardForm(_configuration))
            {
                if (form.ShowDialog() != DialogResult.OK)
                    throw new WizardBackoutException();
            }

            // A few variables are still missing.

            _configuration.ReplacementsDictionary["$rootnamespace$"] = _configuration.ReplacementsDictionary["$safeprojectname$"];
            _configuration.ReplacementsDictionary[ReplacementVariables.PackageClass] = _configuration.ReplacementsDictionary["$packagename$"] + "Package";

            // Seed the replacements dictionary with encoded values.

            SeedEncodedValues();

            var vsTemplatePath = (string)customParams[0];

            using (var reader = XmlReader.Create(
                vsTemplatePath,
                new XmlReaderSettings
                {
                    XmlResolver = null,
                    DtdProcessing = DtdProcessing.Prohibit,
                    IgnoreWhitespace = false
                })
            ) {
                _packages = GetPackageConfiguration(XDocument.Load(reader));
            }
        }