/// <summary> /// Runs custom wizard logic when a project has finished generating. /// </summary> /// <param name="project">The project that finished generating.</param> public void ProjectFinishedGenerating(Project project) { //Debug Debug.WriteLine("Umbraco New Project - ProjectFinishedGenerating() event"); try { //File Path stuff _csProjPath = project.FileName; _projectPath = Path.GetDirectoryName(_csProjPath); _solutionPath = Path.GetDirectoryName(_projectPath); _packagePath = Path.Combine(_solutionPath, "packages"); //Version Picker Dialog (WPF Usercontrol) var versionDialog = new VersionPickerDialog(); //Create a WPF Window //Add our WPF UserControl to the window Window versionWindow = new Window { Title = "Create New Umbraco Project Wizard", Content = versionDialog, SizeToContent = SizeToContent.WidthAndHeight, ResizeMode = ResizeMode.NoResize, WindowStartupLocation = WindowStartupLocation.CenterScreen //Icon = new BitmapImage(new Uri("umb-new-blue.ico", UriKind.Relative)) }; //Show the window/dialog versionWindow.ShowDialog(); //Get Selected value from dropdown in dialog to use in GetUmbraco() var chosenVersion = versionDialog.selectedVersion; //Go Get Umbraco from Nuget GetUmbraco(project, chosenVersion); //Wizard Dialog (WPF Usercontrol) var wizard = new WizardDialog(); wizard.umbracoSitePath = _destinationFolder; wizard.umbracoVersion = chosenVersion; wizard.umbracoVersionNumber = chosenVersion; //Create a WPF Window //Add our WPF UserControl to the window Window myWindow = new Window { Title = "Create New Umbraco Project Wizard", Content = wizard, SizeToContent = SizeToContent.WidthAndHeight, ResizeMode = ResizeMode.NoResize, WindowStartupLocation = WindowStartupLocation.CenterScreen //Icon = new BitmapImage(new Uri("umb-new-blue.ico", UriKind.Relative)) }; //Show the window/dialog myWindow.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); Debug.WriteLine(ex); } }