Example #1
0
        /// <summary>
        /// Create the wizard forms
        /// </summary>
        /// <param name="designTimeEnvironment">The design time environment</param>
        /// <param name="runKind">The wizard run kind</param>
        /// <returns>The IWizardFormExtension</returns>
        public override IWizardFormExtension CreateWizardForm(DTE designTimeEnvironment, WizardRunKind runKind)
        {
            //TODO: put this back
            _deploymentProperties = new DeploymentProperties();

            ArtifactWizardForm wiz = new ArtifactWizardForm(designTimeEnvironment, CKSProperties.WebTemplate_WizardTitle);

            if (runKind == WizardRunKind.AsNewProject)
            {
                _webTemplateProperties = new WebTemplateProperties(Guid.NewGuid(), _deploymentProperties);
                DeploymentPresentationModel  model  = new DeploymentPresentationModel(_deploymentProperties, false, IsSharePointConnectionRequired);
                WebTemplatePresentationModel model2 = new WebTemplatePresentationModel(_webTemplateProperties, false, designTimeEnvironment);
                DeploymentPage  page  = new DeploymentPage(wiz, model);
                WebTemplatePage page2 = new WebTemplatePage(wiz, model2);
                wiz.AddPage(page);
                wiz.AddPage(page2);
                return(wiz);
            }

            ISharePointProject spProject = DTEManager.ActiveSharePointProject;

            _deploymentProperties.IsSandboxedSolution = spProject.IsSandboxedSolution;
            _deploymentProperties.Url = spProject.SiteUrl;
            _projectName                 = spProject.Name;
            _webTemplateProperties       = new WebTemplateProperties(Guid.NewGuid(), _deploymentProperties);
            _webTemplateProperties.Title = _rootName;
            WebTemplatePresentationModel model3 = new WebTemplatePresentationModel(_webTemplateProperties, false, designTimeEnvironment);
            WebTemplatePage page5 = new WebTemplatePage(wiz, model3);

            wiz.AddPage(page5);
            return(wiz);
        }
 public DeploymentPage(ArtifactWizardForm wiz, DeploymentPresentationModel model) : base(wiz)
 {
     _model = model;
     InitializeComponent();
     base.LoadSettings();
     base.Headline = "WizardResources.DeploymentPageHeadline";
     urlComboBox.AutoCompleteMode   = AutoCompleteMode.Suggest;
     urlComboBox.AutoCompleteSource = AutoCompleteSource.ListItems;
     base.HelpKeyword = "VS.SharePointTools.SPE.FirstWizardPage";
 }