CommonDefine.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. using System;
  2. using System.Collections.Generic;
  3. namespace SuperScrollView
  4. {
  5. public enum SnapStatus
  6. {
  7. NoTargetSet = 0,
  8. TargetHasSet = 1,
  9. SnapMoving = 2,
  10. SnapMoveFinish = 3
  11. }
  12. public enum ItemCornerEnum
  13. {
  14. LeftBottom = 0,
  15. LeftTop,
  16. RightTop,
  17. RightBottom,
  18. }
  19. public enum ListItemArrangeType
  20. {
  21. TopToBottom = 0,
  22. BottomToTop,
  23. LeftToRight,
  24. RightToLeft,
  25. }
  26. public enum GridItemArrangeType
  27. {
  28. TopLeftToBottomRight = 0,
  29. BottomLeftToTopRight,
  30. TopRightToBottomLeft,
  31. BottomRightToTopLeft,
  32. }
  33. public enum GridFixedType
  34. {
  35. ColumnCountFixed = 0,
  36. RowCountFixed,
  37. }
  38. public struct RowColumnPair
  39. {
  40. public RowColumnPair(int row1, int column1)
  41. {
  42. mRow = row1;
  43. mColumn = column1;
  44. }
  45. public bool Equals(RowColumnPair other)
  46. {
  47. return this.mRow == other.mRow && this.mColumn == other.mColumn;
  48. }
  49. public static bool operator ==(RowColumnPair a, RowColumnPair b)
  50. {
  51. return (a.mRow == b.mRow)&&(a.mColumn == b.mColumn);
  52. }
  53. public static bool operator !=(RowColumnPair a, RowColumnPair b)
  54. {
  55. return (a.mRow != b.mRow) || (a.mColumn != b.mColumn); ;
  56. }
  57. public override int GetHashCode()
  58. {
  59. return 0;
  60. }
  61. public override bool Equals(object obj)
  62. {
  63. if (ReferenceEquals(null, obj))
  64. {
  65. return false;
  66. }
  67. return (obj is RowColumnPair) && Equals((RowColumnPair)obj);
  68. }
  69. public int mRow;
  70. public int mColumn;
  71. }
  72. }