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

  • 大小: 102KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-04
  • 語言: C#
  • 標簽:

資源簡介

自己用C#做的RS232通訊程序...看看吧...里面糾正了網上很多看似可以的程序段...這也是自己實驗過的... ----------------2020/06/08 18:16 更新分割線--------------- 已經有十年了 居然還有人需要 那就開始免費吧 以前的代碼寫得比較差 希望各位別見怪

資源截圖

代碼片段和文件信息

using?System;
using?System.Runtime.InteropServices;
using?System.Text;
using?System.Threading;
using?System.IO;
using?System.xml.Serialization;
using?System.IO.Ports;
using?System.Diagnostics;
using?Microsoft.Win32;
using?System.Windows.Forms;
using?System.Net;
using?System.Net.Sockets;

namespace?comclass
{
????public?class?Commbase?:?IDisposable
????{
????????private?SerialPort?comport1?=?new?SerialPort();
????????private?SerialPort?comport2?=?new?SerialPort();
????????///?
????????///?串口狀態,false為關閉,true為打開
????????///?

????????public?bool?COM1Status?=?false;
????????public?bool?COM2Status?=?false;

????????private?string?Recstr1;
????????private?bool?RecStatus1?=?false;
????????private?bool?RecStatus2?=?false;
????????private?string?Recstr2;
????????private?enum?Parity
????????{
????????????///?
????????????///?Characters?do?not?have?a?parity?bit.
????????????///?

????????????none?=?0
????????????///?
????????????///?If?there?are?an?odd?number?of?1s?in?the?data?bits?the?parity?bit?is?1.
????????????///?

????????????odd?=?1
????????????///?
????????????///?If?there?are?an?even?number?of?1s?in?the?data?bits?the?parity?bit?is?1.
????????????///?

????????????even?=?2
????????????///?
????????????///?The?parity?bit?is?always?1.
????????????///?

????????????mark?=?3
????????????///?
????????????///?The?parity?bit?is?always?0.
????????????///?

????????????space?=?4
????????};
????????//?摘要:
????????//?????指定在?System.IO.Ports.SerialPort?對象上使用的停止位數。
????????private?enum?StopBits
????????{
????????????//?摘要:
????????????//?????必使用停止位。
????????????None?=?0
????????????//
????????????//?摘要:
????????????//?????使用一個停止位。
????????????One?=?1
????????????//
????????????//?摘要:
????????????//?????使用兩個停止位。
????????????Two?=?2
????????????//
????????????//?摘要:
????????????//?????使用?1.5?個停止位。
????????????OnePointFive?=?3
????????};
????????///?
????????///?Port?Name?(default:?“COM1:“)
????????///?

????????public?string?comport_name1?=?“COM1“;
????????///?
????????///?Baud?Rate?(default:?2400)?unsupported?rates?will?throw?“Bad?settings“
????????///?

????????private?int?baudRate1?=?9600;
????????///?
????????///?The?parity?checking?scheme?(default:?none)
????????///?

????????private?System.IO.Ports.Parity?parity1?=?(System.IO.Ports.Parity)Parity.none;
????????///?
????????///?Number?of?databits?1..8?(default:?8)?unsupported?values?will?throw?“Bad?settings“
????????///?

????????private?int?dataBits1?=?8;
????????///?
????????///?Number?of?stop?bits?(default:?one)
????????///?

????????private?System.IO.Ports.StopBits?stopBits1?=?(System.IO.Ports.StopBits)StopBits.One;//System.IO.Ports.Parity
????????///?
????????///用于保存串口信息,以供下次打開文件的時候使用
????????///?

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

?????文件???????5612??2010-08-29?17:40??testRS232\testRS232\Properties\Resources.resx

?????文件????????249??2010-08-29?17:40??testRS232\testRS232\Properties\Settings.settings

?????文件???????1166??2010-08-29?17:40??testRS232\testRS232\Properties\AssemblyInfo.cs

?????文件???????2874??2010-08-29?17:40??testRS232\testRS232\Properties\Resources.Designer.cs

?????文件???????1094??2010-08-29?17:40??testRS232\testRS232\Properties\Settings.Designer.cs

?????文件???????2815??2010-08-30?16:55??testRS232\testRS232\Form1.cs

?????文件???????3262??2010-08-30?10:51??testRS232\testRS232\testRS232.csproj

?????文件???????5632??2005-11-11?22:25??testRS232\testRS232\bin\Debug\testRS232.vshost.exe

?????文件??????28672??2010-08-30?16:55??testRS232\testRS232\bin\Debug\testRS232.exe

?????文件??????44544??2010-08-30?16:55??testRS232\testRS232\bin\Debug\testRS232.pdb

?????文件????????180??2010-08-30?12:11??testRS232\testRS232\obj\Debug\testRS232.Form1.resources

?????文件????????180??2010-08-29?17:42??testRS232\testRS232\obj\Debug\testRS232.Properties.Resources.resources

?????文件??????28672??2010-08-30?16:55??testRS232\testRS232\obj\Debug\testRS232.exe

?????文件????????900??2010-08-30?12:11??testRS232\testRS232\obj\Debug\testRS232.csproj.GenerateResource.Cache

?????文件??????44544??2010-08-30?16:55??testRS232\testRS232\obj\Debug\testRS232.pdb

?????文件???????1026??2010-08-30?17:18??testRS232\testRS232\obj\testRS232.csproj.FileListAbsolute.txt

?????文件????????673??2010-08-30?11:41??testRS232\testRS232\Program.cs

?????文件???????9256??2010-08-30?12:11??testRS232\testRS232\Form1.Designer.cs

?????文件???????5814??2010-08-30?12:11??testRS232\testRS232\Form1.resx

?????文件??????20484??2010-08-30?16:32??testRS232\testRS232\Class1.cs

?????文件????????916??2010-08-29?17:40??testRS232\testRS232.sln

????..A..H.?????39424??2010-08-30?17:11??testRS232\testRS232.suo

?????目錄??????????0??2010-08-29?17:40??testRS232\testRS232\obj\Debug\TempPE

?????目錄??????????0??2010-08-29?22:28??testRS232\testRS232\obj\Debug\Refactor

?????目錄??????????0??2010-08-29?17:40??testRS232\testRS232\bin\Debug

?????目錄??????????0??2010-08-29?17:40??testRS232\testRS232\obj\Debug

?????目錄??????????0??2010-08-29?17:40??testRS232\testRS232\Properties

?????目錄??????????0??2010-08-29?17:40??testRS232\testRS232\bin

?????目錄??????????0??2010-08-29?17:40??testRS232\testRS232\obj

?????目錄??????????0??2010-08-29?17:40??testRS232\testRS232

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

評論

共有 條評論

相關資源