Files
2025-01-25 04:38:09 +08:00

41 lines
1.0 KiB
C#

namespace Thousandto.Launcher.Form
{
/// <summary>
/// 版本的面板
/// </summary>
public class UIVersionPanel : IUIInnerPanelBase
{
UILabel _AppVer;
UILabel _ResVer;
//应用版本值
private string _appVerVal;
//资源版本值
private string _resVerVal;
public void SetData(string app,string res,bool autoRefresh = true)
{
_appVerVal = app;
_resVerVal = res;
if (autoRefresh) Refresh();
}
protected override void OnInitialize()
{
_AppVer = Trans.Find("Content/AppVer").GetComponent<UILabel>();
_ResVer = Trans.Find("Content/ResVer").GetComponent<UILabel>();
_AppVer.text = "";
_ResVer.text = "";
base.OnInitialize();
}
protected override void OnRefresh()
{
_AppVer.text = _appVerVal;
_ResVer.text = _resVerVal;
base.OnRefresh();
}
}
}