Exemple #1
0
        private string LoadString(ImageLibOffset location)
        {
            if (location == null)
            {
                return(null);
            }

            return(Encoding.GetEncoding(1252).GetString(LoadBytes(location)));
        }
Exemple #2
0
 public ImageLibItem(string filename, bool hidden, ImageLibOffset title, ImageLibOffset description,
                     ImageLibOffset thumbnail, ImageLibOffset huge, FileInfo libFile)
 {
     Filename     = filename;
     Hidden       = hidden;
     _title       = title;
     _description = description;
     _thumbnail   = thumbnail;
     _huge        = huge;
     _libFile     = libFile;
 }
Exemple #3
0
        private byte[] LoadBytes(ImageLibOffset location)
        {
            if (location == null)
            {
                return(null);
            }

            using (BinaryReader reader = new BinaryReader(_libFile.OpenRead()))
            {
                reader.BaseStream.Seek(location.Offset, SeekOrigin.Begin);
                return(reader.ReadBytes(location.Length));
            }
        }