public override void Handle(EEvet evt, params object[] args) { if (evt == (EEvet)ID) { Machine.TranslateToState(ID + 1); } }
/// <summary> /// 发送事件 /// </summary> /// <param name="evt">事件类型</param> /// <param name="args">事件参数</param> public void SendCommand(EEvet evt, params object[] args) { if (handle != null) { handle(evt, args); } }
public override void Handle(EEvet evt, params object[] args) { if (evt == EEvet.Tourniquet && (bool)args[0] & (bool)args[1]) { Machine.TranslateToState((int)EEvet.Vessels); } }
public override void Handle(EEvet evt, params object[] args) { /*递交命令 * 格式:类型,手1位置,手2位置,可否转头,追踪位置 * */ if (evt == EEvet.HandOver) { Machine.TranslateToState((int)EStateIK.HandOver); } if (evt == EEvet.Diagnose) { Machine.TranslateToState((int)EStateIK.Diagnose); } if (evt == EEvet.Nod) { Machine.TranslateToState((int)EStateIK.Nod); } //诊断时控制头的IK动画 if (evt == EEvet.Envisage) { if (args.Length > 0) { m_Owner.isTrace = (bool)args[0]; m_Owner.head = GameObject.Find("Eye").transform; } } }
void Speak(string ask) { switch (ask) { case "你好": Synthesis("你好"); break; case "你叫什么名字": Synthesis("张三"); break; case "你叫张三": Synthesis("是的"); evt = EEvet.CheckPatient; break; case "按压五分钟": Synthesis("好的谢谢"); evt = EEvet.Control; break; default: break; } }
public override void Handle(EEvet evt, params object[] args) { // throw new NotImplementedException(); //接收外部硬件模拟的连接采血管命令 //采血管是否接入 位置偏差 当前的采血针回缩量 //args 0 1 2 if (evt == EEvet.ContinuousBloodCollection) { if ((bool)args[0]) { if ((bool)args[1]) { if ((float)args[2] > 0) { Machine.TranslateToState((int)EEvet.LooseTourniquet); } else { VMessageOut._instance.OutMessage("采血针回缩量小于零"); } } else { VMessageOut._instance.OutMessage("位置有偏差"); } } else { VMessageOut._instance.OutMessage("采血管未接入"); } } }
public override void Handle(EEvet evt, params object[] args) { if (evt == EEvet.Envisage) { Machine.TranslateToState((int)EStateIK.Envisage); } }
protected override void Handle(EEvet evt, params object[] args) { base.Handle(evt, args); if (evt == EVT) { text.text = "消毒完成,请等待消毒液体完全自然挥发;否则会影响血样结果或导致微生物污染"; } }
protected override void Handle(EEvet evt, params object[] args) { base.Handle(evt, args); if (evt == EVT) { tips.text = "血液样本采集完成,请拿取棉签按压穿刺点后拔针"; } }
protected override void Handle(EEvet evt, params object[] args) { base.Handle(evt, args); if (evt == EVT) { tips.text = "请上下颠倒摇匀试管"; } }
protected override void Handle(EEvet evt, params object[] args) { base.Handle(evt, args); if (evt == EVT) { //timeimage.gameObject.SetActive(false); } }
//激活image执行切换图片 protected override void Handle(EEvet evt, params object[] args) { base.Handle(evt, args); if (evt == EVT) { InvokeRepeating("ChangeIma", 0, 1); } }
protected override void Handle(EEvet evt, params object[] args) { base.Handle(evt, args); if (evt == EVT) { LackFunc(); } }
protected override void Handle(EEvet evt, params object[] args) { base.Handle(evt, args); if (evt == EVT) { tips.text = "请在穿刺点上方6cm处扎压脉带;注意扎带时长,不能超过1分钟;当血液流入采血管时,即可松开止血带"; } }
protected override void Handle(EEvet evt, params object[] args) { base.Handle(evt, args); if (evt == EVT) { tips1.text = "穿刺成功,请连入采血管,开始采集血液标本"; } }
public override void Handle(EEvet evt, params object[] args) { //开始检验的时候,让模型移动到指定的位置 if (evt == EEvet.Choice) { Machine.TranslateToState((int)EStateAni.Move); } }
protected override void Handle(EEvet evt, params object[] args) { base.Handle(evt, args); if (evt == EVT) { tips.text = "请嘱咐患者按压,至少五分钟"; } }
protected override void Handle(EEvet evt, params object[] args) { base.Handle(evt, args); if (evt == EVT) { tips.text = "绷紧皮肤,针尖斜面向上,与皮肤成5度角刺入"; } }
public override void Handle(EEvet evt, params object[] args) { //诊断时控制头的IK动画 base.Handle(evt, args); if (evt == EEvet.Diagnose) { m_Owner.head = GameObject.Find(args[0].ToString()).transform; } }
public override void Handle(EEvet evt, params object[] args) { if (evt == EEvet.Model) { if (args.Length > 0) { if ((int)args[0] == 1) { Machine.TranslateToState((int)EEvet.Check); } } } }
public override void Handle(EEvet evt, params object[] args) { //throw new NotImplementedException(); //有采集量,可以未达到目标量;且拔出试管 //args 0 true if (evt == EEvet.BloodCollection) { if (progress > 0.1f && (bool)args[0]) { Machine.TranslateToState((int)EEvet.ShakeUp); } } }
protected override void Handle(EEvet evt, params object[] args) { base.Handle(evt, args); if (evt == EVT) { _List = GlobalMgr.Instance.CheckListUIMgr.checkListDic[GlobalMgr.Instance.CheckListUIMgr._curId]; _curList = Instantiate(_List); _curList.transform.SetParent(main); _curList.transform.localPosition = Vector3.zero; _curList.transform.localScale = Vector3.one; _curList.SetActive(true); } }
protected override void Handle(EEvet evt, params object[] args) { base.Handle(evt, args); if (evt == EVT) { list = GlobalMgr.Instance.CheckListUIMgr.checkListDic[GlobalMgr.Instance.CheckListUIMgr._cur._id]; curlist = Instantiate(list); curlist.transform.SetParent(checkList); curlist.transform.localPosition = Vector3.zero; curlist.transform.localScale = new Vector3(0.63f, 0.63f, 1); curlist.SetActive(true); } }
protected override void Handle(EEvet evt, params object[] args) { base.Handle(evt, args); if (args.Length > 0) { if (evt == EVT && !(bool)args[0]) { tipsText.text = "登陆失败,重新登陆"; _name.text = ""; _pass.text = ""; } } }
public override void Handle(EEvet evt, params object[] args) { if (evt == (EEvet)ID) { if (args.Length < 1) { return; } if ((bool)args[0]) { Machine.TranslateToState((int)EEvet.Certificate); } } }
protected override void Handle(EEvet evt, params object[] args) { base.Handle(evt, args); if (evt == EVT) { _tempTag = Instantiate(GlobalMgr.Instance.PrintUIMgr.TagDic[0]); _tempTag.transform.SetParent(main); _tempTag.transform.localPosition = new Vector3(-600, 3, 0); _tempTag.transform.localScale = Vector3.one; _tag = _tempTag.transform.Find("Tag").gameObject; _cur = _tag.AddComponent <PasteTag>(); InstTestTube(); } }
public void ServerSend(EEvet evt, params object[] args) { if (NetworkServer.active) { MessageToByte t = new MessageToByte(); MainClass m = new MainClass(); m.message = evt; m.aa = args; t.buff = t.Object2Bytes(m); if (NetworkServer.SendToAll(userMsg, t)) { ShowMsg("Server send:" + m.message); } } }
public override void Handle(EEvet evt, params object[] args) { if (evt == EEvet.LooseTourniquet) { if ((bool)args[0]) { Machine.TranslateToState((int)EEvet.BloodCollection); VMessageOut._instance.OutMessage("松止血带耗时" + timer); } else { VMessageOut._instance.OutMessage("未松止血带"); } } }
public override void Handle(EEvet evt, params object[] args) { // throw new NotImplementedException(); if (evt == EEvet.Pulling) { if (args.Length > 0) { if ((bool)args[0]) { Machine.TranslateToState((int)EEvet.Control); } } } }
/// <summary> /// 客户端向服务器端发送信息 /// </summary> public void ClientSend(EEvet evt, params object[] args) { if (myClient.isConnected) { MessageToByte clientT = new MessageToByte(); MainClass clientM = new MainClass(); clientM.message = evt; clientM.aa = args; clientT.buff = clientT.Object2Bytes(clientM); if (myClient.Send(userMsg, clientT)) { ShowMsg("Server send:" + clientT.buff); } } }