Esempio n. 1
0
        public void RegisterRepositories(bool enable)
        {
            string url = GetPlatformRepositoryUrl();

            if (!Repositories.ContainsRepository(url))
            {
                var rep = Repositories.RegisterRepository(null, url, false);
                rep.Name = Catalog.GetString("Pinta Platform Dependent Add-in Repository");
                if (!enable)
                {
                    Repositories.SetRepositoryEnabled(url, false);
                }
            }

            url = GetAllRepositoryUrl();
            if (!Repositories.ContainsRepository(url))
            {
                var rep2 = Repositories.RegisterRepository(null, url, false);
                rep2.Name = Catalog.GetString("Pinta Platform Independent Add-in Repository");
                if (!enable)
                {
                    Repositories.SetRepositoryEnabled(url, false);
                }
            }
        }
Esempio n. 2
0
 private void RegisterRepository(string url, string name, bool enable)
 {
     if (!Repositories.ContainsRepository(url))
     {
         var rep = Repositories.RegisterRepository(null, url, false);
         rep.Name = name;
         // Although repositories are enabled by default, we should always call this method to ensure
         // that the repository name from the previous line ends up being saved to disk.
         Repositories.SetRepositoryEnabled(url, enable);
     }
 }
        public void RegisterMainRepository(UpdateLevel level, bool enable)
        {
            string url = GetMainRepositoryUrl(level);

            if (!Repositories.ContainsRepository(url))
            {
                var rep = Repositories.RegisterRepository(null, url, false);
                rep.Name = "MonoDevelop Add-in Repository";
                if (level != UpdateLevel.Stable)
                {
                    rep.Name += " (" + level + " channel)";
                }
                if (!enable)
                {
                    Repositories.SetRepositoryEnabled(url, false);
                }
            }
        }
Esempio n. 4
0
        public void RegisterMainRepository(UpdateLevel level, bool enable)
        {
            string url = GetMainRepositoryUrl(level);

            if (!Repositories.ContainsRepository(url))
            {
                var rep = Repositories.RegisterRepository(null, url, false);
                rep.Name = BrandingService.BrandApplicationName("MonoDevelop Extension Repository");
                if (level != UpdateLevel.Stable)
                {
                    rep.Name += " (" + level + " channel)";
                }
                if (!enable)
                {
                    Repositories.SetRepositoryEnabled(url, false);
                }
            }
        }
Esempio n. 5
0
        public bool AreRepositoriesRegistered()
        {
            string url = GetPlatformRepositoryUrl();

            return(Repositories.ContainsRepository(url));
        }
        public bool IsMainRepositoryRegistered(UpdateLevel level)
        {
            string url = GetMainRepositoryUrl(level);

            return(Repositories.ContainsRepository(url));
        }