全息显微成像传感器调试代码,暂未调通

This commit is contained in:
春风过客 2023-07-28 10:24:45 +08:00
parent d5cf7f4fd3
commit 8ab0875a9e
47 changed files with 1273 additions and 0 deletions

BIN
QXXWCX/.vs/QXXWCX/v17/.suo Normal file

Binary file not shown.

25
QXXWCX/QXXWCX.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33110.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QXXWCX", "QXXWCX\QXXWCX.csproj", "{8E8909F1-2A3D-4C47-A6C5-E0F6358A667C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8E8909F1-2A3D-4C47-A6C5-E0F6358A667C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E8909F1-2A3D-4C47-A6C5-E0F6358A667C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E8909F1-2A3D-4C47-A6C5-E0F6358A667C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E8909F1-2A3D-4C47-A6C5-E0F6358A667C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C9CFE2F1-9C03-4442-A09B-5CE22E72B6D0}
EndGlobalSection
EndGlobal

6
QXXWCX/QXXWCX/App.config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

139
QXXWCX/QXXWCX/Form1.Designer.cs generated Normal file
View File

@ -0,0 +1,139 @@
namespace QXXWCX
{
partial class Form1
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.btnConnect = new System.Windows.Forms.Button();
this.btnStatueData = new System.Windows.Forms.Button();
this.btnPicture = new System.Windows.Forms.Button();
this.btnRequestPic = new System.Windows.Forms.Button();
this.btnTurnOff = new System.Windows.Forms.Button();
this.rtbMessage = new System.Windows.Forms.RichTextBox();
this.btnClear = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btnConnect
//
this.btnConnect.Location = new System.Drawing.Point(42, 25);
this.btnConnect.Name = "btnConnect";
this.btnConnect.Size = new System.Drawing.Size(126, 46);
this.btnConnect.TabIndex = 0;
this.btnConnect.Text = "建立连接";
this.btnConnect.UseVisualStyleBackColor = true;
this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click);
//
// btnStatueData
//
this.btnStatueData.Location = new System.Drawing.Point(42, 97);
this.btnStatueData.Name = "btnStatueData";
this.btnStatueData.Size = new System.Drawing.Size(126, 46);
this.btnStatueData.TabIndex = 1;
this.btnStatueData.Text = "查询状态";
this.btnStatueData.UseVisualStyleBackColor = true;
this.btnStatueData.Click += new System.EventHandler(this.btnStatueData_Click);
//
// btnPicture
//
this.btnPicture.Location = new System.Drawing.Point(42, 170);
this.btnPicture.Name = "btnPicture";
this.btnPicture.Size = new System.Drawing.Size(126, 46);
this.btnPicture.TabIndex = 2;
this.btnPicture.Text = "采集图片";
this.btnPicture.UseVisualStyleBackColor = true;
this.btnPicture.Click += new System.EventHandler(this.btnPicture_Click);
//
// btnRequestPic
//
this.btnRequestPic.Location = new System.Drawing.Point(42, 242);
this.btnRequestPic.Name = "btnRequestPic";
this.btnRequestPic.Size = new System.Drawing.Size(126, 46);
this.btnRequestPic.TabIndex = 3;
this.btnRequestPic.Text = "查询图片";
this.btnRequestPic.UseVisualStyleBackColor = true;
this.btnRequestPic.Click += new System.EventHandler(this.btnRequestPic_Click);
//
// btnTurnOff
//
this.btnTurnOff.Location = new System.Drawing.Point(42, 313);
this.btnTurnOff.Name = "btnTurnOff";
this.btnTurnOff.Size = new System.Drawing.Size(126, 46);
this.btnTurnOff.TabIndex = 4;
this.btnTurnOff.Text = "关机";
this.btnTurnOff.UseVisualStyleBackColor = true;
this.btnTurnOff.Click += new System.EventHandler(this.btnTurnOff_Click);
//
// rtbMessage
//
this.rtbMessage.Location = new System.Drawing.Point(219, 30);
this.rtbMessage.Name = "rtbMessage";
this.rtbMessage.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.rtbMessage.Size = new System.Drawing.Size(219, 408);
this.rtbMessage.TabIndex = 5;
this.rtbMessage.Text = "";
this.rtbMessage.TextChanged += new System.EventHandler(this.rtbMessage_TextChanged);
//
// btnClear
//
this.btnClear.Location = new System.Drawing.Point(42, 382);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(126, 46);
this.btnClear.TabIndex = 6;
this.btnClear.Text = "清空";
this.btnClear.UseVisualStyleBackColor = true;
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(456, 450);
this.Controls.Add(this.btnClear);
this.Controls.Add(this.rtbMessage);
this.Controls.Add(this.btnTurnOff);
this.Controls.Add(this.btnRequestPic);
this.Controls.Add(this.btnPicture);
this.Controls.Add(this.btnStatueData);
this.Controls.Add(this.btnConnect);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnConnect;
private System.Windows.Forms.Button btnStatueData;
private System.Windows.Forms.Button btnPicture;
private System.Windows.Forms.Button btnRequestPic;
private System.Windows.Forms.Button btnTurnOff;
private System.Windows.Forms.RichTextBox rtbMessage;
private System.Windows.Forms.Button btnClear;
}
}

592
QXXWCX/QXXWCX/Form1.cs Normal file
View File

