Пример #1
0
 private byte[] GetNameData(ImageNameRecord record, Stream stream)
 {
     if (record.Dirty)
     {
         return(record.GetData(GetTempFile()));
     }
     else
     {
         return(record.GetData(stream));
     }
 }
Пример #2
0
        public byte[] GetData()
        {
            if (record.Dirty)
            {
                return(record.GetData(photo.PhotoDatabase.GetTempFile()));
            }
            else
            {
                string file = photo.PhotoDatabase.GetThumbPath(Format);

                using (FileStream stream = File.Open(file, FileMode.Open, FileAccess.Read, FileShare.Read)) {
                    return(record.GetData(stream));
                }
            }
        }