Example #1
0
        public static void ToDirectory(GameFont extraFont, string dirPath)
        {
            string xmlPath = FileCommander.EnsureDirectoryExists(dirPath, "Characters.xml");

            XmlElement characters = XmlHelper.CreateDocument("Characters");

            foreach (byte width in extraFont.CharactersWidths)
            {
                characters.CreateChildElement("Character").SetByte("Width", width);
            }
            characters.GetOwnerDocument().Save(xmlPath);

            GameImageWriter.ToDirectory(extraFont.CharactersImage, dirPath);
        }
Example #2
0
 public bool EndWrite()
 {
     FileCommander.EnsureDirectoryExists(_xmlPath);
     _root.GetOwnerDocument().Save(_xmlPath);
     return(true);
 }
Example #3
0
 public bool BeginWrite()
 {
     FileCommander.EnsureDirectoryExists(_xmlPath);
     _root = File.Exists(_xmlPath) ? XmlHelper.LoadDocument(_xmlPath) : XmlHelper.CreateDocument("Location");
     return(true);
 }