UI_Component.cs 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 UI_Component1 m_btnGYP;
  13. public const string URL = "ui://kv0ad4wywlc28";
  14. public const string PACKAGE_NAME = "XiuFang";
  15. public const string RES_NAME = "Component";
  16. private static UI_Component _proxy;
  17. public static UI_Component Create(GObject gObject = null)
  18. {
  19. var ui = new UI_Component();
  20. if(gObject == null)
  21. ui.target = (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
  22. else
  23. ui.target = (GComponent)gObject;
  24. ui.Init(ui.target);
  25. return ui;
  26. }
  27. public static UI_Component Proxy(GObject gObject = null)
  28. {
  29. if(_proxy == null)
  30. {
  31. _proxy = new UI_Component();
  32. }
  33. var ui = _proxy;
  34. if(gObject == null)
  35. ui.target = (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
  36. else
  37. ui.target = (GComponent)gObject;
  38. ui.Init(ui.target);
  39. return ui;
  40. }
  41. public static void ProxyEnd()
  42. {
  43. if (_proxy != null)
  44. {
  45. _proxy.Dispose();
  46. }
  47. }
  48. public static void ClearProxy()
  49. {
  50. ProxyEnd();
  51. _proxy = null;
  52. }
  53. private void Init(GComponent comp)
  54. {
  55. m_btnClothingShop = (UI_Component1)UI_Component1.Create(comp.GetChild("btnClothingShop"));
  56. m_btnSuitSynthetic = (UI_Component1)UI_Component1.Create(comp.GetChild("btnSuitSynthetic"));
  57. m_btnClothingUpgrade = (UI_Component1)UI_Component1.Create(comp.GetChild("btnClothingUpgrade"));
  58. m_btnDecompose = (UI_Component1)UI_Component1.Create(comp.GetChild("btnDecompose"));
  59. m_btnGYP = (UI_Component1)UI_Component1.Create(comp.GetChild("btnGYP"));
  60. }
  61. public void Dispose(bool disposeTarget = false)
  62. {
  63. m_btnClothingShop.Dispose();
  64. m_btnClothingShop = null;
  65. m_btnSuitSynthetic.Dispose();
  66. m_btnSuitSynthetic = null;
  67. m_btnClothingUpgrade.Dispose();
  68. m_btnClothingUpgrade = null;
  69. m_btnDecompose.Dispose();
  70. m_btnDecompose = null;
  71. m_btnGYP.Dispose();
  72. m_btnGYP = null;
  73. if(disposeTarget && target != null)
  74. {
  75. target.RemoveFromParent();
  76. target.Dispose();
  77. }
  78. target = null;
  79. }
  80. }
  81. }