Пример #1
0
 public override void Handle(EEvet evt, params object[] args)
 {
     if (evt == (EEvet)ID)
     {
         Machine.TranslateToState(ID + 1);
     }
 }
Пример #2
0
 /// <summary>
 /// 发送事件
 /// </summary>
 /// <param name="evt">事件类型</param>
 /// <param name="args">事件参数</param>
 public void SendCommand(EEvet evt, params object[] args)
 {
     if (handle != null)
     {
         handle(evt, args);
     }
 }
Пример #3
0
 public override void Handle(EEvet evt, params object[] args)
 {
     if (evt == EEvet.Tourniquet && (bool)args[0] & (bool)args[1])
     {
         Machine.TranslateToState((int)EEvet.Vessels);
     }
 }
Пример #4
0
 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;
         }
     }
 }
Пример #5
0
    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;
        }
    }
Пример #6
0
 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("采血管未接入");
         }
     }
 }
Пример #7
0
 public override void Handle(EEvet evt, params object[] args)
 {
     if (evt == EEvet.Envisage)
     {
         Machine.TranslateToState((int)EStateIK.Envisage);
     }
 }
Пример #8
0
Файл: Dry.cs Проект: xxmm2018/vb
 protected override void Handle(EEvet evt, params object[] args)
 {
     base.Handle(evt, args);
     if (evt == EVT)
     {
         text.text = "消毒完成,请等待消毒液体完全自然挥发;否则会影响血样结果或导致微生物污染";
     }
 }
Пример #9
0
 protected override void Handle(EEvet evt, params object[] args)
 {
     base.Handle(evt, args);
     if (evt == EVT)
     {
         tips.text = "血液样本采集完成,请拿取棉签按压穿刺点后拔针";
     }
 }
Пример #10
0
 protected override void Handle(EEvet evt, params object[] args)
 {
     base.Handle(evt, args);
     if (evt == EVT)
     {
         tips.text = "请上下颠倒摇匀试管";
     }
 }
Пример #11
0
 protected override void Handle(EEvet evt, params object[] args)
 {
     base.Handle(evt, args);
     if (evt == EVT)
     {
         //timeimage.gameObject.SetActive(false);
     }
 }
Пример #12
0
    //激活image执行切换图片



    protected override void Handle(EEvet evt, params object[] args)
    {
        base.Handle(evt, args);
        if (evt == EVT)
        {
            InvokeRepeating("ChangeIma", 0, 1);
        }
    }
Пример #13
0
 protected override void Handle(EEvet evt, params object[] args)
 {
     base.Handle(evt, args);
     if (evt == EVT)
     {
         LackFunc();
     }
 }
Пример #14
0
 protected override void Handle(EEvet evt, params object[] args)
 {
     base.Handle(evt, args);
     if (evt == EVT)
     {
         tips.text = "请在穿刺点上方6cm处扎压脉带;注意扎带时长,不能超过1分钟;当血液流入采血管时,即可松开止血带";
     }
 }
Пример #15
0
 protected override void Handle(EEvet evt, params object[] args)
 {
     base.Handle(evt, args);
     if (evt == EVT)
     {
         tips1.text = "穿刺成功,请连入采血管,开始采集血液标本";
     }
 }
Пример #16
0
 public override void Handle(EEvet evt, params object[] args)
 {
     //开始检验的时候,让模型移动到指定的位置
     if (evt == EEvet.Choice)
     {
         Machine.TranslateToState((int)EStateAni.Move);
     }
 }
Пример #17
0
 protected override void Handle(EEvet evt, params object[] args)
 {
     base.Handle(evt, args);
     if (evt == EVT)
     {
         tips.text = "请嘱咐患者按压,至少五分钟";
     }
 }
Пример #18
0
    protected override void Handle(EEvet evt, params object[] args)
    {
        base.Handle(evt, args);
        if (evt == EVT)

        {
            tips.text = "绷紧皮肤,针尖斜面向上,与皮肤成5度角刺入";
        }
    }
Пример #19
0
 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;
     }
 }
Пример #20
0
 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);
             }
         }
     }
 }
Пример #21
0
 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);
         }
     }
 }
Пример #22
0
 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);
     }
 }
Пример #23
0
 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);
     }
 }
Пример #24
0
    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    = "";
            }
        }
    }
Пример #25
0
 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);
         }
     }
 }
Пример #26
0
 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();
     }
 }
Пример #27
0
 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);
         }
     }
 }
Пример #28
0
 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("未松止血带");
         }
     }
 }
Пример #29
0
    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);
                }
            }
        }
    }
Пример #30
0
    /// <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);
            }
        }
    }