/// <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); }
/// <summary> /// Initializes a new instance of the <see cref="WebTemplatePresentationModel"/> class. /// </summary> /// <param name="webTemplateProperties">The web template CKSProperties.</param> /// <param name="isOptional">if set to <c>true</c> [is optional].</param> /// <param name="designTimeEnvironment">The design time environment.</param> public WebTemplatePresentationModel(WebTemplateProperties webTemplateProperties, bool isOptional, DTE designTimeEnvironment) : base(isOptional) { if (webTemplateProperties == null) { throw new ArgumentNullException("webTemplateProperties"); } _webTemplateProperties = webTemplateProperties; _designTimeEnvironment = designTimeEnvironment; _sourceurl = _webTemplateProperties.SourceUrl; _webTemplateProperties.PropertyChanged += new PropertyChangedEventHandler(_webTemplateProperties_PropertyChanged); }