資源簡(jiǎn)介
串口通信示例
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.IO.Ports;
using?System.IO;
using?System.Text.Regularexpressions;
namespace?SerialPortDemo
{
????public?partial?class?Form1?:?Form
????{
????????private?SerialPort?spCom?=?new?SerialPort();
????????private?StringBuilder?strBuilderRx?=?new?StringBuilder();
????????private?Timer?timerAutoSend?=?new?Timer();
????????private?long?nCountRx?=?0;
????????private?long?nCountTx?=?0;
????????private?string?strFn;
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????private?void?SerialPortForm_Load(object?sender?EventArgs?e)
????????{
???????
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????10002??2019-03-08?17:02??SerialPortDemo\Form1.cs
?????文件??????22436??2019-03-08?17:01??SerialPortDemo\Form1.Designer.cs
?????文件????????495??2019-03-08?16:58??SerialPortDemo\Program.cs
?????文件???????1378??2019-03-08?16:58??SerialPortDemo\Properties\AssemblyInfo.cs
?????文件???????2876??2019-03-08?16:58??SerialPortDemo\Properties\Resources.Designer.cs
?????文件???????5612??2019-03-08?16:58??SerialPortDemo\Properties\Resources.resx
?????文件???????1097??2019-03-08?16:58??SerialPortDemo\Properties\Settings.Designer.cs
?????文件????????249??2019-03-08?16:58??SerialPortDemo\Properties\Settings.settings
?????文件???????3570??2019-03-08?16:58??SerialPortDemo\SerialPortDemo.csproj
?????文件????????884??2019-03-08?16:58??SerialPortDemo.sln
?????目錄??????????0??2019-03-13?09:35??SerialPortDemo\Properties
?????目錄??????????0??2019-03-13?09:37??SerialPortDemo
-----------?---------??----------?-----??----
????????????????48599????????????????????12
評(píng)論
共有 條評(píng)論