Ejemplo n.º 1
0
        public void Load(string FileName)
        {
            CONF.XmlLoad X = new CONF.XmlLoad();

            if (!X.Load(FileName)) return;

            while (X.Read())
            {
                switch (X.ElementName)
                {
                    case "project": AddProject(X); break;
                }
            }

            X.Close();
        }
Ejemplo n.º 2
0
        public void Load(string Path, string FileName)
        {
            CONF.XmlLoad X = new CONF.XmlLoad();

            if (!X.Load(Path + FileName)) return;
            while (X.Read())
            {
                switch (X.ElementName)
                {
                    case "option":
                        {
                            string Name = X.GetAttribute("name");
                            string Value = X.GetAttribute("value");

                            OptionList.Add(new ProgOption(Name, Value));
                        }
                        break;
                }
            }

            X.Close();
        }
Ejemplo n.º 3
0
        public void Load(string Path, string FileName)
        {
            CONF.XmlLoad X = new CONF.XmlLoad();

            if (!X.Load(Path + FileName)) return;
            while (X.Read())
            {
                switch (X.ElementName)
                {
                    case "tool":
                        {
                            string FN = Path + X.GetAttribute("file");
                            int Disabled = X.GetIntAttribute("disabled");
                            bool Custom = X.GetIntAttribute("custom") != 0;

                            if (Disabled == 0) LoadTool(FN, Custom);
                        }
                        break;
                }
            }

            X.Close();
        }
Ejemplo n.º 4
0
        public bool Load(string FileName)
        {
            CONF.XmlLoad X = new CONF.XmlLoad();

            if (!X.Load(FileName)) return false;

            while (X.Read())
            {
                switch (X.ElementName)
                {
                    case "name": Name = X.GetAttribute("value"); break;
                    case "type": Type.Add(X.GetAttribute("value")); break;
                    case "description": Description = X.GetAttribute("value"); break;
                    case "version": DefaultVersion = X.GetAttribute("value"); break;
                    case "script": LoadScript(X.GetSubtree()); break;
                }
            }

            X.Close();

            Dir = Path.GetDirectoryName(FileName) + "\\";

            return true;
        }
Ejemplo n.º 5
0
        public bool Load(string FileName, bool Custom)
        {
            CONF.XmlLoad X = new CONF.XmlLoad();

            if (!X.Load(FileName)) return false;

            while (X.Read())
            {
                if (Custom)
                {
                    switch (X.ElementName)
                    {
                        case "name": ToolName = X.GetAttribute("value"); break;
                        case "path": ToolPath = X.GetAttribute("value"); break;
                        case "actions": LoadCustomActions(X.GetSubtree()); break;
                    }
                }
                else
                {
                    switch (X.ElementName)
                    {
                        case "name": ToolName = X.GetAttribute("value"); break;
                        case "path": ToolPath = X.GetAttribute("value"); break;
                        case "supported": LoadSupportedTypes(X.GetSubtree()); break;
                        case "actions": LoadActions(X.GetSubtree()); break;
                        case "options": LoadOptions(X.GetSubtree()); break;
                    }
                }
            }

            X.Close();

            return true;
        }