/// #pkgName FGUI包名
/// #panelName UIPanel名字
/// #UIName = $"{#pkgName}{#panelName}" UIKey名字
/// #PropertyDefineArea 属性定义区域
/// #PropertyAssignArea 属性赋值区域
/// #ComponentType 组件类型
/// #PropertyName 属性名字
/// 该脚本由模板创建，不可编辑
/// created by cb 2024
using FairyGUI;
using XGame.Framework.FGUI;
using XGame.Framework.UI;

namespace FL.FGUI
{
    /// <summary>
    /// 该脚本由模板创建，不可修改，不可编辑
    /// </summary>
    public partial class DragonEggUpgradeVM : FguiViewModel
    {
        public Controller State { get; private set; }
        public GTextField GoldNumLabel { get; private set; }
        public GButton GoldAddBtn { get; private set; }
        public GTextField PropNumLabel { get; private set; }
        public GButton PropAddBtn { get; private set; }
        public GTextField CurLv { get; private set; }
        public GTextField NextLv { get; private set; }
        public GTextField MaxLv { get; private set; }
        public GTextField UnLockLabel { get; private set; }
        public GTextField CdLabel { get; private set; }
        public GTextField NeedTimeLabel { get; private set; }
        public GList EggQualityList { get; private set; }
        public GProgressBar EggEnergyBar { get; private set; }
        public GButton UpgradeBtn { get; private set; }
        public GButton BuyBtn { get; private set; }
        public GButton AdBtn { get; private set; }
        public GButton SpeedBtn { get; private set; }
        public GButton CloseBtn { get; private set; }

        protected override void BindComponents(GComponent panel, IUIViewAdapter adapter)
        {
            State = panel.GetController("State");
            GoldNumLabel = panel.GetChild("GoldNumLabel") as GTextField;
            GoldAddBtn = panel.GetChild("GoldAddBtn") as GButton;
            PropNumLabel = panel.GetChild("PropNumLabel") as GTextField;
            PropAddBtn = panel.GetChild("PropAddBtn") as GButton;
            CurLv = panel.GetChild("CurLv") as GTextField;
            NextLv = panel.GetChild("NextLv") as GTextField;
            MaxLv = panel.GetChild("MaxLv") as GTextField;
            UnLockLabel = panel.GetChild("UnLockLabel") as GTextField;
            CdLabel = panel.GetChild("CdLabel") as GTextField;
            NeedTimeLabel = panel.GetChild("NeedTimeLabel") as GTextField;
            EggQualityList = panel.GetChild("EggQualityList") as GList;
            EggQualityList.Init(typeof(DragonEggEggQualityListView), adapter.CreateListItem);
            EggEnergyBar = panel.GetChild("EggEnergyBar") as GProgressBar;
            UpgradeBtn = panel.GetChild("UpgradeBtn") as GButton;
            BuyBtn = panel.GetChild("BuyBtn") as GButton;
            AdBtn = panel.GetChild("AdBtn") as GButton;
            SpeedBtn = panel.GetChild("SpeedBtn") as GButton;
            CloseBtn = panel.GetChild("CloseBtn") as GButton;

        }
    }
}