unityzgy/.svn/pristine/96/96910cd03054dae2d41b34f9b7f6a0e55100375f.svn-base
ayuan9957 bf12e02276 feat: 多语言本地化系统 - 支持中/英/法/俄实时切换
- LocalizationManager: 新增翻译表(SetFormatted/SetDuration/LocalizeOperateMsg)
- LoginPanel: InputField placeholder本地化、字体颜色保持
- HistoryPanel: 用时数据本地化、placeholder本地化
- RecordDetailPanel: 操作详情消息本地化(LanguageChanged重建)
- AppraiseWindowBase: 评价等级本地化、操作消息重建
- EditorAppraiser: 所有评估消息改用InjectOperateMsgLocalized
- StudentOperateRecorder: 新增InjectOperateMsgLocalized方法
- LocalizationLanguageTestBar: 单例模式、ScreenSpaceOverlay筛选
- 字体切换时保留颜色和verticalOverflow
2026-07-16 10:05:59 +08:00

76 lines
2.6 KiB
Plaintext

using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEngine.UI;
using XFramework;
/// <summary>
/// 历史界面弹出显示记录详情信息
/// </summary>
public class RecordDetailPanel : BasePanel
{
const string panelName = "Panel_RecordDeatail";
Text text_msg;//展示操作记录文字
Text text_Title;//记录标题
Text text_useTime;//录屏文件路径
Text text_videoPath;//录屏文件路径
Button button_playVideo;//播放录屏文件
public RecordDetailPanel() : base(new UIType(panelName))
{
}
//初始化界面引用和事件
protected override void InitEvent()
{
ActivePanel.FindChildTrans("Button_Close").GetComponent<Button>().onClick.AddListener(() => Pop());
text_msg = ActivePanel.FindChildTrans("Content_Text").GetComponent<Text>();
text_Title = ActivePanel.FindChildTrans("Text_title").GetComponent<Text>();
text_videoPath = ActivePanel.FindChildTrans("Text_videoPath").GetComponent<Text>();
text_useTime = ActivePanel.FindChildTrans("Text_useTime").GetComponent<Text>();
ActivePanel.FindChildTrans("Button_playVideo").gameObject.SetActive(false);/*GetComponent<Button>().onClick.AddListener(PlayVideo)*/; //赞不实现播放视频功能
}
//根据数据初始化界面
public override void Change(object newData)
{
OperaterRecording operaterRecording = (OperaterRecording)newData;
text_Title.text = $"{operaterRecording.user} {operaterRecording.date}完成{operaterRecording.learnType}科目:{operaterRecording.subName}";
text_useTime.text = $"用时:{operaterRecording.useTime}";
text_msg.text = "";
for (int i = 0; i < operaterRecording.operaterMsg.Count; i++)
{
text_msg.text += $"{operaterRecording.operaterMsg[i]}\r\n";
}
if (!string.IsNullOrEmpty(operaterRecording.videoPath))//存在视频路径
{
if (File.Exists(operaterRecording.videoPath))//判断文件存在
{
text_videoPath.text = $"录屏视频:{operaterRecording.videoPath}";
//button_playVideo.interactable = true;
}
else //视频文件不存在
{
text_videoPath.text = $"录屏视频:{operaterRecording.videoPath}\r\n(视频文件已丢失,无法播放!)";
//button_playVideo.interactable = false;
}
}
else {
text_videoPath.text = "录屏视频:无";
//button_playVideo.interactable = false;
}
}
void PlayVideo()
{
}
}