Ejemplo n.º 1
0
        public static ToolboxList create()
        {
            ToolboxList list = new ToolboxList();

            foreach (string folder in Directory.EnumerateDirectories(Util.getToolboxesPath()))
            {
                try
                {
                    Toolbox tlb    = Toolbox.xml2toolbox(folder + "/toolbox.xml");
                    string  nombre = Path.GetFileName(Path.GetFullPath(folder));
                    if (nombre == tlb.name)
                    {
                        tlb.icon = System.Drawing.Image.FromFile(Util.getToolboxesPath() + tlb.name + "/icon.png");
                        list.Add(tlb);
                    }
                } catch { continue; }
            }
            return(list);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            if (args.Length == 1)
            {
                try
                {
                    ToolboxList tlbList = ToolboxList.create();
                    Toolbox     tlb     = tlbList.getFromName(args[0]);
                    form = new ToolboxForm();
                    form.setToolbox(tlb);
                    Application.Run(form);
                } catch (Exception) {
                    //Application.Exit();
                }
            }
            else
            {
                return;
            }
        }