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