SystemNoticeView.cs 1007 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using FairyGUI;
  2. using UI.Login;
  3. namespace GFGGame
  4. {
  5. public class SystemNoticeView : BaseWindow
  6. {
  7. private UI_NoticeUI _ui;
  8. public override void Dispose()
  9. {
  10. if (_ui != null)
  11. {
  12. _ui.Dispose();
  13. _ui = null;
  14. }
  15. base.Dispose();
  16. }
  17. protected override void OnInit()
  18. {
  19. base.OnInit();
  20. _ui = UI_NoticeUI.Create();
  21. this.viewCom = _ui.target;
  22. this.viewCom.Center();
  23. this.modal = true;
  24. }
  25. protected override void OnShown()
  26. {
  27. base.OnShown();
  28. string title = (this.viewData as object[])[0].ToString();
  29. string content = (this.viewData as object[])[1].ToString();
  30. _ui.m_txtTitle.text = title;
  31. _ui.m_comContent.m_txtContent.text = content;
  32. }
  33. protected override void OnHide()
  34. {
  35. base.OnHide();
  36. }
  37. }
  38. }