public void Load(string filename) { FileInfo = new FileInfo(filename); if (FileInfo.Exists) { _tmx = new TMX(FileInfo.OpenRead()); _bitmaps = new List <BitmapInfo> { new BitmapInfo { Bitmap = _tmx.bmp } }; } }
public LoadResult Load(string filename) { LoadResult result = LoadResult.Success; _fileInfo = new FileInfo(filename); if (_fileInfo.Exists) { _tmx = new TMX(new FileStream(_fileInfo.FullName, FileMode.Open, FileAccess.Read)); } else { result = LoadResult.FileNotFound; } return(result); }