@ -0,0 +1,592 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace QXXWCX
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//QXXWCXIP
string _ip = "192.168.1.204";
//string _ip = "127.0.0.1";
//端口号
int _port = 11010;
Socket _client_QXXWCX;
bool canSend = false;
//数据接收线程
Thread th_QXXWCX = null;
Thread th_FIle = null;
[Obsolete]
private void btnConnect_Click(object sender, EventArgs e)
{
_client_QXXWCX = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
try
{
IPEndPoint point = new IPEndPoint(IPAddress.Parse(_ip), _port);
_client_QXXWCX.Connect(point);
th_QXXWCX = new Thread(ReceiveMessage_MEMS);
th_QXXWCX.IsBackground = true;
th_QXXWCX.Start();
Console.WriteLine("已连接服务器" + "\r\n");
CallInvokeUIUpdate("UpdatertbMessage", "已连接服务器!\n");
}
catch (Exception)
{
Console.WriteLine("服务器没有开启" + "\r\n");
CallInvokeUIUpdate("UpdatertbMessage", "服务器没有开启!\n");
}
}
public void SendMessage_MEMS(byte[] messageBytes)
{
if (_client_QXXWCX.Connected)
{
try
{
_client_QXXWCX.Send(messageBytes);
CallInvokeUIUpdate("UpdatertbMessage", "发送数据:" + BitConverter.ToString(messageBytes) + "\n");
}
catch (Exception)
{
Console.WriteLine("发送数据失败!" + "\r\n");
CallInvokeUIUpdate("UpdatertbMessage", "发送数据失败!\n");
}
}
else
{
Console.WriteLine("连接断开!" + "\r\n");
CallInvokeUIUpdate("UpdatertbMessage", "连接断开!\n");
}
}
void SendMsgSilent(string msg)
{
void msgSend() { MessageBox.Show(msg, "提示"); }
Thread td_msg = new Thread(msgSend);
td_msg.Start();
}
private static bool PasswordEquals(byte[] b1, byte[] b2)
{
if (b1 == null || b2 == null) return false;
for (int i = 0; i < b2.Length; i++)
{
if (b1[i] != b2[i])
return false;
}
return true;
}
public void ReceiveMessage_MEMS()
{
byte[] messageBytes = null;
int num = 0;
try
{
while (true)
{
//while (canSend == false)
//{
messageBytes = new byte[_client_QXXWCX.ReceiveBufferSize];
num = _client_QXXWCX.Receive(messageBytes);
byte[] buffer = new byte[num];
for (int i = 0; i < num; i++)
{
buffer[i] = messageBytes[i];
}
Console.WriteLine(BitConverter.ToString(buffer));
CallInvokeUIUpdate("UpdatertbMessage", "接收数据:" + BitConverter.ToString(buffer) + "\n");
if (canSend == false && buffer[0] == 0x41 && buffer[1] == 0x35 && buffer[2] == 0x42 && buffer[3] == 0x35)
{
ParsingData(buffer);
}
else if (canSend)
{
Console.WriteLine("开始接收图片!");
CallInvokeUIUpdate("UpdatertbMessage", "开始接收图片!\n");
FileStream wrtr; //文件读写类
byte[] data;
//int rect = _client_QXXWCX.Receive(data, 0, 4, 0); //用来接收图片字节流长度
//int size = BitConverter.ToInt32(data, 0); //16进制转成int型
int rect;
int size = picLength;
int dataleft = size - num;
data = new byte[size]; //创建byte组
byte[] result = new byte[size - 8];
//string str;
//string tempStr;
//byte[] finData;
wrtr = new FileStream(Environment.CurrentDirectory + "\\picturefile\\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".png", FileMode.Append); //创建新文件"new.jpg"
FileStream wrtrTxt= new FileStream(Environment.CurrentDirectory + "\\picturefile\\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".txt", FileMode.Create);
int bufferLen = 8;
for (int i = 0; i < num-8; i++)
{
result[i] = buffer[bufferLen];
bufferLen++;
}
try
{
////存储
//str = HexToString(ByteToString(buffer));
//tempStr = StringToHexString(str, Encoding.ASCII);
//finData = strToToHexByte(tempStr);
//wrtr.Write(finData, 0, finData.Length); //输出文件
int total = num;
CallInvokeUIUpdate("UpdatertbMessage", "total:" + total + "\n");
CallInvokeUIUpdate("UpdatertbMessage", "size:" + size + "\n");
while (total < size) //当接收长度小于总长度时继续执行
{
//if (dataleft > 65536)
//rect = _client_QXXWCX.Receive(data, total, 65536, 0); //接收字节流receive方法返回int获取已接收字节个数第一个参数是需要写入的字节组第二个参数是起始位置第三个参数是接收字节的长度
//else
//rect = _client_QXXWCX.Receive(data, total, dataleft, 0);
rect = _client_QXXWCX.Receive(data, 0, dataleft, 0);
CallInvokeUIUpdate("UpdatertbMessage", "rect" + rect + "\n");
////存储
//str = HexToString(ByteToString(data));
//tempStr = StringToHexString(str, Encoding.ASCII);
//finData = strToToHexByte(tempStr);
//wrtr.Write(finData, 0, finData.Length); //输出文件
int dataLength = 0;
for (int i = total-8; i < total + rect-8; i++)
{
result[i] = data[dataLength];
dataLength++;
}
total += rect; //已接收个数-下一次从当前个数开始接收
dataleft -= rect; //剩下的字节长度
CallInvokeUIUpdate("UpdatertbMessage", "total:" + total + "\n");
CallInvokeUIUpdate("UpdatertbMessage", "dataleft:" + dataleft + "\n");
}
CallInvokeUIUpdate("UpdatertbMessage", "接收图片结束,开始存储图片!\n");
////十六进制数组转普通字符串
//str = HexToString(ByteToString(result));
////CallInvokeUIUpdate("UpdatertbMessage", "str.length" + str.Length+"\n");
////CallInvokeUIUpdate("UpdatertbMessage", str + "\n");
//tempStr = StringToHexString(str, Encoding.ASCII);
////CallInvokeUIUpdate("UpdatertbMessage", "111\n");
////普通字符串转byte
//finData = strToToHexByte(tempStr);
////CallInvokeUIUpdate("UpdatertbMessage", "finData.length" + finData.Length+"\n");
//wrtr.Write(finData, 0, finData.Length); //输出文件
//wrtr.Write(new byte[] { 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A }, 0, 8);
wrtr.Write(result, 0, result.Length);
wrtr.Flush(); //强制输出
wrtr.Close(); //关闭文件流对象
CallInvokeUIUpdate("UpdatertbMessage", "图片接收结束!\n");
}
catch (Exception ex)
{
CallInvokeUIUpdate("UpdatertbMessage", "图片接收出错:"+ex.Message+"\n");
}
finally
{
canSend = false;
}
}
//}
//CallInvokeUIUpdate("UpdatertbMessage", "开始接收图片!\n");
//FileStream wrtr; //文件读写类
//byte[] data;
////int rect = _client_QXXWCX.Receive(data, 0, 4, 0); //用来接收图片字节流长度
////int size = BitConverter.ToInt32(data, 0); //16进制转成int型
//int rect;
//int size = picLength;
//int dataleft = size;
//data = new byte[size]; //创建byte组
////Directory.CreateDirectory(Environment.CurrentDirectory + "\\picturefile");
//wrtr = new FileStream(Environment.CurrentDirectory + "\\picturefile\\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".png", FileMode.Create); //创建新文件"new.jpg"
//int total = 0;
//while (total < size) //当接收长度小于总长度时继续执行
//{
// rect = _client_QXXWCX.Receive(data, total, dataleft, 0); //接收字节流receive方法返回int获取已接收字节个数第一个参数是需要写入的字节组第二个参数是起始位置第三个参数是接收字节的长度
// CallInvokeUIUpdate("UpdatertbMessage", "rect" + rect + "\n");
// total += rect; //已接收个数-下一次从当前个数开始接收
// dataleft -= rect; //剩下的字节长度
//}
//string ascData = Encoding.ASCII.GetString(data); // 将整个ASCII类型的数组(byte[])解码为(string)
// //Console.WriteLine(ascData);
//string hexData = HexToString(ascData);
////Console.WriteLine(hexData);
//byte[] finData = strToToHexByte(hexData);
////Console.WriteLine(BitConverter.ToString(finData));
//wrtr.Write(finData, 0, finData.Length); //输出文件
//wrtr.Flush(); //强制输出
//wrtr.Close(); //关闭文件流对象
//canSend = false;
//Console.WriteLine("文件写入结束");
//CallInvokeUIUpdate("UpdatertbMessage", "图片接收结束!\n");
}
}
catch (Exception err)
{
Console.WriteLine(err.Message);
SendMsgSilent(err.Message);
}
}
private void ParsingData(byte[] byteArray)
{
if (byteArray.Length == 32)
{
if (PasswordEquals(new byte[12] { byteArray[0], byteArray[1], byteArray[2], byteArray[3], byteArray[4], byteArray[5], byteArray[6], byteArray[7], byteArray[8], byteArray[9], byteArray[10], byteArray[11] }, new byte[12] { 0x41, 0x35, 0x42, 0x35, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30 }))
{
//float him = float.Parse(HexToString(ByteToString(new byte[8] { byteArray[18], byteArray[19], byteArray[16], byteArray[17], byteArray[14], byteArray[15], byteArray[12], byteArray[13] })));
//float err = float.Parse(HexToString(ByteToString(new byte[8] { byteArray[26], byteArray[27], byteArray[24], byteArray[25], byteArray[22], byteArray[23], byteArray[20], byteArray[21] })));
short him = BitConverter.ToInt16(strToToHexByte(Encoding.ASCII.GetString(new byte[4] { byteArray[26], byteArray[27], byteArray[24], byteArray[25] })), 0);
short err = BitConverter.ToInt16(strToToHexByte(Encoding.ASCII.GetString(new byte[4] { byteArray[22], byteArray[23], byteArray[20], byteArray[21] })), 0);
CallInvokeUIUpdate("UpdatertbMessage", "接收到状态数据:\n温度" + him / 10f + "\n湿度" + err / 10f + "\n");
}
if (PasswordEquals(byteArray, new byte[32] { 0x41, 0x35, 0x42, 0x35, 0x30, 0x32, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x46, 0x46, 0x46, 0x46 }))
{
//canSend = true;
Console.WriteLine("采集图片成功");
CallInvokeUIUpdate("UpdatertbMessage", "采集图片成功!\n");
}
else if (PasswordEquals(new byte[12] { byteArray[0], byteArray[1], byteArray[2], byteArray[3], byteArray[4], byteArray[5], byteArray[6], byteArray[7], byteArray[8], byteArray[9], byteArray[10], byteArray[11] }, new byte[12] { 0x41, 0x35, 0x42, 0x35, 0x30, 0x32, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30 }))
{
Console.WriteLine("采集图片失败");
CallInvokeUIUpdate("UpdatertbMessage", "采集图片失败!\n");
}
if (PasswordEquals(new byte[20] { byteArray[0], byteArray[1], byteArray[2], byteArray[3], byteArray[4], byteArray[5], byteArray[6], byteArray[7], byteArray[8], byteArray[9], byteArray[10], byteArray[11], byteArray[12], byteArray[13], byteArray[14], byteArray[15], byteArray[16], byteArray[17], byteArray[18], byteArray[19] },
new byte[20] { 0x41, 0x35, 0x42, 0x35, 0x30, 0x33, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30 }))
{
canSend = true;
Console.WriteLine("请求图片成功");
CallInvokeUIUpdate("UpdatertbMessage", "请求图片成功!\n");
picLength = BitConverter.ToInt32(strToToHexByte(Encoding.ASCII.GetString(new byte[8] { byteArray[26], byteArray[27], byteArray[24], byteArray[25], byteArray[22], byteArray[23], byteArray[20], byteArray[21] })), 0); //ASCII的长度
//picLength = BitConverter.ToInt32(strToToHexByte(Encoding.ASCII.GetString(new byte[8] { byteArray[20], byteArray[21], byteArray[22], byteArray[23], byteArray[24], byteArray[25], byteArray[26], byteArray[27] })), 0);
//Console.WriteLine(picLength);
CallInvokeUIUpdate("UpdatertbMessage", "图片长度:" + picLength + "\n");
//th_FIle = new Thread(ReceiveFile);
//th_FIle.IsBackground = true;
//th_FIle.Start();
//th_QXXWCX.Suspend();
}
else if (PasswordEquals(new byte[12] { byteArray[0], byteArray[1], byteArray[2], byteArray[3], byteArray[4], byteArray[5], byteArray[6], byteArray[7], byteArray[8], byteArray[9], byteArray[10], byteArray[11] }, new byte[12] { 0x41, 0x35, 0x42, 0x35, 0x30, 0x33, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30 }))
{
canSend = false;
Console.WriteLine("请求图片失败");
CallInvokeUIUpdate("UpdatertbMessage", "请求图片失败!\n");
}
if (PasswordEquals(byteArray, new byte[32] { 0x41, 0x35, 0x42, 0x35, 0x30, 0x34, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x46, 0x46, 0x46, 0x46 }))
{
Console.WriteLine("请求关机成功");
CallInvokeUIUpdate("UpdatertbMessage", "请求关机成功!\n");
}
else if (PasswordEquals(new byte[12] { byteArray[0], byteArray[1], byteArray[2], byteArray[3], byteArray[4], byteArray[5], byteArray[6], byteArray[7], byteArray[8], byteArray[9], byteArray[10], byteArray[11] }, new byte[12] { 0x41, 0x35, 0x42, 0x35, 0x30, 0x34, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30 }))
{
Console.WriteLine("请求关机失败");
CallInvokeUIUpdate("UpdatertbMessage", "请求关机失败!\n");
}
}
}
int picLength;
////[Obsolete]
//private void ReceiveFile()
//{
// CallInvokeUIUpdate("UpdatertbMessage", "开始接收图片!\n");
// FileStream wrtr; //文件读写类
// byte[] data;
// //int rect = _client_QXXWCX.Receive(data, 0, 4, 0); //用来接收图片字节流长度
// //int size = BitConverter.ToInt32(data, 0); //16进制转成int型
// int rect;
// int size = picLength;
// int dataleft = size;
// data = new byte[size]; //创建byte组
// Directory.CreateDirectory(Environment.CurrentDirectory + "\\picturefile");
// CallInvokeUIUpdate("UpdatertbMessage", "图片存储地址:" + Environment.CurrentDirectory + "\n");
// wrtr = new FileStream(Environment.CurrentDirectory + "\\picturefile\\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".png", FileMode.Create); //创建新文件"new.jpg"
// int total = 0;
// while (total < size) //当接收长度小于总长度时继续执行
// {
// rect = _client_QXXWCX.Receive(data, total, dataleft, 0); //接收字节流receive方法返回int获取已接收字节个数第一个参数是需要写入的字节组第二个参数是起始位置第三个参数是接收字节的长度
// total += rect; //已接收个数-下一次从当前个数开始接收
// dataleft -= rect; //剩下的字节长度
// }
// string hexData = Encoding.ASCII.GetString(data); // 将整个ASCII类型的数组(byte[])解码为(string)
// byte[] finData = strToToHexByte(hexData);
// wrtr.Write(finData, 0, finData.Length); //输出文件
// wrtr.Flush(); //强制输出
// wrtr.Close(); //关闭文件流对象
// canSend = false;
// CallInvokeUIUpdate("UpdatertbMessage", "图片接收完成!\n");
// th_QXXWCX.Resume();
// th_FIle.Abort();
//}
private void btnStatueData_Click(object sender, EventArgs e)
{
SendMessage_MEMS(new byte[32] { 0x41, 0x35, 0x42, 0x35, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x46, 0x46, 0x46, 0x46 });
}
private void btnPicture_Click(object sender, EventArgs e)
{
SendMessage_MEMS(new byte[32] { 0x41, 0x35, 0x42, 0x35, 0x30, 0x32, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x46, 0x46, 0x46, 0x46 });
}
private void btnRequestPic_Click(object sender, EventArgs e)
{
//if (canSend == false)
//{
// Console.WriteLine("未采集图片或采集图片不成功!");
// CallInvokeUIUpdate("UpdatertbMessage", "未采集图片或采集图片不成功!\n");
// return;
//}
SendMessage_MEMS(new byte[32] { 0x41, 0x35, 0x42, 0x35, 0x30, 0x33, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x46, 0x46, 0x46, 0x46 });
}
private void btnTurnOff_Click(object sender, EventArgs e)
{
SendMessage_MEMS(new byte[32] { 0x41, 0x35, 0x42, 0x35, 0x30, 0x34, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x46, 0x46, 0x46, 0x46 });
}
private void btnClear_Click(object sender, EventArgs e)
{
rtbMessage.Clear();
}
private void rtbMessage_TextChanged(object sender, EventArgs e)
{
rtbMessage.SelectionStart = rtbMessage.Text.Length; //Set the current caret position at the end
rtbMessage.ScrollToCaret(); //Now scroll it automatically
}
public void CallInvokeUIUpdate(String code, string arg)
{
//创建一个委托,用于封装一个方法,在这里是封装了 控制更新控件 的方法
Action<String, string> invokeAction = new Action<String, string>(CallInvokeUIUpdate);
//判断操作控件的线程是否创建控件的线程
//调用方调用方位于创建控件所在的线程以外的线程中,如果在其他线程则对控件进行方法调用时必须调用 Invoke 方法
if (this.InvokeRequired)
{
//与调用线程不同的线程上创建(说明您必须通过 Invoke 方法对控件进行调用)
this.Invoke(invokeAction, code, arg);
}
else
{
//窗体线程,即主线程
switch (code)
{
case "UpdatertbMessage":
rtbMessage.AppendText(arg);
break;
default:
break;
}
}
}
/// <summary>
/// 16进制转普通字符串
/// </summary>
/// <returns></returns>
public static string HexToString(string Hexdata)
{
string result = string.Empty;
byte[] arrByte = new byte[Hexdata.Length / 2];
int index = 0;
for (int i = 0; i < Hexdata.Length; i += 2)
{
arrByte[index++] = Convert.ToByte(Hexdata.Substring(i, 2), 16);
}
result = System.Text.Encoding.UTF8.GetString(arrByte);
return result;
}
public static string ByteToString(byte[] bytes)
{
string length = BitConverter.ToString(bytes, 0, bytes.Length);
string[] length1 = length.Split('-');
string length2 = "";
for (int i = 0; i < length1.Length; i++)
{
length2 += length1[i];
}
return length2;
}
///
/// 十六进制字符串转16进制字节数组
///
private static byte[] strToToHexByte(string hexString)
{
hexString = hexString.Replace(" ", "");
if ((hexString.Length % 2) != 0)
hexString += " ";
byte[] returnBytes = new byte[hexString.Length / 2];
for (int i = 0; i < returnBytes.Length; i++)
returnBytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
return returnBytes;
}
private static string hexStrToStr(string str)
{
//去除字符串中的空格
string[] strT = str.Split(' ');
string strA = "";
foreach (string strB in strT)
{
strA += strB;
}
char[] chars = strA.ToCharArray();
string returnstr = "";
string[] str1 = new string[chars.Length / 2];
for (int i = 0; i < chars.Length / 2; i++)
{
string str111 = chars[2 * i].ToString() + chars[2 * i + 1].ToString();
uint num = uint.Parse(str111, System.Globalization.NumberStyles.AllowHexSpecifier);
char charr = (char)num;
returnstr = returnstr + charr;
}
return returnstr;
}
/// <summary>
/// 将字符串形式的多位字节信息转换为对应的字节数组
/// </summary>
/// <param name="s"></param>
/// <returns></returns>
public static byte[] StringToBytes(string s)
{
string[] str = s.Split(' ');
int n = str.Length;
byte[] cmdBytes = null;
int p = 0;
for (int k = 0; k < n; k++)
{
int sLen = str[k].Length;
int bytesLen = sLen / 2;
int position = 0;
byte[] bytes = new byte[bytesLen];
for (int i = 0; i < bytesLen; i++)
{
string abyte = str[k].Substring(position, 2);
bytes[i] = Convert.ToByte(abyte, 16);
position += 2;
}
if (position >= 2)
{
byte[] cmdBytes2 = new byte[p + bytesLen];
if (cmdBytes != null)
{
Array.Copy(cmdBytes, 0, cmdBytes2, 0, p);
}
Array.Copy(bytes, 0, cmdBytes2, p, bytesLen);
cmdBytes = cmdBytes2;
p += bytesLen;
}
}
return cmdBytes;
}
/// <summary>
/// 字符串转换为16进制字符
/// </summary>
/// <param name="s"></param>
/// <param name="encode"></param>
/// <returns></returns>
private string StringToHexString(string s, Encoding encode)
{
byte[] b = encode.GetBytes(s);//按照指定编码将string编程字节数组
string result = string.Empty;
for (int i = 0; i < b.Length; i++)//逐字节变为16进制字符
{
result += Convert.ToString(b[i], 16);
}
return result;
}
}
}

