admin 管理员组

文章数量: 1086019


2024年3月14日发(作者:tcpp是什么意思)

串口调试助手预源代码

using System;

using c;

using entModel;

using ;

using g;

using ;

using ;

using ;

using ;

using ;

using ;

using ing;

using itors;

using rExpressions;

namespace WindowsFormsApplication3

{

public partial class Form1 : XtraForm

{

SerialPort sp1 = new SerialPort();

int Flag = 0;

int StateChanged = 0;

int StateChanged_Ascii = 1;

int StateChanged_16 = 0;

string Temp = null;

string Temp_memoSend = null;

private void memoSend_EditValueChanged(object sender, EventArgs e)

{

}

public Form1()

{

InitializeComponent();

ceived += sp1_DataReceived;

}

private void Form1_Load(object sender, EventArgs e)

{

zeBox = false;

//检查是否有串口

string[] str = tNames();

if (str == null)

{

("本机没有串口!", "error");

return;

}

//添加串口项目

foreach (string port in tNames())

{

(port);

}

//串口设置默认选择项

edIndex = 0;

orIllegalCrossThreadCalls = false;

ceived += new

SerialDataReceivedEventHandler(sp1_DataReceived); //订阅委托

}

private void comboBoxEdit1_SelectedIndexChanged(object sender, EventArgs


本文标签: 串口 订阅 委托 调试