Esempio n. 1
0
        private void Start()
        {
            Task ListenCheckData = new Task(() =>
            {
                Console.WriteLine("start linten 9988");
                RecvMsg recv = new RecvMsg(9988, Drawx);
                recv.Recv(queue);
            });

            //Task DrawUI = new Task(() =>
            //{
            //    Dispatcher.Invoke(new Action(() =>
            //    {
            //        Draw draw = new Draw(
            //            new Canvas[] { this.rhCan, this.spo2Can, this.tempCan },
            //            new TextBlock[] { this.rhBlock, this.spo2Block, this.tempBlock },
            //            queue
            //                );
            //        draw.DrawGraph();
            //    }));
            //});

            //Task ListenAlrm = new Task(() =>
            //{
            //    DoAlrm doAlrm = new DoAlrm();
            //    doAlrm.WaitAlrm();
            //});

            ListenCheckData.Start();
            //DrawUI.Start();
            //ListenAlrm.Start();
        }
Esempio n. 2
0
        public void WaitAlrm()
        {
            RecvMsg recv    = new RecvMsg(9970, () => { Console.WriteLine("in alrm"); });
            string  alrmMsg = recv.Recv();

            //Sound();
            MessageBox.Show(string.Format("{0} error!", alrmMsg), "ERROR");
        }