private static void Load() { XmlElement config = XmlHelper.LoadDocument(ConfigFile); XmlElement dirs = config["Directories"]; if (dirs != null) { GameDirectory = dirs.FindString("Game"); WorkingDirectory = dirs.FindString("Working"); CVSDirectory = dirs.FindString("CVS"); } XmlElement reserves = config["Reserves"]; if (reserves != null) { AbsoluteReserve = reserves.FindUInt32("Absolute") ?? 0; RelativeReserve = reserves.FindUInt32("Relative") ?? 0; } UserTags = UserTagCollection.SafeLoad(config["UserTags"]); Codepage = FF8TextEncodingCodepage.Unserialize(config) ?? FF8TextEncodingCodepage.Create(); Encoding = new FF8TextEncoding(Codepage); }
private static void Create() { GameDirectory = string.Empty; WorkingDirectory = string.Empty; CVSDirectory = string.Empty; AbsoluteReserve = 2048; RelativeReserve = 10; UserTags = new UserTagCollection(); Codepage = FF8TextEncodingCodepage.Create(); Encoding = new FF8TextEncoding(Codepage); }