120
QXXWCX/QXXWCX/Form1.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

22
QXXWCX/QXXWCX/Program.cs Normal file
View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace QXXWCX
{
internal static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("QXXWCX")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("QXXWCX")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("8e8909f1-2a3d-4c47-a6c5-e0f6358a667c")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.42000
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace QXXWCX.Properties
{
/// <summary>
/// 强类型资源类,用于查找本地化字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// 返回此类使用的缓存 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("QXXWCX.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace QXXWCX.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8E8909F1-2A3D-4C47-A6C5-E0F6358A667C}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>QXXWCX</RootNamespace>
<AssemblyName>QXXWCX</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

Binary file not shown.

View File

@ -0,0 +1 @@
89504E470D0A1A0A0000000D4948445200000074000000740802000000DBF88170000000097048597300000EC400000EC401952B0E1B0000001174455874536F66747761726500536E6970617374655D17CEDD000010B349444154789CED9D79545BD79DC72F88452C421810FB222136B108B188C58017EC608C6D1C8CB1631BE3D64E1D274D9B49E624D3F6CCD24EE674CE999E994C9B4C667A4E9A3453D776DC60128CB1D9C1EC022424B1EF3B028490D89158E60F791E57120221F4F4448F3E7FDDDFD5D57B3F7D7DFDDEBDF7F7BB17936BEF7C048CA08329D60EFC35631417458CE2A288515C14318A8B22467151C4282E8A18C54511A3B828621417458CE2A288515C143114713FFEF0DDA4D828ACBDD0318622EEB860EAED9C2B3FB872116B4774092E8C9980B50F0000B0BA264D8A8DA292BD4283FC5BDBBAD6A452AC3DD20186D273DBBAFB26A66600008154F22F7EFA23371712D61EE9004311170050C362CB0B5EEEAEEFE45CC5D6199D6040E25637B2913295EC75FB8D0C0C9DD1090624EEEC9CB8A3A71F31C382FC317446271890B800008AB70752363737C3D0139D6040E2FA78B859E1F188297FBF1D6A0C48DC487A306C4E1AC5D521F151E1B0D9C46DC7CA135D6128E2D269019E6E2E88392E986EEBEAC5D01F9D6028E2A69E5498282263DE438D41881BE44761840421E69A545651D784A13FBAC220C47D3D351936F39E97CE2F2C62E58C0EC15EDCF8A8703A2D003105D3C2FCE24AECDCD125D80FD433CE9E82CDBCE7651A7E91E2E541F1F6A0787B126CADADADAC6CACAD6CADADACADAC70389C605A383A31995B583A2D14A1E0B2A6602C6E4E563A3C4868EFEEAF56FF2AB3B1B6628404F9537C28DEEE142F4F33339CBA96642F77B2977B526CD43FFCE6B3FEA1511D3BAD31588ACB0C0F4D3DA1304878FCB448B599BB0B891112C408090CDDFF6A4366DA6BFFF6F997DABB78303013D7DE8E70EB4A3A5C53585EDD3B388C983E1E6E47A3198CD0202F7757751791CA6493D3C2C5C5E585A5A585C5250080AFB72795EC85346084043AD8134562090ABF606F3013F7CEB54B0EF644C4148925F7730B000078BC652233228119114825AB7E6B6979A577706470646C6442303A3EB9E3FAC34FEFDC888BA4236620955CDFC2D5FD0FD0006CC4CD387B2A4A7125E1B3AF1ED26901094C460233C2D454610C235F8AEC1D1CE91D181E1E9FDCF3E242D11C6C5A5A5AE8C4672DC040DC287A70D6F914A5CAB7B2B35C488E70CD9C64BEA9B5BD89CB6FEFEE07FBC195E4049B92F905EDFC3C38FA16D7C3D5F9ED9C2BAAF588B29B5B5B05A5554515B5739279ED6EE1EBE3099BDDFDC3EA5AA28D5E27113853D37B3957ADADAC76FC7469790500606A6292C88CC0E1D40EB376874E0B801FE55D7D83CB2B2BDA5DEAE0E855DC7B3957A98ADD4A4E0BAFE3E3FFFCFD8F3EFCA5787E0100E0604FBC7B2353BB5BC0AF3200404D1347BBEBE804FD3D1672B2D213980CA5CAEEFEA1BCE765BCCE1EB9C9EFEC91E7DD8406F9070750E1909A26D8DB118EC56DA7ED2CAFAC56D5371FCCEB03A1277133D34E2BCD170647C70BCBAA6B157BD6E8840029273019FB1537ED54123CD228AF656D6C6C68E5AF6ED087B8A9271232CFBD86983BCA2A674EB2FD668F6184E517574ECDCC6A78177B3B425A72125C535C55A795BF3A431FE26E6E6DC90BEDDDFD252FEB59AD7C752DA5321952B6B1B6FAE4971FB1F99D55F5CD4DDCB63DEF72FEF471856E5BD3A834E0D53FFA10B7B8AA4E302D5C5F5FEFE81DD8BD259160AB541319468B0CA34D4ECD54D4B14AAB1B56D776CE21237BB9A79D52E8B685E5D507F15927E869B4C0EBECD9535900C0117B3BA4BCB0B8F420AF505E7673215DCF38F7F9AFFFFECA8533B636D6AA5FCC4C7B0D365F54D41842641EFBC5729823C46D718522714169D5BF7EFA85F8FF1FC478BCE5EBA9C9BFFBF8E719674FC103E1D8483A3C9996C9D6BF2FAAD09BCFBB60B8E2CE884400007E57EFCF7EFD490BAF03A9C75B5A649D4FF9F4E39FC74684C96B2E9F53E8B6DF15954B0C234A6458E2527DB6570B87475FADD1CC2F2EFDFBEFBF568A50D81309EFBD991D1AE8F77A6AB287AB33523F3A21D03C96813606242ED5C7137E9E0E8D8DC39FFEA5A0F8B77FF8B35024862B7D3CDD95D680765C6EC70AEC636808347F5FD81C9B9C566AD0C8E63573DB2F9F3B7D2A31CED6C6BABE85EBEDE96662628234A86B6E851F209863A0E24A65B299D91D628B1B1B1BDFE4177D935F4424D892BD3CFEEEC7B7918FD6A4B247DFBFD087A31A63288F059CA929CD6F5BDC39C9BC8DF5CE8B6772965656722E5F806B1E7EF70CF359831286226E424C241E6F89982E4E8EEFBD99BD4BFB9CCBE9F0BE096E477771553D8AFE6985A1889B14138994E503DBD040BF7B37B3766C1C1F157E3A290EAE41A61B06854188EBE9E612124845CCA1B171F9B2CEB1B8E8ECCCF34A8D5D488E3FBCFA3A5CF3F0BB427839CD7030087113A16E0B00686A6D2F287D292FA725275D4D4F853F7D2B3B0B1EB1B575F53E2DA9D283935A6020E2462065996CBDAE99333C3651C37AB52679F1CC49A4FFDEBB9915E44781BFFBA7DC02BDF9B95FB01F8A9D38CA84A35E15754D6B52190020BFB8222622D4C2DC1C0090969C44F1F25893CA182181F077EF3F2930CC07821CEC7B6ECAB1A3B0F9B4A4525E189B9CFAE2412E524FF3F75552B691CD2B2CC37E5D7117301697C908257BB923E6D3E2CAD9B9ED096E0D8BA34EBE4636EFB77FF833EAFE1D0C8C1F0B70B75D5E59F94E65A9F0FE938271C1F49BD72F21D3DCADADAD6F9F9518CEEACC2E60296E7000151E817D5B50B2B2BAAADAACA28EC5EBECA1F95382A894E1F1C906364F9E7367F86029EE99E3DBDDB6BDBBFF4565ADBA96B373E21A1607193FEC82151E6F47B021120844822DD1CED6C6DADACC0C6786C3999B99C90B6666B8D535E9EC9C78764E323A2140F57D8899B8C10154262314311FE53FDFD7D74D4D4D5D498E2E24273767271792A3ABB3932BC9916847908F2E34676171A9676098D3D6C969EBD23A814A1D98899B7D69

View File

@ -0,0 +1 @@
89504E470D0A1A0A0000000D4948445200000074000000740802000000DBF88170000000097048597300000EC400000EC401952B0E1B0000001174455874536F66747761726500536E6970617374655D17CEDD000010B349444154789CED9D79545BD79DC72F88452C421810FB222136B108B188C58017EC608C6D1C8CB1631BE3D64E1D274D9B49E624D3F6CCD24EE674CE999E994C9B4C667A4E9A3453D776DC60128CB1D9C1EC022424B1EF3B028490D89158E60F791E57120221F4F4448F3E7FDDDFD5D57B3F7D7DFDDEBDF7F7BB17936BEF7C048CA08329D60EFC35631417458CE2A288515C14318A8B22467151C4282E8A18C54511A3B828621417458CE2A288515C143114713FFEF0DDA4D828ACBDD0318622EEB860EAED9C2B3FB872116B4774092E8C9980B50F0000B0BA264D8A8DA292BD4283FC5BDBBAD6A452AC3DD20186D273DBBAFB26A66600008154F22F7EFA23371712D61EE9004311170050C362CB0B5EEEAEEFE45CC5D6199D6040E25637B2913295EC75FB8D0C0C9DD1090624EEEC9CB8A3A71F31C382FC317446271890B800008AB70752363737C3D0139D6040E2FA78B859E1F188297FBF1D6A0C48DC487A306C4E1AC5D521F151E1B0D9C46DC7CA135D6128E2D269019E6E2E88392E986EEBEAC5D01F9D6028E2A69E5498282263DE438D41881BE44761840421E69A545651D784A13FBAC220C47D3D351936F39E97CE2F2C62E58C0EC15EDCF8A8703A2D003105D3C2FCE24AECDCD125D80FD433CE9E82CDBCE7651A7E91E2E541F1F6A0787B126CADADADAC6CACAD6CADADACADAC70389C605A383A31995B583A2D14A1E0B2A6602C6E4E563A3C4868EFEEAF56FF2AB3B1B6628404F9537C28DEEE142F4F33339CBA96642F77B2977B526CD43FFCE6B3FEA1511D3BAD31588ACB0C0F4D3DA1304878FCB448B599BB0B891112C408090CDDFF6A4366DA6BFFF6F997DABB78303013D7DE8E70EB4A3A5C53585EDD3B388C983E1E6E47A3198CD0202F7757751791CA6493D3C2C5C5E585A5A585C5250080AFB72795EC85346084043AD8134562090ABF606F3013F7CEB54B0EF644C4148925F7730B000078BC652233228119114825AB7E6B6979A577706470646C6442303A3EB9E3FAC34FEFDC888BA4236620955CDFC2D5FD0FD0006CC4CD387B2A4A7125E1B3AF1ED26901094C460233C2D454610C235F8AEC1D1CE91D181E1E9FDCF3E242D11C6C5A5A5AE8C4672DC040DC287A70D6F914A5CAB7B2B35C488E70CD9C64BEA9B5BD89CB6FEFEE07FBC195E4049B92F905EDFC3C38FA16D7C3D5F9ED9C2BAAF588B29B5B5B05A5554515B5739279ED6EE1EBE3099BDDFDC3EA5AA28D5E27113853D37B3957ADADAC76FC7469790500606A6292C88CC0E1D40EB376874E0B801FE55D7D83CB2B2BDA5DEAE0E855DC7B3957A98ADD4A4E0BAFE3E3FFFCFD8F3EFCA5787E0100E0604FBC7B2353BB5BC0AF3200404D1347BBEBE804FD3D1672B2D213980CA5CAEEFEA1BCE765BCCE1EB9C9EFEC91E7DD8406F9070750E1909A26D8DB118EC56DA7ED2CAFAC56D5371FCCEB03A1277133D34E2BCD170647C70BCBAA6B157BD6E8840029273019FB1537ED54123CD228AF656D6C6C68E5AF6ED087B8A9271232CFBD86983BCA2A674EB2FD668F6184E517574ECDCC6A78177B3B425A72125C535C55A795BF3A431FE26E6E6DC90BEDDDFD252FEB59AD7C752DA5321952B6B1B6FAE4971FB1F99D55F5CD4DDCB63DEF72FEF471856E5BD3A834E0D53FFA10B7B8AA4E302D5C5F5FEFE81DD8BD259160AB541319468B0CA34D4ECD54D4B14AAB1B56D776CE21237BB9A79D52E8B685E5D507F15927E869B4C0EBECD9535900C0117B3BA4BCB0B8F420AF505E7673215DCF38F7F9AFFFFECA8533B636D6AA5FCC4C7B0D365F54D41842641EFBC5729823C46D718522714169D5BF7EFA85F8FF1FC478BCE5EBA9C9BFFBF8E719674FC103E1D8483A3C9996C9D6BF2FAAD09BCFBB60B8E2CE884400007E57EFCF7EFD490BAF03A9C75B5A649D4FF9F4E39FC74684C96B2E9F53E8B6DF15954B0C234A6458E2527DB6570B87475FADD1CC2F2EFDFBEFBF568A50D81309EFBD991D1AE8F77A6AB287AB33523F3A21D03C96813606242ED5C7137E9E0E8D8DC39FFEA5A0F8B77FF8B35024862B7D3CDD95D680765C6EC70AEC636808347F5FD81C9B9C566AD0C8E63573DB2F9F3B7D2A31CED6C6BABE85EBEDE96662628234A86B6E851F209863A0E24A65B299D91D628B1B1B1BDFE4177D935F4424D892BD3CFEEEC7B7918FD6A4B247DFBFD087A31A63288F059CA929CD6F5BDC39C9BC8DF5CE8B6772965656722E5F806B1E7EF70CF359831286226E424C241E6F89982E4E8EEFBD99BD4BFB9CCBE9F0BE096E477771553D8AFE6985A1889B14138994E503DBD040BF7B37B3766C1C1F157E3A290EAE41A61B06854188EBE9E612124845CCA1B171F9B2CEB1B8E8ECCCF34A8D5D488E3FBCFA3A5CF3F0BB427839CD7030087113A16E0B00686A6D2F287D292FA725275D4D4F853F7D2B3B0B1EB1B575F53E2DA9D283935A6020E2462065996CBDAE99333C3651C37AB52679F1CC49A4FFDEBB9915E44781BFFBA7DC02BDF9B95FB01F8A9D38CA84A35E15754D6B52190020BFB8222622D4C2DC1C0090969C44F1F25893CA182181F077EF3F2930CC07821CEC7B6ECAB1A3B0F9B4A4525E189B9CFAE2412E524FF3F75552B691CD2B2CC37E5D7117301697C908257BB923E6D3E2CAD9B9ED096E0D8BA34EBE4636EFB77FF833EAFE1D0C8C1F0B70B75D5E59F94E65A9F0FE938271C1F49BD72F21D3DCADADAD6F9F9518CEEACC2E60296E7000151E817D5B50B2B2BAAADAACA28EC5EBECA1F95382A894E1F1C906364F9E7367F86029EE99E3DBDDB6BDBBFF4565ADBA96B373E21A1607193FEC82151E6F47B021120844822DD1CED6C6DADACC0C6786C3999B99C90B6666B8D535E9EC9C78764E323A2140F57D8899B8C10154262314311FE53FDFD7D74D4D4D5D498E2E24273767271792A3ABB3932BC9916847908F2E34676171A9676098D3D6C969EBD23A814A1D98899B7D69

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]

Binary file not shown.

View File

@ -0,0 +1 @@
8069502011d0681850e57a53d5a1673222f430a6

View File

@ -0,0 +1,11 @@
F:\Code\huaxueshiyanshi\QXXWCX\QXXWCX\bin\Debug\QXXWCX.exe.config
F:\Code\huaxueshiyanshi\QXXWCX\QXXWCX\bin\Debug\QXXWCX.exe
F:\Code\huaxueshiyanshi\QXXWCX\QXXWCX\bin\Debug\QXXWCX.pdb
F:\Code\huaxueshiyanshi\QXXWCX\QXXWCX\obj\Debug\QXXWCX.csproj.AssemblyReference.cache
F:\Code\huaxueshiyanshi\QXXWCX\QXXWCX\obj\Debug\QXXWCX.csproj.SuggestedBindingRedirects.cache
F:\Code\huaxueshiyanshi\QXXWCX\QXXWCX\obj\Debug\QXXWCX.Form1.resources
F:\Code\huaxueshiyanshi\QXXWCX\QXXWCX\obj\Debug\QXXWCX.Properties.Resources.resources
F:\Code\huaxueshiyanshi\QXXWCX\QXXWCX\obj\Debug\QXXWCX.csproj.GenerateResource.cache
F:\Code\huaxueshiyanshi\QXXWCX\QXXWCX\obj\Debug\QXXWCX.csproj.CoreCompileInputs.cache
F:\Code\huaxueshiyanshi\QXXWCX\QXXWCX\obj\Debug\QXXWCX.exe
F:\Code\huaxueshiyanshi\QXXWCX\QXXWCX\obj\Debug\QXXWCX.pdb

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
obj\Debug\\_IsIncrementalBuild

BIN
QXXWCX/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB