public void createTool(string tool, string cmd, GuiDynamicCtrlArrayControl toolsArray)
        {
            var        oc1       = new ObjectCreator("GuiControl");
            GuiControl container = oc1.Create();

            var oc = new ObjectCreator("GuiBitmapButtonCtrl");

            oc["Extent"]     = "108 81";
            oc["position"]   = "35 0";
            oc["bitmap"]     = "art/gui/no-preview";
            oc["altCommand"] = "ToolsDlg.execute(\\\"" + this["cwd"] + "/" + cmd + ".bat\\\");";
            GuiBitmapButtonCtrl bitmap = oc.Create();

            var oc2 = new ObjectCreator("GuiTextCtrl");

            oc2["text"]     = tool;
            oc2["Extent"]   = "108 30";
            oc2["position"] = "35 85";
            GuiTextCtrl text = oc2.Create();

            container.addGuiControl(bitmap);
            container.addGuiControl(text);

            toolsArray.addGuiControl(container);
        }
        public void LoadControls(GuiControl obj, int paletteGroup)
        {
            GuiDynamicCtrlArrayControl ToolsPaletteArray = "ToolsPaletteArray";

            for (int i = obj.getCount(); i != 0; i--)
            {
                ((GuiControl)obj.getObject(0)).visible        = false;
                ((GuiControl)obj.getObject(0))["groupNum"]    = paletteGroup.AsString();
                ((GuiControl)obj.getObject(0))["paletteName"] = obj.getName();
                ToolsPaletteArray.addGuiControl(obj.getObject(0));
            }
        }