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

  • 大小: 138KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-14
  • 語言: C#
  • 標簽:

資源簡介

非常適合新手學習的一款上位機,基本實現所需要的功能。代碼簡單明了

資源截圖

代碼片段和文件信息

using?System;
using?System.IO.Ports;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?INIFILE;
using?System.Text.Regularexpressions;

namespace?SerialPortConnection
{
????public?partial?class?Form1?:?Form
????{
????????SerialPort?sp1?=?new?SerialPort();
????????//sp1.ReceivedBytesThreshold?=?1;//只要有1個字符送達端口時便觸發DataReceived事件?
?????????
????????public?Form1()
????????{
????????????InitializeComponent();
????????}

????????//加載
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????INIFILE.Profile.LoadProfile();//加載所有
????????????
???????????//?預置波特率
????????????switch?(Profile.G_BAUDRATE)
????????????{
????????????????case?“300“:
????????????????????cbBaudRate.SelectedIndex?=?0;
????????????????????break;
????????????????case?“600“:
????????????????????cbBaudRate.SelectedIndex?=?1;
????????????????????break;
????????????????case?“1200“:
????????????????????cbBaudRate.SelectedIndex?=?2;
????????????????????break;?
????????????????case?“2400“:
????????????????????cbBaudRate.SelectedIndex?=?3;
????????????????????break;
????????????????case?“4800“:
????????????????????cbBaudRate.SelectedIndex?=?4;
????????????????????break;
????????????????case?“9600“:
????????????????????cbBaudRate.SelectedIndex?=?5;
????????????????????break;
????????????????case?“19200“:
????????????????????cbBaudRate.SelectedIndex?=?6;
????????????????????break;?
????????????????case?“38400“:
????????????????????cbBaudRate.SelectedIndex?=?7;
????????????????????break;
????????????????case?“115200“:
????????????????????cbBaudRate.SelectedIndex?=?8;
????????????????????break;
????????????????default:
????????????????????{
????????????????????????MessageBox.Show(“波特率預置參數錯誤。“);
????????????????????????return;
????????????????????}??????????????????
????????????}

????????????//預置波特率
????????????switch?(Profile.G_DATABITS)
????????????{
????????????????case?“5“:
????????????????????cbDataBits.SelectedIndex?=?0;
????????????????????break;
????????????????case?“6“:
????????????????????cbDataBits.SelectedIndex?=?1;
????????????????????break;?
????????????????case?“7“:
????????????????????cbDataBits.SelectedIndex?=?2;
????????????????????break;?
????????????????case??“8“:
????????????????????cbDataBits.SelectedIndex?=?3;
????????????????????break;
????????????????default:
????????????????????{
????????????????????????MessageBox.Show(“數據位預置參數錯誤。“);
????????????????????????return;
????????????????????}

????????????}
????????????//預置停止位
????????????switch?(Profile.G_STOP)
????????????{
????????????????case?“1“:
????????????????????cbStop.SelectedIndex?=?0;
????????????????????????break;
????????????????case?“1.5“:
????????????????????cbStop.SelectedIndex?=?1;
????????????????????break;
????????????????case?“2“:
????????????????????cbStop.Selec

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-10-27?11:15??SerialPortConnection\
?????目錄???????????0??2018-10-27?11:15??SerialPortConnection\.vs\
?????目錄???????????0??2018-10-27?11:15??SerialPortConnection\.vs\SerialPortConnection\
?????目錄???????????0??2018-10-27?11:15??SerialPortConnection\.vs\SerialPortConnection\v14\
?????文件???????26624??2018-10-27?11:50??SerialPortConnection\.vs\SerialPortConnection\v14\.suo
?????目錄???????????0??2018-10-27?11:14??SerialPortConnection\Backup\
?????目錄???????????0??2018-10-27?11:14??SerialPortConnection\Backup\SerialPortConnection\
?????文件???????26561??2012-08-15?14:13??SerialPortConnection\Backup\SerialPortConnection\Form1.Designer.cs
?????文件???????20297??2012-08-15?17:18??SerialPortConnection\Backup\SerialPortConnection\Form1.cs
?????文件????????6582??2012-08-15?14:13??SerialPortConnection\Backup\SerialPortConnection\Form1.resx
?????文件????????7503??2012-08-09?10:13??SerialPortConnection\Backup\SerialPortConnection\IniFile.cs
?????文件????????1468??2012-08-14?11:37??SerialPortConnection\Backup\SerialPortConnection\Profile.cs
?????文件?????????512??2012-08-06?14:57??SerialPortConnection\Backup\SerialPortConnection\Program.cs
?????目錄???????????0??2018-10-27?11:14??SerialPortConnection\Backup\SerialPortConnection\Properties\
?????文件????????1476??2012-08-06?14:57??SerialPortConnection\Backup\SerialPortConnection\Properties\AssemblyInfo.cs
?????文件????????2869??2012-08-06?14:57??SerialPortConnection\Backup\SerialPortConnection\Properties\Resources.Designer.cs
?????文件????????5612??2012-08-06?14:57??SerialPortConnection\Backup\SerialPortConnection\Properties\Resources.resx
?????文件????????1105??2012-08-06?14:57??SerialPortConnection\Backup\SerialPortConnection\Properties\Settings.Designer.cs
?????文件?????????249??2012-08-06?14:57??SerialPortConnection\Backup\SerialPortConnection\Properties\Settings.settings
?????文件????????3862??2012-08-09?10:13??SerialPortConnection\Backup\SerialPortConnection\SerialPortConnection.csproj
?????文件?????????950??2012-08-06?14:57??SerialPortConnection\Backup\SerialPortConnection.sln
?????文件???????17408??2018-05-16?13:49??SerialPortConnection\Backup\SerialPortConnection.v11.suo
?????目錄???????????0??2018-11-02?11:34??SerialPortConnection\SerialPortConnection\
?????文件???????26697??2018-11-02?11:34??SerialPortConnection\SerialPortConnection\Form1.Designer.cs
?????文件???????20542??2018-11-02?11:34??SerialPortConnection\SerialPortConnection\Form1.cs
?????文件????????6582??2018-11-02?11:34??SerialPortConnection\SerialPortConnection\Form1.resx
?????文件????????7503??2012-08-09?10:13??SerialPortConnection\SerialPortConnection\IniFile.cs
?????文件????????1468??2012-08-14?11:37??SerialPortConnection\SerialPortConnection\Profile.cs
?????文件?????????512??2012-08-06?14:57??SerialPortConnection\SerialPortConnection\Program.cs
?????目錄???????????0??2018-10-27?11:14??SerialPortConnection\SerialPortConnection\Properties\
?????文件????????1476??2012-08-06?14:57??SerialPortConnection\SerialPortConnection\Properties\AssemblyInfo.cs
............此處省略39個文件信息

評論

共有 條評論

相關資源