Esempio n. 1
0
        void ListInstalled(string[] args)
        {
            IList alist   = args;
            bool  showAll = alist.Contains("-a");

            Console.WriteLine("Installed add-ins:");
            ArrayList list = new ArrayList();

            list.AddRange(registry.GetAddins());
            if (alist.Contains("-r"))
            {
                list.AddRange(registry.GetAddinRoots());
            }
            foreach (Addin addin in list)
            {
                if (!showAll && IsHidden(addin))
                {
                    continue;
                }
                Console.Write(" - " + addin.Name + " " + addin.Version);
                if (showAll)
                {
                    Console.Write(" (" + addin.AddinFile + ")");
                }
                Console.WriteLine();
            }
        }
Esempio n. 2
0
        private Addin[] GetSortedAddinList(string category)
        {
            ArrayList xlist = new ArrayList();
            ArrayList list  = new ArrayList();

            try
            {
                list.AddRange(PluginRegistry.GetAddins());
            }
            catch (Exception)
            {
                Addin[] x = xlist.ToArray(typeof(Addin)) as Addin[];
                return(x);
            }

            foreach (Addin addin in list)
            {
                if (addin.Description.Category == category)
                {
                    xlist.Add(addin);
                }
            }

            Addin[] addins = xlist.ToArray(typeof(Addin)) as Addin[];
            Array.Sort(addins, (r1, r2) => r1.Id.CompareTo(r2.Id));

            return(addins);
        }
Esempio n. 3
0
 internal override bool CheckInstalled(AddinRegistry registry)
 {
     Addin[] addins = registry.GetAddins();
     foreach (Addin addin in addins)
     {
         if (addin.Id == id && addin.SupportsVersion(version))
         {
             return(true);
         }
     }
     return(false);
 }
        void Fill()
        {
            foreach (Addin addin in registry.GetAddins())
            {
                AddAddin(addin);
            }
            foreach (Addin addin in registry.GetAddinRoots())
            {
                AddAddin(addin);
            }

            if (adesc != null && showExtensionPoints)
            {
                string   txt  = AddinManager.CurrentLocalizer.GetString("Local extension points");
                TreeIter iter = store.AppendValues(GLib.Markup.EscapeText(txt), adesc, null, false, false, pixLocalAddin, true, false);
                // Add a dummy node to make sure the expand button is shown
                store.AppendValues(iter, "", null, null, false, false, null, true, true);
            }
        }
        void ListInstalled(string[] args)
        {
            bool showAll = args.Length > 0 && args [0] == "-a";

            Console.WriteLine("Installed add-ins:");
            Addin[] addins = registry.GetAddins();
            foreach (Addin addin in addins)
            {
                if (!showAll && IsHidden(addin))
                {
                    continue;
                }
                Console.Write(" - " + addin.Name + " " + addin.Version);
                if (showAll)
                {
                    Console.Write(" (" + addin.AddinFile + ")");
                }
                Console.WriteLine();
            }
        }
Esempio n. 6
0
 internal override bool CheckInstalled(AddinRegistry registry)
 {
     Addin[] addins = registry.GetAddins ();
     foreach (Addin addin in addins) {
         if (addin.Id == id && addin.SupportsVersion (version)) {
             return true;
         }
     }
     return false;
 }