添加项目文件。
This commit is contained in:
commit
6df56c3ec3
125 files changed
+17486
No files matched your search
@@ -0,0 +1,25 @@
|
||||
using System.IO.Ports;
|
||||
|
||||
namespace WCS_YongFeng
|
||||
{
|
||||
/// <summary>
|
||||
/// 串口助手
|
||||
/// </summary>
|
||||
public class SerialPortHelper
|
||||
{
|
||||
public SerialPort serialPort { get; set; }
|
||||
//获取计算机com口
|
||||
public string[] PortNames { get { return System.IO.Ports.SerialPort.GetPortNames(); } }
|
||||
public AlgorithmHelper algorithmHelper { get; set; }
|
||||
|
||||
public SerialPortHelper()
|
||||
{
|
||||
this.serialPort = new SerialPort();
|
||||
this.algorithmHelper = new AlgorithmHelper();
|
||||
this.serialPort.BaudRate = 9600;
|
||||
this.serialPort.StopBits = StopBits.One;
|
||||
this.serialPort.Parity = Parity.None;
|
||||
this.serialPort.DataBits = 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user