资源简介
经典的串口收发调试工具,实现了利用C# SerialPort串口控件进行(二进制,十进制,十六进制)数据的收发和显示处理;
已经经过测试调试,可用!-----No.2

代码片段和文件信息
/*
* 程序员:王文壮
*
* 用途:串口通讯调试程序
*
* 时间:16:58 2010-1-28
*
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
using Microsoft.Win32;
namespace SignalDebug
{
public partial class FormClient : Form
{
#region 构造函数&变量
#region 线程访问UI委托
private delegate void Set(byte[] buffer RichTextBox richTextBox);
#endregion
#region 构造函数
public FormClient()
{
InitializeComponent();
#region 串口
string[] serialPortNames = null;
try
{
serialPortNames = SerialPort.GetPortNames();
}
catch (Exception ex)
{
this.toolStripStatusLabelMsg.Text = “获取计算机COM口列表失败!错误信息:“ + ex.Message;
}
for (int i = 0; i < serialPortNames.Length; i++)
{
this.toolStripComboBoxSerialPortName.Items.Add(serialPortNames[i]);
}
if (this.toolStripComboBoxSerialPortName.Items.Count > 0)
{
this.toolStripComboBoxSerialPortName.SelectedIndex = 0;
}
#endregion
#region 波特率
this.toolStripComboBoxBaudRate.Items.AddRange(new object[] { 1200 2400 4800 9600 14400 19200 38400 56000 57600 115200 128000 256000 });
this.toolStripComboBoxBaudRate.SelectedIndex = 2;
#endregion
#region 数据位
this.toolStripComboBoxDataBits.Items.AddRange(new object[] { 5 6 7 8 });
this.toolStripComboBoxDataBits.SelectedIndex = this.toolStripComboBoxDataBits.Items.Count - 1;
#endregion
#region 奇偶效验
this.toolStripComboBoxParity.Items.AddRange(new object[] { Parity.None Parity.Space Parity.Mark Parity.Odd Parity.Even });
this.toolStripComboBoxParity.SelectedIndex = 0;
#endregion
#region 停止位
this.toolStripComboBoxStopBits.Items.AddRange(new object[] { StopBits.One StopBits.Two });
this.toolStripComboBoxStopBits.SelectedIndex = 0;
#endregion
CreateSerialPort();
this.toolStripComboBoxSerialPortName.SelectedIndexChanged += new EventHandler(toolStripComboBox_SelectedIndexChanged);
this.toolStripComboBoxBaudRate.SelectedIndexChanged += new EventHandler(toolStripComboBox_SelectedIndexChanged);
this.toolStripComboBoxDataBits.SelectedIndexChanged += new EventHandler(toolStripComboBox_SelectedIndexChanged);
this.toolStripComboBoxParity.SelectedIndexChanged += new EventHandler(toolStripComboBox_SelectedIndexChanged);
this.toolStripComboBoxStopBits.SelectedIndexChanged += new EventHandler(toolStripComboBox_SelectedIndexChanged);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2238 2010-01-29 11:51 SignalDebug_C#4.0_VS2010_Oked\Backup\SignalDebug\App.ico
文件 13230 2010-01-31 21:37 SignalDebug_C#4.0_VS2010_Oked\Backup\SignalDebug\FormClient.cs
文件 26020 2010-01-30 15:55 SignalDebug_C#4.0_VS2010_Oked\Backup\SignalDebug\FormClient.Designer.cs
文件 11052 2010-01-30 15:55 SignalDebug_C#4.0_VS2010_Oked\Backup\SignalDebug\FormClient.resx
文件 475 2010-01-29 11:21 SignalDebug_C#4.0_VS2010_Oked\Backup\SignalDebug\Program.cs
文件 1188 2010-01-30 15:55 SignalDebug_C#4.0_VS2010_Oked\Backup\SignalDebug\Properties\AssemblyInfo.cs
文件 2846 2010-01-31 20:58 SignalDebug_C#4.0_VS2010_Oked\Backup\SignalDebug\Properties\Resources.Designer.cs
文件 5612 2010-01-29 11:19 SignalDebug_C#4.0_VS2010_Oked\Backup\SignalDebug\Properties\Resources.resx
文件 1109 2010-01-31 20:59 SignalDebug_C#4.0_VS2010_Oked\Backup\SignalDebug\Properties\Settings.Designer.cs
文件 249 2010-01-29 11:19 SignalDebug_C#4.0_VS2010_Oked\Backup\SignalDebug\Properties\Settings.settings
文件 3627 2010-01-31 20:59 SignalDebug_C#4.0_VS2010_Oked\Backup\SignalDebug\SignalDebug.csproj
文件 533 2010-01-31 20:57 SignalDebug_C#4.0_VS2010_Oked\Backup\SignalDebug\SignalDebug.csproj.user
文件 927 2010-01-31 21:39 SignalDebug_C#4.0_VS2010_Oked\Backup\SignalDebug.sln
..A..H. 23040 2010-01-31 21:41 SignalDebug_C#4.0_VS2010_Oked\Backup\SignalDebug.suo
....... 4286 2012-03-14 19:45 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\App.ico
文件 4286 2012-03-14 19:45 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\bin\Release\app.publish\Application Files\C#串口调试助手_1_0_0_0\App.ico.deploy
文件 31232 2012-03-14 19:47 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\bin\Release\app.publish\Application Files\C#串口调试助手_1_0_0_0\C#串口调试助手.exe.deploy
文件 7262 2012-03-14 19:47 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\bin\Release\app.publish\Application Files\C#串口调试助手_1_0_0_0\C#串口调试助手.exe.manifest
文件 5488 2012-03-14 19:47 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\bin\Release\app.publish\C#串口调试助手.application
文件 495088 2012-03-14 19:47 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\bin\Release\app.publish\setup.exe
文件 1673 2012-03-14 19:47 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\bin\Release\C#串口调试助手.application
文件 31232 2012-03-14 19:47 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\bin\Release\C#串口调试助手.exe
文件 3530 2012-03-14 19:47 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\bin\Release\C#串口调试助手.exe.manifest
文件 34304 2012-03-14 19:47 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\bin\Release\C#串口调试助手.pdb
文件 11608 2012-03-14 19:46 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\bin\Release\C#串口调试助手.vshost.exe
文件 490 2010-03-17 22:39 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\bin\Release\C#串口调试助手.vshost.exe.manifest
文件 13253 2012-03-14 19:45 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\FormClient.cs
文件 26823 2012-03-14 19:45 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\FormClient.Designer.cs
文件 14088 2012-03-14 19:45 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\FormClient.resx
文件 633 2010-01-31 21:36 SignalDebug_C#4.0_VS2010_Oked\SignalDebug\obj\Debug\SignalDebug.csproj.FileListAbsolute.txt
............此处省略67个文件信息
- 上一篇:C#实现MVC设计模式源码
- 下一篇:C# 基本图形示波器窗口设计源码
相关资源
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- Asp.net学生信息管理系统源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- Winform可视化打印模板设计工具含源码
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
评论
共有 条评论