123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- using TMPro;
- using UnityEngine;
- using UnityEngine.UI;
- using WS;
- using static MedicineAllConfig;
- /// <summary>
- /// 采集 与加工
- /// </summary>
- public enum HarProcessType
- {
- 基础信息,
- 产地与生境,
- 采集方法,
- 加工方法,
- Count,
- }
- /// <summary>
- /// 古文献
- /// </summary>
- public enum GuWenXianType
- {
- 鲜地黄,
- 生地黄,
- 熟地黄,
- 熟地黄炭,
- Count,
- }
- /// <summary>
- /// 药物炮制
- /// </summary>
- public enum YaoWuPaoZhiType
- {
- 鲜地黄采集与加工,
- 生地黄_切制,
- 熟地黄_切制,
- 熟地黄,
- 熟地黄炭,
- Count,
- }
- /// <summary>
- /// 资源与鉴定
- /// </summary>
- public enum ResCheckType
- {
- 资源分别,
- 生地黄结构,
- 熟地黄形态,
- 熟地黄炭形态,
- Count,
- }
- public class HarProcessController : Controller<HarProcessView, HarProcessModel>
- {
- public override void Dispose()
- {
- base.Dispose();
- }
- public void ShowUI(int medicineId)
- {
- }
- protected override void BindingViewModel()
- {
- this._Model.Bind(this._View.btnBack, () =>
- {
- Debug.Log("返回主页面");
- FacadeComponent.Instance.CreateController<SearchTypeEntryController>().OpenView();
- CloseView();
- });
- //https://ar-1303083714.cos.ap-nanjing.myqcloud.com/tet.mp4
- //生成事件sliderz
- this._View.toggleHelp.TogCreateBindEvent((idx, on, off) =>
- {
- on.transform.Find("txt").GetComponent<TextMeshProUGUI>().text = ((HarProcessType)idx).ToString();
- off.transform.Find("txt").GetComponent<TextMeshProUGUI>().text = ((HarProcessType)idx).ToString();
- }, (idx) =>
- {
- switch (((HarProcessType)idx))
- {
- case HarProcessType.基础信息:
- Debug.Log("展示基础信息!");
- break;
- case HarProcessType.产地与生境:
- Debug.Log("产地与生境!");
- break;
- case HarProcessType.采集方法:
- Debug.Log("采集方法!");
- break;
- case HarProcessType.加工方法:
- Debug.Log("加工方法!");
- break;
- case HarProcessType.Count:
- break;
- default:
- break;
- }
- }, (int)HarProcessType.Count);
- this._View.toggleHelp.TogInitUI();
- }
- }
- public class HarProcessModel : Model
- {
- public CoursType curCourstype;
- public MedicineEle medicine;
- public override void InitProperty()
- {
- }
- }
- public class HarProcessView : View
- {
- public TMPro.TMP_InputField ifMedcineSeach;
- public ScrollRect svSeach;
- public ScrollRect svMedcineAll;
- public TMPro.TextMeshProUGUI txtMedcineDes;
- public TMPro.TextMeshProUGUI txtMedcineName;
- public TMPro.TextMeshProUGUI txtTitle;
- public Button btnEnterClass;
- public Button btnBack;
- public ToggleHelp toggleHelp;
- public override void LoadInit()
- {
- ShowModeType = ViewShowModeType.Screen;
- ReferenceCollector rc = UIGameObject.GetComponent<ReferenceCollector>();
- ifMedcineSeach = rc.GetComponent<TMP_InputField>("ifMedcineSeach");
- svSeach = rc.GetComponent<ScrollRect>("svSeach");
- svMedcineAll = rc.GetComponent<ScrollRect>("svMedcineAll");
- txtMedcineName = rc.GetComponent<TextMeshProUGUI>("txtMedcineName");
- txtMedcineDes = rc.GetComponent<TextMeshProUGUI>("txtMedcineDes");
- txtTitle = rc.GetComponent<TextMeshProUGUI>("txtTitle");
- btnEnterClass = rc.GetComponent<Button>("btnEnterClass");
- btnBack = rc.GetComponent<Button>("btnBack");
- toggleHelp = rc.GetComponent<ToggleHelp>("cttTog");
- }
- }
|