예제 #1
0
        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);
            }
        }
예제 #2
0
        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;
        }
예제 #3
0
 private void OpenSampleProjects_Click(object sender, EventArgs e)
 {
     SampleProjectsForm sampleProjForm = new SampleProjectsForm(App);
     sampleProjForm.Show();
 }
예제 #4
0
        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();
 }
예제 #6
0
 private static string GetPackagePath(IPackage pack)
 {
     return(Path.Combine(AppManager.AbsolutePathToExtensions, "Packages", SampleProjectsForm.GetPackageFolderName(pack)));
 }