123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- /****************************************************************************
- * 2023.10 DESKTOP-DL7CJI0
- ****************************************************************************/
- using System;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- using QFramework;
- using UnityEditor;
- using ChivaXR;
- using System.Collections;
- namespace QFramework
- {
- public partial class ExamInfo : UIElement
- {
- private void Awake()
- {
- //SubmitBtn.onClick.AddListener(() =>
- //{
- // UIKit.GetPanel<PC_OperatePanel>().SubmitResult.gameObject.SetActive(true);
- //});
- //ExamHelpBtn.onClick.AddListener(ExamHelpBtnClick);
- }
- /// <summary>
- /// ¿¼ÊÔÓÃʱ
- /// </summary>
- /// <param name="time"></param>
- public void SetExamTime(int time)
- {
- TimeSpan ts = new TimeSpan(0, 0, Convert.ToInt32(time));
- string str = "";
- if (ts.Hours > 0)
- {
- str = String.Format("{0:00}", ts.Hours) + ":" + String.Format("{0:00}", ts.Minutes) + ":" + String.Format("{0:00}", ts.Seconds);
- }
- if (ts.Hours == 0 && ts.Minutes > 0)
- {
- str = "00:" + String.Format("{0:00}", ts.Minutes) + ":" + String.Format("{0:00}", ts.Seconds);
- }
- if (ts.Hours == 0 && ts.Minutes == 0)
- {
- str = "00:00:" + String.Format("{0:00}", ts.Seconds);
- }
- ExamTime.text = str;
- }
- protected override void OnBeforeDestroy()
- {
- }
- public void ShowWrongInfo(string info)
- {
- StopAllCoroutines();
- WrongInfo.text = "";
- StartCoroutine(WaitShowWrongInfo(info));
- }
- IEnumerator WaitShowWrongInfo(string info)
- {
- ErrorInfoTitle.gameObject.SetActive(true);
- WrongInfo.text = info;
- ErrorInfoTitle.rectTransform.sizeDelta = new Vector2(WrongInfo.rectTransform.sizeDelta.x + 100, ErrorInfoTitle.rectTransform.sizeDelta.y);
- yield return new WaitForSeconds(2);
- ErrorInfoTitle.gameObject.SetActive(false);
- }
- private void ExamHelpBtnClick()
- {
- OperateSetting.Instance.ToolPackUILogic.SetHint(true);
- ExamManagerForPC.instance.RecordFault(ProcessManagement.Instance.currentStepID,ErrorReason.SelectWrongTarget);
- }
- }
- }
|