// Token: 0x060028FB RID: 10491 RVA: 0x0009B250 File Offset: 0x00099450 private void method_10(Stream stream, BinaryWriter writer) { writer.Write(this.dictionary_0.Count); foreach (KeyValuePair <string, Class143.Class144> keyValuePair in this.dictionary_0) { Class143.Class144 value = keyValuePair.Value; writer.Write(keyValuePair.Key); writer.smethod_25(value.struct43_0); writer.Write(value.long_0); writer.smethod_31(value.class140_0.DateCreated); writer.Write(value.long_1); value.stream3_0.Position = 0L; value.stream3_0.CopyTo(stream); } }
// Token: 0x060028F5 RID: 10485 RVA: 0x0009AAC8 File Offset: 0x00098CC8 public Bitmap method_5(string filePath) { Class143.Class144 @class = this.method_6(filePath); if (@class == null) { return(null); } if (@class.class140_0.bitmap_0 != null) { return(@class.class140_0.bitmap_0); } @class.memoryStream_0 = new MemoryStream(); @class.stream3_0.Position = 0L; @class.stream3_0.CopyTo(@class.memoryStream_0); @class.memoryStream_0.Seek(0L, SeekOrigin.Begin); return(@class.class140_0.bitmap_0 = (Bitmap)Image.FromStream(@class.memoryStream_0)); }
// Token: 0x060028FA RID: 10490 RVA: 0x0009B11C File Offset: 0x0009931C private void method_9(Stream stream, BinaryReader reader, int version) { int num = reader.ReadInt32(); for (int i = 0; i < num; i++) { Class143.Class144 @class = null; try { @class = new Class143.Class144(); string text = reader.ReadString(); @class.struct43_0 = reader.smethod_24(); @class.long_0 = reader.ReadInt64(); string text2 = Path.Combine(this.class112_0.ScreenshotSaveDirectory, text); @class.class140_0 = new Class140(text, text2, DateTime.FromBinary(reader.ReadInt64())); @class.long_1 = reader.ReadInt64(); if (File.Exists(text2)) { @class.stream3_0 = new Stream3(stream, stream.Position, stream.Position + @class.long_1); if (this.dictionary_0.ContainsKey(text)) { Class143.Class144 class2 = this.dictionary_0[text]; class2.Dispose(); this.dictionary_0.Remove(text); } this.dictionary_0.Add(text, @class); } else { this.int_0++; @class.Dispose(); } } catch { if (@class != null) { @class.Dispose(); } throw; } stream.Position += @class.long_1; } }
// Token: 0x060028F6 RID: 10486 RVA: 0x0009AB60 File Offset: 0x00098D60 private Class143.Class144 method_6(string filePath) { string fileName = Path.GetFileName(filePath); if (this.dictionary_0.ContainsKey(fileName)) { long num; DateTime d; Class234.smethod_13(filePath, out num, out d); Class143.Class144 @class = this.dictionary_0[fileName]; if (@class.long_0 == num && @class.class140_0.DateCreated == d) { return(@class); } @class.Dispose(); this.dictionary_0.Remove(fileName); this.int_0++; } Class143.Class144 class2 = null; Class143.Class144 result; try { class2 = new Class143.Class144(); class2.struct43_0 = Class513.smethod_0(filePath); DateTime dateCreated; Class234.smethod_13(filePath, out class2.long_0, out dateCreated); class2.class140_0 = new Class140(fileName, filePath, dateCreated); using (MemoryStream memoryStream = new MemoryStream()) { using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream)) { using (Bitmap bitmap = (Bitmap)Image.FromFile(filePath)) { binaryWriter.Write(fileName); binaryWriter.smethod_25(class2.struct43_0); binaryWriter.Write(class2.long_0); binaryWriter.Write(class2.class140_0.DateCreated.ToBinary()); using (MemoryStream memoryStream2 = new MemoryStream()) { Class157.smethod_9(bitmap, memoryStream2, 100, this.ThumbnailSize.Width, this.ThumbnailSize.Height); binaryWriter.Write(memoryStream2.Length); class2.long_1 = memoryStream2.Length; memoryStream2.Seek(0L, SeekOrigin.Begin); memoryStream2.CopyTo(memoryStream); } this.stream_0.Seek(0L, SeekOrigin.End); memoryStream.Seek(0L, SeekOrigin.Begin); memoryStream.CopyTo(this.stream_0); } } } this.stream_0.Seek(-class2.long_1, SeekOrigin.Current); class2.stream3_0 = new Stream3(this.stream_0, this.stream_0.Position, this.stream_0.Position + class2.long_1); this.dictionary_0.Add(fileName, class2); this.stream_0.Seek((long)(Class143.byte_0.Length + 4), SeekOrigin.Begin); using (Stream3 stream = new Stream3(this.stream_0)) { using (BinaryWriter binaryWriter2 = new BinaryWriter(stream)) { binaryWriter2.Write(this.dictionary_0.Count); } } result = class2; } catch (Exception ex) { if (class2 != null) { class2.Dispose(); } ex.smethod_1(new object[] { filePath }); result = null; } return(result); }