48 lines
1.3 KiB
C#
48 lines
1.3 KiB
C#
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using TMPro;
|
||
|
|
using UnityEngine;
|
||
|
|
using UnityEngine.UI;
|
||
|
|
|
||
|
|
public class VersionPanel : BasePanel
|
||
|
|
{
|
||
|
|
public TextMeshProUGUI SoftwareNameText;
|
||
|
|
public TextMeshProUGUI DevieceSerialNumText;
|
||
|
|
public TextMeshProUGUI ReleaseVersionText;
|
||
|
|
public TextMeshProUGUI FullVersionText;
|
||
|
|
|
||
|
|
public Button HomeButton;
|
||
|
|
public Button BackButton;
|
||
|
|
|
||
|
|
public override void Init()
|
||
|
|
{
|
||
|
|
// 初始化版本信息显示
|
||
|
|
SoftwareNameText.text = "软件名称: " + "DCS";
|
||
|
|
DevieceSerialNumText.text = "设备序列号: " + SystemInfo.deviceUniqueIdentifier;
|
||
|
|
ReleaseVersionText.text = "发行版本: " + Application.version;
|
||
|
|
FullVersionText.text = "完整版本: " + Application.unityVersion;
|
||
|
|
|
||
|
|
if (HomeButton != null)
|
||
|
|
{
|
||
|
|
HomeButton.onClick.AddListener(() =>
|
||
|
|
{
|
||
|
|
ConfirmDialog.Show("确认", "是否返回主界面?", () =>
|
||
|
|
{
|
||
|
|
ReturnToHome();
|
||
|
|
});
|
||
|
|
});
|
||
|
|
}
|
||
|
|
if (BackButton != null)
|
||
|
|
{
|
||
|
|
BackButton.onClick.AddListener(() =>
|
||
|
|
ConfirmDialog.Show("确认", "是否返回设置界面?", () =>
|
||
|
|
{
|
||
|
|
ClosePanel();
|
||
|
|
ClosePanel();
|
||
|
|
})
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|