No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

OperationProgressData.cs 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. namespace Unity.PlasticSCM.Editor.UI.Progress
  2. {
  3. internal class OperationProgressData
  4. {
  5. internal string ProgressHeader
  6. {
  7. get
  8. {
  9. lock (mLockGuard)
  10. {
  11. return mProgressHeader;
  12. }
  13. }
  14. set
  15. {
  16. lock (mLockGuard)
  17. {
  18. mProgressHeader = value;
  19. }
  20. }
  21. }
  22. internal string TotalProgressMessage
  23. {
  24. get
  25. {
  26. lock (mLockGuard)
  27. {
  28. return mTotalProgressMessage;
  29. }
  30. }
  31. set
  32. {
  33. lock (mLockGuard)
  34. {
  35. mTotalProgressMessage = value;
  36. }
  37. }
  38. }
  39. internal string CurrentBlockProgressMessage
  40. {
  41. get
  42. {
  43. lock (mLockGuard)
  44. {
  45. return mBlockProgressMessage;
  46. }
  47. }
  48. set
  49. {
  50. lock (mLockGuard)
  51. {
  52. mBlockProgressMessage = value;
  53. }
  54. }
  55. }
  56. internal double TotalProgressPercent
  57. {
  58. get
  59. {
  60. lock (mLockGuard)
  61. {
  62. return mTotalProgressPercent;
  63. }
  64. }
  65. set
  66. {
  67. lock (mLockGuard)
  68. {
  69. mTotalProgressPercent = value;
  70. }
  71. }
  72. }
  73. internal double CurrentBlockProgressPercent
  74. {
  75. get
  76. {
  77. lock (mLockGuard)
  78. {
  79. return mBlockProgressPercent;
  80. }
  81. }
  82. set
  83. {
  84. lock (mLockGuard)
  85. {
  86. mBlockProgressPercent = value;
  87. }
  88. }
  89. }
  90. internal bool ShowCurrentBlock
  91. {
  92. get
  93. {
  94. lock (mLockGuard)
  95. {
  96. return mShowCurrentBlock;
  97. }
  98. }
  99. set
  100. {
  101. lock (mLockGuard)
  102. {
  103. mShowCurrentBlock = value;
  104. }
  105. }
  106. }
  107. internal bool CanCancelProgress
  108. {
  109. get
  110. {
  111. lock (mLockGuard)
  112. {
  113. return mCanCancelProgress;
  114. }
  115. }
  116. set
  117. {
  118. lock (mLockGuard)
  119. {
  120. mCanCancelProgress = value;
  121. }
  122. }
  123. }
  124. internal void ResetProgress()
  125. {
  126. lock (mLockGuard)
  127. {
  128. mProgressHeader = string.Empty;
  129. mTotalProgressMessage = string.Empty;
  130. mBlockProgressMessage = string.Empty;
  131. mTotalProgressPercent = 0;
  132. mBlockProgressPercent = 0;
  133. mShowCurrentBlock = false;
  134. mCanCancelProgress = false;
  135. }
  136. }
  137. string mProgressHeader;
  138. string mTotalProgressMessage;
  139. string mBlockProgressMessage;
  140. double mTotalProgressPercent;
  141. double mBlockProgressPercent;
  142. bool mShowCurrentBlock;
  143. bool mCanCancelProgress;
  144. object mLockGuard = new object();
  145. }
  146. }