解决方案 »
- 这个JS脚本在WEBBROWSERS里面应该怎么写?
- Managed Debugging Assistant 'PInvokeStackImbalance' has detected a problem in
- DotnetBar Advtree的相关操作
- web中有关用户控件在其它页面被引用的写法问题
- 关于类的问题。。。
- 哪位好心人能帮我把这段代码改成C#呀?
- winform System.Data.Linq.DataContext”在未被引用的程序集中定义。必须添加对程序集“System.Data.Linq, Ve
- 我正在用C#写一个邮件客户端程序,不知道如何下手,请高手帮忙!!
- 我是新手,请大家帮忙看看我要将从数据库中的数据放到控件label中
- 各位大虾快来帮忙,急急急急急急急......
- 关于windowsService的启动问题。
- RichtextBox平滑滚动显示 图文rtf文件时 , 内容闪烁严重的解决方案???
{
Button4.Enabled = false;
Button3.Enabled = true;
com = new System.IO.Ports.SerialPort();
if (com.IsOpen)
{ com.Close(); }
else
{
com.PortName = "COM1";
com.BaudRate = 115200;
com.DataBits = 8;
com.StopBits = (System.IO.Ports.StopBits)1;
com.Open(); for (int i = 1; i <= 24; i++)
{
if (com.IsOpen)
{
System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
byte[] byteArray = new byte[] { (byte)com.ReadByte() };
string strCharacter = asciiEncoding.GetString(byteArray);
TextBox1.Text += strCharacter;
}
else
com.Close();
}
}
}