91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 8.95MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-10-22
  • 語言: C#
  • 標簽: c#??

資源簡介

用C#編寫的串口調試助手,可以實現數據收發、字節格式轉換等簡單功能。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows.Forms;
using?System.IO.Ports;?//串口命名空間
using?System.Threading;

namespace?SSComm
{
????public?partial?class?Form1?:?Form
????{
????????SerialPort?sp?=?new?SerialPort();??//創建串口全局變量
????????public?Form1()
????????{
????????????InitializeComponent();
????????}

????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????statusLabel1.Text?=?““;//狀態條初始化
????????????//設置窗口大小
????????????this.MaximizeBox?=?false;//隱藏最大化按鈕
????????????this.MaximumSize?=?this.Size;//固定窗口尺寸最大為當前尺寸
????????????this.MinimumSize?=?this.Size;//固定窗口尺寸最小為當前尺寸
????????????tbxReceivedData.Focus();//默認將光標放在發送文本框上
????????????rbtReceviedAscii.Select();//默認選擇ASCII字符顯示
????????????rbtSendAscii.Select();//默認選擇ASCII字符顯示
????????????CheckPort();//檢測可用串口

????????????//初始化波特率
????????????cbxBaud.Items.Clear();
????????????cbxBaud.Items.Add(“1200“);
????????????cbxBaud.Items.Add(“2400“);
????????????cbxBaud.Items.Add(“4800“);
????????????cbxBaud.Items.Add(“9600“);
????????????cbxBaud.Items.Add(“12800“);
????????????cbxBaud.Items.Add(“19200“);
????????????cbxBaud.Items.Add(“25600“);
????????????cbxBaud.Items.Add(“115200“);
????????????cbxBaud.SelectedIndex?=?3;

????????????//初始化校驗位
????????????cbxParity.Items.Clear();
????????????cbxParity.Items.Add(“無“);
????????????cbxParity.Items.Add(“奇校驗“);
????????????cbxParity.Items.Add(“偶校驗“);
????????????cbxParity.SelectedIndex?=?0;

????????????//初始化停止位
????????????cbxStopBits.Items.Clear();
????????????cbxStopBits.Items.Add(“1“);
????????????cbxStopBits.Items.Add(“1.5“);
????????????cbxStopBits.Items.Add(“2“);
????????????cbxStopBits.SelectedIndex?=?0;

????????????//初始化數據位
????????????cbxDataBits.Items.Clear();
????????????cbxDataBits.Items.Add(“7“);
????????????cbxDataBits.Items.Add(“8“);
????????????cbxDataBits.SelectedIndex?=?1;
????????????statusLabel1.Text?=?““;//修改狀態條內容

????????????tbxSendData.Text?=?“$00I\r\n“;

????????}

????????//檢測當前可用串口函數
????????private?void?CheckPort()
????????{
????????????cbxPort.Items.Clear();
????????????bool?haveCom?=?false;
????????????string[]?serialPorts?=?SerialPort.GetPortNames();
????????????if?(serialPorts?==?null)
????????????{
????????????????haveCom?=?false;??//無可用串口
????????????}
????????????else
????????????{
????????????????foreach?(string?port?in?serialPorts)
????????????????{
????????????????????bool?exist?=?false;
????????????????????try
????????????????????{
????????????????????????SerialPort?sp?=?new?SerialPort(port);
????????????????????????sp.Open();
????????????????????????sp.Close();
????????????????????????exist?=?true;
????????????????????}
????????????????????catch?(Exception)
????????????????????{
????????????????????????exist?=?false;
????????????????????}
?????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

????..A..H.?????52736??2018-11-17?11:34??SSComm\.vs\SSComm\v14\.suo

?????文件????????189??2018-10-24?22:39??SSComm\SSComm\App.config

?????文件?????174592??2018-10-30?14:26??SSComm\SSComm\bin\Debug\de\DevExpress.Data.v15.2.resources.dll

?????文件???????8192??2018-10-30?14:26??SSComm\SSComm\bin\Debug\de\DevExpress.Printing.v15.2.Core.resources.dll

?????文件???????6144??2018-10-30?14:26??SSComm\SSComm\bin\Debug\de\DevExpress.Sparkline.v15.2.Core.resources.dll

?????文件??????20480??2018-10-30?14:26??SSComm\SSComm\bin\Debug\de\DevExpress.Utils.v15.2.resources.dll

?????文件??????99840??2018-10-30?14:26??SSComm\SSComm\bin\Debug\de\DevExpress.XtraEditors.v15.2.resources.dll

?????文件????5259264??2018-10-30?14:26??SSComm\SSComm\bin\Debug\DevExpress.Data.v15.2.dll

?????文件????1129260??2018-10-30?14:26??SSComm\SSComm\bin\Debug\DevExpress.Data.v15.2.xml

?????文件????3771904??2018-10-30?14:26??SSComm\SSComm\bin\Debug\DevExpress.Printing.v15.2.Core.dll

?????文件????1257127??2018-10-30?14:26??SSComm\SSComm\bin\Debug\DevExpress.Printing.v15.2.Core.xml

?????文件??????72704??2018-10-30?14:26??SSComm\SSComm\bin\Debug\DevExpress.Sparkline.v15.2.Core.dll

?????文件??????25581??2018-10-30?14:26??SSComm\SSComm\bin\Debug\DevExpress.Sparkline.v15.2.Core.xml

?????文件????8399872??2018-10-30?14:26??SSComm\SSComm\bin\Debug\DevExpress.Utils.v15.2.dll

?????文件?????716166??2018-10-30?14:26??SSComm\SSComm\bin\Debug\DevExpress.Utils.v15.2.xml

?????文件????4819456??2018-10-30?14:26??SSComm\SSComm\bin\Debug\DevExpress.XtraEditors.v15.2.dll

?????文件????2178005??2018-10-30?14:26??SSComm\SSComm\bin\Debug\DevExpress.XtraEditors.v15.2.xml

?????文件?????176640??2018-10-30?14:26??SSComm\SSComm\bin\Debug\es\DevExpress.Data.v15.2.resources.dll

?????文件???????8192??2018-10-30?14:26??SSComm\SSComm\bin\Debug\es\DevExpress.Printing.v15.2.Core.resources.dll

?????文件???????8192??2018-10-30?14:26??SSComm\SSComm\bin\Debug\es\DevExpress.Sparkline.v15.2.Core.resources.dll

?????文件??????20480??2018-10-30?14:26??SSComm\SSComm\bin\Debug\es\DevExpress.Utils.v15.2.resources.dll

?????文件??????77312??2018-10-30?14:26??SSComm\SSComm\bin\Debug\es\DevExpress.XtraEditors.v15.2.resources.dll

?????文件?????188416??2018-10-30?14:26??SSComm\SSComm\bin\Debug\ja\DevExpress.Data.v15.2.resources.dll

?????文件???????8192??2018-10-30?14:26??SSComm\SSComm\bin\Debug\ja\DevExpress.Printing.v15.2.Core.resources.dll

?????文件???????5120??2018-10-30?14:26??SSComm\SSComm\bin\Debug\ja\DevExpress.Sparkline.v15.2.Core.resources.dll

?????文件??????27136??2018-10-30?14:26??SSComm\SSComm\bin\Debug\ja\DevExpress.Utils.v15.2.resources.dll

?????文件?????116736??2018-10-30?14:26??SSComm\SSComm\bin\Debug\ja\DevExpress.XtraEditors.v15.2.resources.dll

?????文件?????200192??2018-10-30?14:26??SSComm\SSComm\bin\Debug\ru\DevExpress.Data.v15.2.resources.dll

?????文件???????8704??2018-10-30?14:26??SSComm\SSComm\bin\Debug\ru\DevExpress.Printing.v15.2.Core.resources.dll

?????文件???????8704??2018-10-30?14:26??SSComm\SSComm\bin\Debug\ru\DevExpress.Sparkline.v15.2.Core.resources.dll

............此處省略52個文件信息

評論

共有 條評論