资源简介
通过C#实现串口通信,里面的代码展示了如何监听计算机中的串口,解析数据或者发送数据,做串口开发的可以参考

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using System.Reflection;
namespace PCComm
{
partial class AboutBox : Form
{
public AboutBox()
{
InitializeComponent();
// Initialize the AboutBox to display the product information from the assembly information.
// Change assembly information settings for your application through either:
// - Project->Properties->Application->Assembly Information
// - AssemblyInfo.cs
this.Text = String.Format(“About {0}“ Assemblytitle);
this.labelProductName.Text = AssemblyProduct;
this.labelVersion.Text = String.Format(“Version {0}“ AssemblyVersion);
this.labelCopyright.Text = AssemblyCopyright;
this.labelCompanyName.Text = AssemblyCompany;
this.textBoxDescription.Text = AssemblyDescription;
}
#region Assembly Attribute Accessors
public string Assemblytitle
{
get
{
// Get all title attributes on this assembly
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblytitleAttribute) false);
// If there is at least one title attribute
if (attributes.Length > 0)
{
// Select the first one
AssemblytitleAttribute titleAttribute = (AssemblytitleAttribute)attributes[0];
// If it is not an empty string return it
if (titleAttribute.title != ““)
return titleAttribute.title;
}
// If there was no title attribute or if the title attribute was the empty string return the .exe name
return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Codebase);
}
}
public string AssemblyVersion
{
get
{
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
}
public string AssemblyDescription
{
get
{
// Get all Description attributes on this assembly
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute) false);
// If there aren‘t any Description attributes return an empty string
if (attributes.Length == 0)
return ““;
// If there is a Description attribute return its value
return ((AssemblyDescriptionAttribute)attributes[0]).Description;
}
}
public string AssemblyProduct
{
get
{
// Get all P
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4884 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\AboutBox.cs
文件 10533 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\AboutBox.Designer.cs
文件 49720 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\AboutBox.resx
文件 1276 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\app.config
文件 13851 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\CommunicationManager.cs
文件 3967 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\frmMain.cs
文件 31481 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\frmMain.Designer.cs
文件 15028 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\frmMain.resx
文件 475 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\Program.cs
文件 1352 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\Properties\AssemblyInfo.cs
文件 3086 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\Properties\Resources.Designer.cs
文件 6197 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\Properties\Resources.resx
文件 3309 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\Properties\Settings.Designer.cs
文件 927 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\Properties\Settings.settings
文件 3774 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\Resources\serial.ico
文件 3899 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\SerialPortCommunication.csproj
文件 1255 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication\Settings.cs
文件 958 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication.sln
..A..H. 17408 2011-11-28 01:28 SerialPort-master\SerialPort-master\Backup\SerialPortCommunication.suo
....... 50 2011-11-28 01:28 SerialPort-master\SerialPort-master\README
....... 4884 2011-11-28 01:28 SerialPort-master\SerialPort-master\SerialPortCommunication\AboutBox.cs
....... 10533 2011-11-28 01:28 SerialPort-master\SerialPort-master\SerialPortCommunication\AboutBox.Designer.cs
....... 49720 2011-11-28 01:28 SerialPort-master\SerialPort-master\SerialPortCommunication\AboutBox.resx
....... 1276 2011-11-28 01:28 SerialPort-master\SerialPort-master\SerialPortCommunication\app.config
文件 1276 2011-11-28 01:28 SerialPort-master\SerialPort-master\SerialPortCommunication\bin\Release\SerialPortCommunication.exe.config
文件 11608 2015-03-30 15:03 SerialPort-master\SerialPort-master\SerialPortCommunication\bin\Release\SerialPortCommunication.vshost.exe
文件 1276 2011-11-28 01:28 SerialPort-master\SerialPort-master\SerialPortCommunication\bin\Release\SerialPortCommunication.vshost.exe.config
文件 490 2010-03-17 22:39 SerialPort-master\SerialPort-master\SerialPortCommunication\bin\Release\SerialPortCommunication.vshost.exe.manifest
....... 13851 2011-11-28 01:28 SerialPort-master\SerialPort-master\SerialPortCommunication\CommunicationManager.cs
....... 3967 2011-11-28 01:28 SerialPort-master\SerialPort-master\SerialPortCommunication\frmMain.cs
............此处省略42个文件信息
- 上一篇:多线程采集网页C#源代码
- 下一篇:C# 串口调试助手源代码
相关资源
- C# TIP文件生成和拆解
- C#解析HL7消息的库135797
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- 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#版保龄球记分代码
评论
共有 条评论