資源簡(jiǎn)介
代碼片段和文件信息
using?System;
using?System.Collections;
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.Threading;?//添線(xiàn)程引用
using?System.IO.Ports;
namespace?繪制曲線(xiàn)
{
????public?partial?class?鐵路危險(xiǎn)品監(jiān)測(cè)平臺(tái)與預(yù)處理指揮系統(tǒng)?:?Form
????{
????????//隨機(jī)數(shù)
????????float?dpiY;
??????//??private?static?int?iSeed?=?8;
????????Random?rd?=?new?Random();
????????//存放數(shù)據(jù)的數(shù)組最大值
????????private?int?sizeMax;
????????//存放y軸數(shù)據(jù)的數(shù)組鏈表
????????private?List?test=new?List?();
????????private?List?DataL1;
????????private?List?DataL2;
????????private?List?DataL3;
????????private?List?DataL4;
????????private?List?DataL5;
????????//存放在畫(huà)布上的數(shù)據(jù)節(jié)點(diǎn)的數(shù)組
????????private?Point[]?pArrData;
????????private?Point[]?pArrData1;
????????private?Point[]?pArrData2;
????????private?Point[]?pArrData3;
????????private?Point[]?pArrData4;
????????private?Point[]?pArrData5;
????????public?鐵路危險(xiǎn)品監(jiān)測(cè)平臺(tái)與預(yù)處理指揮系統(tǒng)()
????????{
????????????//初始化
????????????InitializeComponent();
????????????//根據(jù)畫(huà)布的寬決定x軸需要多少個(gè)數(shù)組
????????????sizeMax?=?pcbDisplay.Width?/?8;
????????????//數(shù)據(jù)數(shù)組
????????????test?=?new?List();
????????????DataL1?=?new?List();
????????????DataL2?=?new?List();
????????????DataL3?=?new?List();
????????????DataL4?=?new?List();
????????????DataL5?=?new?List();
????????????pArrData?=?new?Point[sizeMax?+?1];
????????????pArrData1?=?new?Point[sizeMax?+?1];
????????????pArrData2?=?new?Point[sizeMax?+?1];
????????????pArrData3?=?new?Point[sizeMax?+?1];
????????????pArrData4?=?new?Point[sizeMax?+?1];
????????????pArrData5?=?new?Point[sizeMax?+?1];
????????}
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????timer1.Interval?=?500;
????????????timer1.Start();
????????????timer2.Interval?=?1000;
??????????//??pictureBox10.Enabled?=?false;
???????????//?timer2.Start();
????????
????????}
????????private?void?ReceiveData(SerialPort?serialPort1)??//開(kāi)啟接收線(xiàn)程
????????{
????????????Thread?threadReceiveSub?=?new?Thread(new?ParameterizedThreadStart(AsyReceiveData));
????????????threadReceiveSub.Start(sp);
????????}
????????private?void?AsyReceiveData(object?serialPortobj)
????????{
????????????StringBuilder?result?=?new?StringBuilder();
????????????string?rstring?=?““;
????????????SerialPort?sp?=?(SerialPort)serialPortobj;
????????????Thread.Sleep(500);
????????????try
????????????{
????????????????rstring?=?sp.ReadExisting();
????????????????sp.Encoding?=?System.Text.Encoding.GetEncoding(“GB2312“);
????????????????//??textBox1.Text?=?rstring;
????????????????if?(rstring?==?“o“)
????????????????{
????????????????}
????????????}
????????????catch?(Exception)
????????????{
????????????????//?MessageBox.Show(“接收數(shù)據(jù)異常“);?//continue;
????????????}
????????}
????????#region?繪制曲線(xiàn)
????????//定
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
????..A..H.?????73216??2020-05-14?15:04??.vs\繪制曲線(xiàn)\v14\.suo
????..A..H.?????70144??2019-02-22?23:30??.vs\繪制曲線(xiàn)\v15\.suo
?????文件??????????0??2019-02-22?23:24??.vs\繪制曲線(xiàn)\v15\Server\sqlite3\db.lock
?????文件???????4096??2019-02-22?23:24??.vs\繪制曲線(xiàn)\v15\Server\sqlite3\storage.ide
?????文件??????32768??2019-02-22?23:24??.vs\繪制曲線(xiàn)\v15\Server\sqlite3\storage.ide-shm
?????文件?????828152??2019-02-22?23:30??.vs\繪制曲線(xiàn)\v15\Server\sqlite3\storage.ide-wal
?????文件?????128429??2017-05-17?20:28??繪制曲線(xiàn)\11.jpg
?????文件?????326461??2017-05-17?20:51??繪制曲線(xiàn)\222.png
?????文件?????189349??2017-05-18?21:52??繪制曲線(xiàn)\5555.png
?????文件?????309841??2017-05-18?21:53??繪制曲線(xiàn)\6666.png
?????文件????????186??2019-01-23?10:47??繪制曲線(xiàn)\App.config
?????文件????2738176??2016-05-18?18:13??繪制曲線(xiàn)\bin\Debug\CSkin.dll
?????文件?????263246??2016-05-18?18:11??繪制曲線(xiàn)\bin\Debug\CSkin.xm
?????文件?????941056??2020-05-14?14:58??繪制曲線(xiàn)\bin\Debug\繪制曲線(xiàn).exe
?????文件????????186??2019-01-23?10:47??繪制曲線(xiàn)\bin\Debug\繪制曲線(xiàn).exe.config
?????文件??????60928??2020-05-14?14:58??繪制曲線(xiàn)\bin\Debug\繪制曲線(xiàn).pdb
?????文件??????22688??2020-05-14?15:00??繪制曲線(xiàn)\bin\Debug\繪制曲線(xiàn).vshost.exe
?????文件????????186??2019-01-23?10:47??繪制曲線(xiàn)\bin\Debug\繪制曲線(xiàn).vshost.exe.config
?????文件????????490??2018-09-15?15:29??繪制曲線(xiàn)\bin\Debug\繪制曲線(xiàn).vshost.exe.manifest
?????文件??????40266??2017-05-15?12:56??繪制曲線(xiàn)\Circle_Green_256px_566284_easyicon.net.png
?????文件??????25094??2019-02-22?23:26??繪制曲線(xiàn)\Form1.cs
?????文件??????56459??2019-02-22?23:26??繪制曲線(xiàn)\Form1.Designer.cs
?????文件???????6773??2019-02-22?23:26??繪制曲線(xiàn)\Form1.resx
?????文件??????14797??2017-05-16?17:45??繪制曲線(xiàn)\high_signal.png
?????文件????????718??2020-05-14?14:58??繪制曲線(xiàn)\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????8583??2020-05-14?14:58??繪制曲線(xiàn)\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件??????????0??2017-05-12?14:52??繪制曲線(xiàn)\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
?????文件??????????0??2017-05-12?14:52??繪制曲線(xiàn)\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
?????文件??????????0??2017-05-12?14:52??繪制曲線(xiàn)\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
?????文件???????5120??2017-05-24?20:08??繪制曲線(xiàn)\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
............此處省略56個(gè)文件信息
評(píng)論
共有 條評(píng)論