NotifyEvent.cs 1005 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. namespace Update.Core.Events
  3. {
  4. /// <summary>
  5. /// 通知事件类型
  6. /// </summary>
  7. /// <param name="sender"></param>
  8. /// <param name="e"></param>
  9. public delegate void NotifyEventHandler(object sender, NotifyEventArgs e);
  10. /// <summary>
  11. /// 通知事件数据
  12. /// </summary>
  13. public class NotifyEventArgs : EventArgs
  14. {
  15. /// <summary>
  16. /// 通知信息
  17. /// </summary>
  18. public string Info { get; private set; }
  19. /// <summary>
  20. /// 构造函数
  21. /// </summary>
  22. /// <param name="info"></param>
  23. public NotifyEventArgs(string info)
  24. {
  25. this.Info = info;
  26. }
  27. /// <summary>
  28. /// 构造函数
  29. /// </summary>
  30. /// <param name="format"></param>
  31. /// <param name="args"></param>
  32. public NotifyEventArgs(string format, params object[] args)
  33. {
  34. this.Info = string.Format(format, args);
  35. }
  36. }
  37. }