MyException - 我的异常网
当前位置:我的异常网» C# » 新手:关于委托与事件的有关问题

新手:关于委托与事件的有关问题(4)

www.MyException.Cn  网友分享于:2013-02-20  浏览:11次

                    spParity = System.IO.Ports.Parity.Odd;
                    break;
                case "Even":
                    spParity = System.IO.Ports.Parity.Even;
                    break;
                case "Mark":
                    spParity = System.IO.Ports.Parity.Mark;
                    break;
                case "Space":
                    spParity = System.IO.Ports.Parity.Space;
                    break;
            }
        }

        private void bT_Clear_Click(object sender, EventArgs e)
        {
            //tB_Receive.Clear();
            //Comm com = new Comm(spName, spBaudRate, spParity, spDataBits, spStopBits, spHandShake);

            tB_Receive.Text += comm.s2;
        }

        private void tB_Receive_TextChanged(object sender, System.EventArgs e)
        {
            if (tB_Receive.Text.Length > 0)
            {
                tB_Receive.Select(tB_Receive.Text.Length - 1, 0);   // 如果有換行的数据时,会在最后一行产生空行。
                tB_Receive.ScrollToCaret();
            }
        }

        public void bT_SendMsg_Click(object sender, EventArgs e)
        {
            comm.SendMsg(tB_PhoneNo.Text, tB_Msg.Text);
        }


        private void Delay(int mm)
        {
            DateTime current = DateTime.Now;

            while (current.AddMilliseconds(mm) > DateTime.Now)

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有