Esempio n. 1
0
        public void Save(Stream stream)
        {
            if (stream == null)
                return;

            SpriteWriter sw = new SpriteWriter(stream);
            sw.Write(this);
        }
Esempio n. 2
0
        public void Save(string fileName)
        {
            fileName = fileName.Trim();
            if (String.IsNullOrEmpty(fileName))
                return;

            if (!WasChanged)
                return;

            //if (File.Exists(fileName))
            //    return;

            using (FileStream fs = new FileStream(fileName, FileMode.Create))
            {
                SpriteWriter sw = new SpriteWriter(fs);
                sw.Write(this);
            }
        }