_xiaofang/xiaofang/Assets/Script/UI/PanelUI/DatePanel.cs

71 lines
1.9 KiB
C#
Raw Normal View History

2024-12-09 14:20:37 +08:00
using JetBrains.Annotations;
2024-11-29 09:47:47 +08:00
using System.Collections;
using System.Collections.Generic;
using TMPro;
2024-11-29 09:47:47 +08:00
using UnityEngine;
using UnityEngine.UI;
public class DatePanel : MonoBehaviour
{
[Header("<22><><EFBFBD><EFBFBD>")]
public Button calendarBtn; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ť
public GameObject calendarPanel; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2024-11-30 23:32:17 +08:00
public GameObject submitPanel;//ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public Toggle preservationToggle;//<2F><><EFBFBD><EFBFBD>Toggle
2024-11-30 15:11:53 +08:00
public Text SchoolText; //<2F>¹<EFBFBD>У<EFBFBD><D0A3><EFBFBD>ı<EFBFBD>
public Text PlaceText; //<2F>¹ʵص<CAB5><D8B5>ı<EFBFBD>
public Text NumberText; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>
public InputField submitInputField;
public Text submitText;
public Text inputText;
public Text dataText;
2024-12-09 14:20:37 +08:00
public int placeId;
2024-11-29 09:47:47 +08:00
// Start is called before the first frame update
void Start()
{
// ȷ<><C8B7><EFBFBD><EFBFBD>ʼʱ<CABC><CAB1><EFBFBD><EFBFBD><EFBFBD>ǹرյ<D8B1>
calendarPanel.SetActive(false);
2024-11-30 23:32:17 +08:00
preservationToggle.isOn = false;
2024-11-29 09:47:47 +08:00
}
// Update is called once per frame
void Update()
{
}
// <20>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ/<2F><><EFBFBD><EFBFBD>
public void ClickCalendarBtn()
{
// <20>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>״̬
bool isActive = calendarPanel.activeSelf;
calendarPanel.SetActive(!isActive);
}
//<2F><EFBFBD><E1BDBB>ť
2024-11-30 23:32:17 +08:00
public void OnClickSubmitPanel()
2024-12-07 17:47:46 +08:00
{
2024-12-09 14:20:37 +08:00
createTemplateInfo.Instance.auth_CreateTemplate.subjectId = placeId.ToString();
2024-12-07 16:18:15 +08:00
if (preservationToggle.isOn==true)
2024-11-30 23:32:17 +08:00
{
submitPanel.gameObject.SetActive(true);
submitText.text = "<22><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>"+ dataText.text;
if(inputText==null)
{
createTemplateInfo.Instance.auth_CreateTemplate.templateName = submitInputField.text;
}
else
{
createTemplateInfo.Instance.auth_CreateTemplate.templateName = inputText.text;
}
2024-11-30 23:32:17 +08:00
}
}
//ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD>ť
2024-11-30 23:32:17 +08:00
public void OnClickSurePanel()
{
submitPanel.gameObject.SetActive(false);
}
2024-11-29 09:47:47 +08:00
}