public UserTileBinaryReader(Stream stream, UserTileBinary userTile)
        {
            if (stream == null) throw new ArgumentNullException("stream");
            if (userTile == null) throw new ArgumentNullException("userTile");

            this.stream = stream;
            this.userTile = userTile;
        }
Exemple #2
0
        public static UserTileBinary LoadFrom(Stream stream)
        {
            if (stream == null) throw new ArgumentNullException("stream");

            var result = new UserTileBinary();
            var reader = new UserTileBinaryReader(stream, result);
            reader.Read();
            return result;
        }
Exemple #3
0
        static void SetUserTile(string userName, string path)
        {
            var userTile = new UserTileBinary { Format = "bmp", SourcePath = path };

            userTile.SetImageData(Image.FromFile(path));

            var userTileData = new MemoryStream();
            userTile.SaveTo(userTileData);
            SetUserTileData(userName, userTileData.ToArray());
        }