private static bool IsPackageInstalled(IPackage pack) { string packagePath = SampleProjectsForm.GetPackagePath(pack); //return Directory.Exists(packagePath) && //Directory.EnumerateFiles(packagePath, "*.dspx", SearchOption.AllDirectories).Any<string>(); if (Directory.Exists(packagePath)) { return(NuGet.EnumerableExtensions.Any <string>(Directory.EnumerateFiles(packagePath, "*.dspx", SearchOption.AllDirectories))); } else { return(false); } }
private void uxOnlineProjects_SelectedIndexChanged(object sender, EventArgs e) { if (this.uxOnlineProjects.Items.Count == 0) { this.btnInstall.Enabled = false; return; } IPackage package = this.uxOnlineProjects.SelectedItem as IPackage; if (package == null) { this.btnInstall.Enabled = false; return; } if (SampleProjectsForm.IsPackageInstalled(package)) { this.btnInstall.Enabled = false; return; } this.btnInstall.Enabled = true; }
private void OpenSampleProjects_Click(object sender, EventArgs e) { SampleProjectsForm sampleProjForm = new SampleProjectsForm(App); sampleProjForm.Show(); }
private void OpenSampleProjects_Click(object sender, EventArgs e) { var form = new ExtensionManagerForm(); SampleProjectsForm sampleProjForm = new SampleProjectsForm(App); sampleProjForm.Show(); }
private static string GetPackagePath(IPackage pack) { return(Path.Combine(AppManager.AbsolutePathToExtensions, "Packages", SampleProjectsForm.GetPackageFolderName(pack))); }