CloseUIFormCompleteEventArgs.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. //------------------------------------------------------------
  2. // Game Framework
  3. // Copyright © 2013-2021 loyalsoft. All rights reserved.
  4. // Homepage: http://www.game7000.com/
  5. // Feedback: http://www.game7000.com/
  6. //------------------------------------------------------------
  7. using GameFramework;
  8. using GameFramework.Event;
  9. using GameFramework.UI;
  10. namespace UnityGameFramework.Runtime
  11. {
  12. /// <summary>
  13. /// 关闭界面完成事件。
  14. /// </summary>
  15. public sealed class CloseUIFormCompleteEventArgs : GameEventArgs
  16. {
  17. /// <summary>
  18. /// 关闭界面完成事件编号。
  19. /// </summary>
  20. public static readonly int EventId = typeof(CloseUIFormCompleteEventArgs).GetHashCode();
  21. /// <summary>
  22. /// 初始化关闭界面完成事件的新实例。
  23. /// </summary>
  24. public CloseUIFormCompleteEventArgs()
  25. {
  26. SerialId = 0;
  27. UIFormAssetName = null;
  28. UIGroup = null;
  29. UserData = null;
  30. }
  31. /// <summary>
  32. /// 获取关闭界面完成事件编号。
  33. /// </summary>
  34. public override int Id
  35. {
  36. get
  37. {
  38. return EventId;
  39. }
  40. }
  41. /// <summary>
  42. /// 获取界面序列编号。
  43. /// </summary>
  44. public int SerialId
  45. {
  46. get;
  47. private set;
  48. }
  49. /// <summary>
  50. /// 获取界面资源名称。
  51. /// </summary>
  52. public string UIFormAssetName
  53. {
  54. get;
  55. private set;
  56. }
  57. /// <summary>
  58. /// 获取界面所属的界面组。
  59. /// </summary>
  60. public IUIGroup UIGroup
  61. {
  62. get;
  63. private set;
  64. }
  65. /// <summary>
  66. /// 获取用户自定义数据。
  67. /// </summary>
  68. public object UserData
  69. {
  70. get;
  71. private set;
  72. }
  73. /// <summary>
  74. /// 创建关闭界面完成事件。
  75. /// </summary>
  76. /// <param name="e">内部事件。</param>
  77. /// <returns>创建的关闭界面完成事件。</returns>
  78. public static CloseUIFormCompleteEventArgs Create(GameFramework.UI.CloseUIFormCompleteEventArgs e)
  79. {
  80. CloseUIFormCompleteEventArgs closeUIFormCompleteEventArgs = ReferencePool.Acquire<CloseUIFormCompleteEventArgs>();
  81. closeUIFormCompleteEventArgs.SerialId = e.SerialId;
  82. closeUIFormCompleteEventArgs.UIFormAssetName = e.UIFormAssetName;
  83. closeUIFormCompleteEventArgs.UIGroup = e.UIGroup;
  84. closeUIFormCompleteEventArgs.UserData = e.UserData;
  85. return closeUIFormCompleteEventArgs;
  86. }
  87. /// <summary>
  88. /// 清理关闭界面完成事件。
  89. /// </summary>
  90. public override void Clear()
  91. {
  92. SerialId = 0;
  93. UIFormAssetName = null;
  94. UIGroup = null;
  95. UserData = null;
  96. }
  97. }
  98. }