示例#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);
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebTemplatePage"/> class.
 /// </summary>
 /// <param name="wizard">The wizard.</param>
 /// <param name="model">The model.</param>
 public WebTemplatePage(ArtifactWizardForm wizard, WebTemplatePresentationModel model)
     : base(wizard)
 {
     _model = model;
     InitializeComponent();
     base.LoadSettings();
     base.Headline    = CKSProperties.WebTemplatePage1_StepTitle;
     base.HelpKeyword = "VS.SharePointTools.SPE.WebTemplate";
 }