public override TargetFramework PickFramework(IEnumerable <IUpgradableProject> selectedProjects)
 {
     if (ProfileList.IsPortableLibraryInstalled())
     {
         SelectProfileDialog dlg = new SelectProfileDialog(ProfileList.Instance);
         dlg.Owner = WorkbenchSingleton.MainWindow;
         if (selectedProjects != null)
         {
             var project = selectedProjects.FirstOrDefault() as CompilableProject;
             if (project != null)
             {
                 Profile profile = Profile.LoadProfile(project.TargetFrameworkVersion, project.TargetFrameworkProfile);
                 if (profile != null)
                 {
                     dlg.SelectedProfile = profile;
                 }
             }
         }
         if (dlg.ShowDialog() == true && dlg.SelectedProfile != null)
         {
             return(new PortableTargetFramework(dlg.SelectedProfile));
         }
     }
     else
     {
         new CheckPortableLibraryInstalled().Run();
     }
     return(null);
 }
 public override void Run()
 {
     if (!ProfileList.IsPortableLibraryInstalled())
     {
         using (ToolNotFoundDialog dlg = new ToolNotFoundDialog(CouldNotFindToolsDescription, DownloadUrl)) {
             // our message is long, so make the window bigger than usual
             dlg.Width  += 70;
             dlg.Height += 70;
             dlg.ShowDialog();
         }
     }
 }
예제 #3
0
 public override void Run()
 {
     if (!ProfileList.IsPortableLibraryInstalled())
     {
         using (ToolNotFoundDialog dlg = new ToolNotFoundDialog(
                    StringParser.Parse(
                        "${res:PortableLibrary.CouldNotFindTools}" + Environment.NewLine + Environment.NewLine +
                        "${res:PortableLibrary.ToolsInstallationHelp}"),
                    "http://go.microsoft.com/fwlink/?LinkId=210823"
                    )) {
             // our message is long, so make the window bigger than usual
             dlg.Width  += 70;
             dlg.Height += 70;
             dlg.ShowDialog();
         }
     }
 }