public void Load(string filename) { FileInfo = new FileInfo(filename); if (FileInfo.Exists) { _ctxb = new CTXB(FileInfo.OpenRead()); _bitmaps = _ctxb.bmps.Select(o => new BitmapInfo { Bitmap = o }).ToList(); } }
public void Load(string filename) { FileInfo = new FileInfo(filename); if (FileInfo.Exists) { _ctxb = new CTXB(FileInfo.OpenRead()); var _bmpList = _ctxb.bmps.Select((o, i) => new CTXBBitmapInfo { Bitmap = o, Format = _ctxb.settingsList[i].Format.FormatName }).ToList(); _bitmaps = new List <BitmapInfo>(); _bitmaps.AddRange(_bmpList); } }
public LoadResult Load(string filename) { LoadResult result = LoadResult.Success; _fileInfo = new FileInfo(filename); if (_fileInfo.Exists) { _ctxb = new CTXB(new FileStream(_fileInfo.FullName, FileMode.Open, FileAccess.Read)); } else { result = LoadResult.FileNotFound; } return(result); }