Exemple #1
0
 private void RunXpandWizard(XpandModule[] modules, Language language, bool favorAgnostic = false)
 {
     try{
         if (!this.DTE2().Solution.HasAuthentication())
         {
             modules = modules.Except(modules.Where(module => module.IsSecurity)).ToArray();
         }
         var wizardForm = new WizardForm()
         {
             Modules = modules, Language = language, ExistingSolution = _existingSolution, FavorAgnostic = favorAgnostic
         };
         wizardForm.ShowDialog();
     }
     catch (Exception e) {
         this.DTE2().LogError(e.ToString());
         this.DTE2().WriteToOutput(e.ToString());
         throw;
     }
 }
Exemple #2
0
 private void RunXAFWizard(Dictionary <string, string> replacementsDictionary, Language language, DTE2 dte)
 {
     try{
         string templateName = language == Language.VisualBasic ? "vb" : "cs";
         string templatePath = $@"{GetAssemblyLocalPath()}\ProjectTemplates\xaf.{templateName}.vstemplate";
         var    projectName  = replacementsDictionary["$projectname$"];
         var    destination  = replacementsDictionary["$destinationdirectory$"];
         var    solutionPath = Path.GetFullPath(destination + @"\..\");
         dte.Solution.Create(solutionPath, projectName);
         dte.Solution.AddFromTemplate(templatePath, destination, projectName);
         dte.ExecuteCommand("File.SaveAll");
     }
     catch (Exception e) {
         this.DTE2().LogError(e.ToString());
         this.DTE2().WriteToOutput(e.ToString());
         throw;
     }
 }