GifFrameDimension.cs 923 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. namespace HandyControl.Data;
  3. internal class GifFrameDimension
  4. {
  5. public GifFrameDimension(Guid guid) => Guid = guid;
  6. public Guid Guid { get; }
  7. public static GifFrameDimension Time { get; } = new(new Guid("{6aedbd6d-3fb5-418a-83a6-7f45229dc872}"));
  8. public static GifFrameDimension Resolution { get; } = new(new Guid("{84236f7b-3bd3-428f-8dab-4ea1439ca315}"));
  9. public static GifFrameDimension Page { get; } = new(new Guid("{7462dc86-6180-4c7e-8e3f-ee7333a7a483}"));
  10. public override bool Equals(object o) => o is GifFrameDimension format && Guid == format.Guid;
  11. public override int GetHashCode() => Guid.GetHashCode();
  12. public override string ToString()
  13. {
  14. if (Equals(this, Time)) return "Time";
  15. if (Equals(this, Resolution)) return "Resolution";
  16. if (Equals(this, Page)) return "Page";
  17. return "[FrameDimension: " + Guid + "]";
  18. }
  19. }