Esempio n. 1
0
        public LocationParent(Locations loc, XmlElement element)
            : base(loc, element) {

        }
 public LocationRegistry(Locations loc, XmlElement element)
     : base(loc, element) {
 }
 public LocationShortcut(Locations loc, XmlElement element)
     : base(loc, element) {
 }
 public LocationRegistry(Locations loc, string root, string key, string value)
     : base(loc) {
     this.Root = root;
     this.Key = key;
     this.Value = value;
 }
Esempio n. 5
0
        protected override void LoadData(XmlElement element) {
            this.ID = new GameIdentifier(Game.Name, element);

            foreach (XmlAttribute attrib in element.Attributes) {
                if (GameIdentifier.attributes.Contains(attrib.Name))
                    continue;

                switch (attrib.Name) {
                    case "virtualstore":
                        IgnoreVirtualStore = attrib.Value == "ignore";
                        break;
                    case "detect":
                        DetectionRequired = attrib.Value == "required";
                        break;
                    case "deprecated":
                        IsDeprecated = Boolean.Parse(attrib.Value);
                        break;
                    default:
                        throw new NotSupportedException(attrib.Name);
                }
            }
            Links.Clear();
            foreach (XmlElement sub in element.ChildNodes) {
                switch (sub.Name) {
                    case "title":
                        _title = sub.InnerText;
                        break;
                    case "locations":
                        this.Locations = new GameSaveInfo.Locations(this, sub);
                        break;
                    case "files":
                        FileType type = new FileType(this, sub);
                        FileTypes.Add(type.Type, type);
                        break;
                    case "ps_code":
                        PlayStationIDs.Add(APlayStationID.Create(this, sub));
                        break;
                    case "contributor":
                        Contributors.Add(sub.InnerText);
                        break;
                    case "comment":
                        Comment = sub.InnerText;
                        break;
                    case "restore_comment":
                        RestoreComment = sub.InnerText;
                        break;
                    case "identifier":
                        Identifiers.Add(new Identifier(this, sub));
                        break;
                    case "scummvm":
                        ScummVMs.Add(new ScummVM(this, sub));
                        break;
                    case "linkable":
                        Links.Add(new Link(this, sub));
                        break;
                    case "registry":
                        RegistryType rtype = new RegistryType(this, sub);
                        RegistryTypes.Add(rtype.Type, rtype);
                        break;
                    default:
                        throw new NotSupportedException(sub.Name);
                }
            }
        }