天津23维预案
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
1.2 KiB

using UnityEngine;
using System.Collections;
using AX.MessageSystem;
using UnityEngine.UI;
using System;
public class ExaminationPaperMessage : MonoBehaviour {
// Use this for initialization
public ExaminationPaperObject paper;
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void setPaper(ExaminationPaperObject paper)
{
this.paper = paper;
transform.Find("PaperName").GetComponent<Text>().text = paper.Name;
transform.Find("Creator").GetComponent<Text>().text = paper.CreatorName;
transform.Find("CreateTime").GetComponent<Text>().text = paper.CreateTime.ToString("yyyy-MM-dd HH:mm:ss");
if (paper.CreatorID != MySelf.mySelf.ID)
{
transform.Find("DetailButton").GetComponent<Button>().interactable = false;
}
}
public void updateDetail()
{
MessageDispatcher.SendMessage("SHOW_PAPER_DETAIL", paper);
}
public void CopyDetail()
{
var newPaper = new ExaminationPaperObject();
newPaper.Questions = paper.Questions;
newPaper.Name = paper.Name;
MessageDispatcher.SendMessage("SHOW_PAPER_DETAIL", newPaper);
}
}