UI_Component.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /** This is an automatically generated class by FairyGUI. Please do not modify it. **/
  2. using FairyGUI;
  3. namespace UI.XiuFang
  4. {
  5. public partial class UI_Component
  6. {
  7. public GComponent target;
  8. public UI_Component1 m_btnClothingShop;
  9. public UI_Component1 m_btnSuitSynthetic;
  10. public UI_Component1 m_btnClothingUpgrade;
  11. public UI_Component1 m_btnDecompose;
  12. public const string URL = "ui://kv0ad4wywlc28";
  13. public const string PACKAGE_NAME = "XiuFang";
  14. public const string RES_NAME = "Component";
  15. private static UI_Component _proxy;
  16. public static UI_Component Create(GObject gObject = null)
  17. {
  18. var ui = new UI_Component();
  19. if(gObject == null)
  20. ui.target = (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
  21. else
  22. ui.target = (GComponent)gObject;
  23. ui.Init(ui.target);
  24. return ui;
  25. }
  26. public static UI_Component Proxy(GObject gObject = null)
  27. {
  28. if(_proxy == null)
  29. {
  30. _proxy = new UI_Component();
  31. }
  32. var ui = _proxy;
  33. if(gObject == null)
  34. ui.target = (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
  35. else
  36. ui.target = (GComponent)gObject;
  37. ui.Init(ui.target);
  38. return ui;
  39. }
  40. public static void ProxyEnd()
  41. {
  42. if (_proxy != null)
  43. {
  44. _proxy.Dispose();
  45. }
  46. }
  47. public static void ClearProxy()
  48. {
  49. ProxyEnd();
  50. _proxy = null;
  51. }
  52. private void Init(GComponent comp)
  53. {
  54. m_btnClothingShop = (UI_Component1)UI_Component1.Create(comp.GetChild("btnClothingShop"));
  55. m_btnSuitSynthetic = (UI_Component1)UI_Component1.Create(comp.GetChild("btnSuitSynthetic"));
  56. m_btnClothingUpgrade = (UI_Component1)UI_Component1.Create(comp.GetChild("btnClothingUpgrade"));
  57. m_btnDecompose = (UI_Component1)UI_Component1.Create(comp.GetChild("btnDecompose"));
  58. }
  59. public void Dispose(bool disposeTarget = false)
  60. {
  61. m_btnClothingShop.Dispose();
  62. m_btnClothingShop = null;
  63. m_btnSuitSynthetic.Dispose();
  64. m_btnSuitSynthetic = null;
  65. m_btnClothingUpgrade.Dispose();
  66. m_btnClothingUpgrade = null;
  67. m_btnDecompose.Dispose();
  68. m_btnDecompose = null;
  69. if(disposeTarget && target != null)
  70. {
  71. target.RemoveFromParent();
  72. target.Dispose();
  73. }
  74. target = null;
  75. }
  76. }
  77. }