重新编写了解析方法,将接收到的数据转base64字符串,再转png
This commit is contained in:
parent
ecbf66518a
commit
7f83451c26
Binary file not shown.
0
.vs/QXXWCX/FileContentIndex/read.lock
Normal file
0
.vs/QXXWCX/FileContentIndex/read.lock
Normal file
BIN
.vs/QXXWCX/v17/.suo
Normal file
BIN
.vs/QXXWCX/v17/.suo
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6
QXXWCX/App.config
Normal file
6
QXXWCX/App.config
Normal 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/Form1.Designer.cs
generated
Normal file
139
QXXWCX/Form1.Designer.cs
generated
Normal 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(465, 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;
|
||||
}
|
||||
}
|
||||
|
||||
541
QXXWCX/Form1.cs
Normal file
541
QXXWCX/Form1.cs
Normal file
@ -0,0 +1,541 @@
|
||||
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;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace QXXWCX
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
//QXXWCXIP
|
||||
//string _ip = "192.168.1.204";
|
||||
string _ip = "192.168.1.204";
|
||||
|
||||
//端口号
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void ReceiveMessage_MEMS()
|
||||
{
|
||||
byte[] messageBytes = null;
|
||||
int num = 0;
|
||||
int a = 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(buffer[i]);
|
||||
}
|
||||
|
||||
Console.WriteLine(BitConverter.ToString(buffer));
|
||||
CallInvokeUIUpdate("UpdatertbMessage", "接收数据:" + BitConverter.ToString(buffer) + "\n");
|
||||
Console.WriteLine("测试节点==》CallInvokeUIUpdate");
|
||||
|
||||
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];
|
||||
|
||||
//wrtr = new FileStream(Environment.CurrentDirectory + "\\picturefile\\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".txt", FileMode.Create,FileAccess.Write); //创建新文件"new.jpg"
|
||||
|
||||
string ascii = Encoding.Default.GetString(buffer);
|
||||
//result[i] = buffer[i];
|
||||
Console.WriteLine(ascii);
|
||||
string CurDir = System.AppDomain.CurrentDomain.BaseDirectory + @"SaveDir\"; //设置当前目录
|
||||
if (!System.IO.Directory.Exists(CurDir)) System.IO.Directory.CreateDirectory(CurDir); //该路径不存在时,在当前文件目录下创建文件夹"导出.."
|
||||
|
||||
//不存在该文件时先创建
|
||||
string datetime = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||||
//String filePath = CurDir + datetime + ".txt"; // 生成txt文件
|
||||
//测试文件 可以生成base64编码txt文件,能用转图片
|
||||
String filePath = CurDir + "base64" + ".txt"; // 生成txt文件
|
||||
System.IO.StreamWriter file1 = new System.IO.StreamWriter(filePath, true); //文件已覆盖方式添加内容
|
||||
|
||||
file1.Write(ascii); //保存数据到文件
|
||||
|
||||
file1.Close(); //关闭文件
|
||||
file1.Dispose(); //释放对象
|
||||
/*
|
||||
for (int i=0;i<num;i++)
|
||||
{
|
||||
string ascii = Encoding.Default.GetString(buffer);
|
||||
//result[i] = buffer[i];
|
||||
Console.WriteLine(ascii);
|
||||
string CurDir = System.AppDomain.CurrentDomain.BaseDirectory + @"SaveDir\"; //设置当前目录
|
||||
if (!System.IO.Directory.Exists(CurDir)) System.IO.Directory.CreateDirectory(CurDir); //该路径不存在时,在当前文件目录下创建文件夹"导出.."
|
||||
|
||||
//不存在该文件时先创建
|
||||
String filePath = CurDir + DateTime.Now.ToString("yyyyMMddHHmmss") + ".txt";
|
||||
System.IO.StreamWriter file1 = new System.IO.StreamWriter(filePath, false); //文件已覆盖方式添加内容
|
||||
|
||||
file1.Write(data); //保存数据到文件
|
||||
|
||||
file1.Close(); //关闭文件
|
||||
file1.Dispose(); //释放对象
|
||||
|
||||
}
|
||||
|
||||
int total = num;
|
||||
|
||||
CallInvokeUIUpdate("UpdatertbMessage", "total:" + total + "\n");
|
||||
CallInvokeUIUpdate("UpdatertbMessage", "size:" + size + "\n");
|
||||
while (total < size) //当接收长度小于总长度时继续执行
|
||||
{
|
||||
//
|
||||
rect = _client_QXXWCX.Receive(data, total, dataleft, 0); //接收字节流,receive方法返回int获取已接收字节个数,第一个参数是需要写入的字节组,第二个参数是起始位置,第三个参数是接收字节的长度
|
||||
|
||||
CallInvokeUIUpdate("UpdatertbMessage", "rect:" + rect + "\n");
|
||||
|
||||
int dataLength = 0;
|
||||
for(int i=total;i<total+rect;i++)
|
||||
{
|
||||
result[i] = data[dataLength];
|
||||
dataLength++;
|
||||
}
|
||||
|
||||
total += rect; //已接收个数-下一次从当前个数开始接收
|
||||
dataleft -= rect; //剩下的字节长度
|
||||
|
||||
CallInvokeUIUpdate("UpdatertbMessage", "total:" + total + "\n");
|
||||
CallInvokeUIUpdate("UpdatertbMessage", "dataleft:" + dataleft + "\n");
|
||||
|
||||
}
|
||||
//Array.Reverse(data);
|
||||
string text = "";
|
||||
for (int i = 0; i < data.Length; i++) {
|
||||
text += data[i].ToString();
|
||||
}
|
||||
Console.WriteLine(text);
|
||||
//Console.WriteLine("text");
|
||||
//Console.WriteLine(text);
|
||||
//string text = Encoding.Unicode.GetString(data);
|
||||
System.IO.File.WriteAllText(@"C:\Users\LENOVO\Desktop\111.txt", text);
|
||||
|
||||
CallInvokeUIUpdate("UpdatertbMessage", "接收图片结束,开始存储图片!\n");
|
||||
|
||||
//byte[] totalData = new byte[buffer.Length + data.Length];
|
||||
////buffer.CopyTo(totalData, 0);
|
||||
////data.CopyTo(totalData, buffer.Length);
|
||||
|
||||
//Buffer.BlockCopy(buffer, 0, totalData, 0, buffer.Length);//这种方法仅适用于字节数组
|
||||
//Buffer.BlockCopy(data, 0, totalData, data.Length, data.Length);
|
||||
|
||||
|
||||
////string ascData = Encoding.ASCII.GetString(result); // 将整个ASCII类型的数组(byte[])解码为(string)
|
||||
//string ascData = BitConverter.ToString(result);
|
||||
//CallInvokeUIUpdate("UpdatertbMessage", "ascDataLength:"+ ascData.Length);
|
||||
//CallInvokeUIUpdate("UpdatertbMessage", "ascData:" + ascData);
|
||||
|
||||
////string hexData = HexToString(ascData);
|
||||
//byte[] finData = strToToHexByte(ascData);
|
||||
//CallInvokeUIUpdate("UpdatertbMessage", "2222\n");
|
||||
for(int i=0;i < size/2; i++)
|
||||
{
|
||||
byte b = System.Text.Encoding.ASCII.GetBytes(result[i].ToString()+ result[i+1].ToString())[0];
|
||||
}
|
||||
|
||||
wrtr.Write(data, 0, data.Length); //输出文件
|
||||
wrtr.Flush(); //强制输出
|
||||
wrtr.Close(); //关闭文件流对象
|
||||
|
||||
CallInvokeUIUpdate("UpdatertbMessage", "图片接收结束!\n");
|
||||
|
||||
canSend = false;
|
||||
|
||||
/*FileStream fs = new FileStream("E:\\BaiduNetdiskDownload\\图片\\logo.png", FileMode.Open, FileAccess.Read);
|
||||
byte[] byteArray = new byte[fs.Length];
|
||||
fs.Read(byteArray, 0, byteArray.Length);
|
||||
FileStream fw = new FileStream("E:\\BaiduNetdiskDownload\\QXXWCX2\\QXXWCX\\QXXWCX\\bin\\Debug\\picturefile\\test.png", FileMode.OpenOrCreate, FileAccess.Write);
|
||||
fw.Write(data, 0, data.Length);*/
|
||||
}
|
||||
//}
|
||||
|
||||
//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("请求图片成功");
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
120
QXXWCX/Form1.resx
Normal file
120
QXXWCX/Form1.resx
Normal 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/Program.cs
Normal file
22
QXXWCX/Program.cs
Normal 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
36
QXXWCX/Properties/AssemblyInfo.cs
Normal file
36
QXXWCX/Properties/AssemblyInfo.cs
Normal 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")]
|
||||
71
QXXWCX/Properties/Resources.Designer.cs
generated
Normal file
71
QXXWCX/Properties/Resources.Designer.cs
generated
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
QXXWCX/Properties/Resources.resx
Normal file
117
QXXWCX/Properties/Resources.resx
Normal 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>
|
||||
30
QXXWCX/Properties/Settings.Designer.cs
generated
Normal file
30
QXXWCX/Properties/Settings.Designer.cs
generated
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
QXXWCX/Properties/Settings.settings
Normal file
7
QXXWCX/Properties/Settings.settings
Normal 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>
|
||||
83
QXXWCX/QXXWCX.csproj
Normal file
83
QXXWCX/QXXWCX.csproj
Normal 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>
|
||||
@ -33,6 +33,8 @@ namespace QXXWCX
|
||||
|
||||
bool canSend = false;
|
||||
|
||||
string txtTime;
|
||||
|
||||
//数据接收线程
|
||||
Thread th_QXXWCX = null;
|
||||
|
||||
@ -132,7 +134,6 @@ namespace QXXWCX
|
||||
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型
|
||||
@ -141,19 +142,24 @@ namespace QXXWCX
|
||||
int dataleft = size - num;
|
||||
data = new byte[size]; //创建byte组
|
||||
|
||||
byte[] result = new byte[size - 8];
|
||||
byte[] result = new byte[size];
|
||||
//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);
|
||||
if (!Directory.Exists(Environment.CurrentDirectory + "\\picturefile\\"))
|
||||
Directory.CreateDirectory(Environment.CurrentDirectory + "\\picturefile\\");
|
||||
|
||||
int bufferLen = 8;
|
||||
for (int i = 0; i < num-8; i++)
|
||||
txtTime = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||||
StreamWriter wrtr = new StreamWriter(Environment.CurrentDirectory + "\\picturefile\\" + txtTime + ".txt", true);
|
||||
//FileStream 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; i++)
|
||||
{
|
||||
result[i] = buffer[bufferLen];
|
||||
bufferLen++;
|
||||
result[i] = buffer[i];
|
||||
//bufferLen++;
|
||||
}
|
||||
|
||||
try
|
||||
@ -185,7 +191,7 @@ namespace QXXWCX
|
||||
//wrtr.Write(finData, 0, finData.Length); //输出文件
|
||||
|
||||
int dataLength = 0;
|
||||
for (int i = total-8; i < total + rect-8; i++)
|
||||
for (int i = total; i < total + rect; i++)
|
||||
{
|
||||
result[i] = data[dataLength];
|
||||
dataLength++;
|
||||
@ -200,6 +206,8 @@ namespace QXXWCX
|
||||
|
||||
CallInvokeUIUpdate("UpdatertbMessage", "接收图片结束,开始存储图片!\n");
|
||||
|
||||
string ascii = Encoding.Default.GetString(result);
|
||||
|
||||
////十六进制数组转普通字符串
|
||||
//str = HexToString(ByteToString(result));
|
||||
|
||||
@ -216,15 +224,20 @@ namespace QXXWCX
|
||||
|
||||
//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.Write(result, 0, result.Length);
|
||||
wrtr.Write(ascii);
|
||||
wrtr.Flush(); //强制输出
|
||||
wrtr.Close(); //关闭文件流对象
|
||||
|
||||
CallInvokeUIUpdate("UpdatertbMessage", "图片接收结束!\n");
|
||||
Thread thSave = new Thread(Base64ToImage);
|
||||
thSave.IsBackground = true;
|
||||
thSave.Start(ascii);
|
||||
|
||||
CallInvokeUIUpdate("UpdatertbMessage", "txt接收结束!\n");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
CallInvokeUIUpdate("UpdatertbMessage", "图片接收出错:"+ex.Message+"\n");
|
||||
CallInvokeUIUpdate("UpdatertbMessage", "图片接收出错:" + ex.Message + "\n");
|
||||
}
|
||||
finally
|
||||
{
|
||||
@ -588,5 +601,22 @@ namespace QXXWCX
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Base64ToImage(object baseStr)
|
||||
{
|
||||
string base64 = baseStr as string;
|
||||
base64 = base64.Replace("data:image/png;base64,", "").Replace("data:image/jgp;base64,", "").Replace("data:image/jpg;base64,", "").Replace("data:image/jpeg;base64,", "");//将base64头部信息替换
|
||||
|
||||
byte[] bytes = Convert.FromBase64String(base64);
|
||||
MemoryStream memStream = new MemoryStream(bytes);
|
||||
Image mImage = Image.FromStream(memStream);
|
||||
Bitmap bp = new Bitmap(mImage);
|
||||
|
||||
bp.Save(Environment.CurrentDirectory + "\\picturefile\\" + txtTime + ".png", System.Drawing.Imaging.ImageFormat.Png);//注意保存路径
|
||||
|
||||
CallInvokeUIUpdate("UpdatertbMessage", "png存储结束!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -9,3 +9,14 @@ F:\Code\huaxueshiyanshi\QXXWCX\QXXWCX\obj\Debug\QXXWCX.csproj.GenerateResource.c
|
||||
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
|
||||
F:\Code\huaxueshiyanshi\20220101_HXSYS_upperpc_qx\QXXWCX\QXXWCX\bin\Debug\QXXWCX.exe.config
|
||||
F:\Code\huaxueshiyanshi\20220101_HXSYS_upperpc_qx\QXXWCX\QXXWCX\bin\Debug\QXXWCX.exe
|
||||
F:\Code\huaxueshiyanshi\20220101_HXSYS_upperpc_qx\QXXWCX\QXXWCX\bin\Debug\QXXWCX.pdb
|
||||
F:\Code\huaxueshiyanshi\20220101_HXSYS_upperpc_qx\QXXWCX\QXXWCX\obj\Debug\QXXWCX.csproj.AssemblyReference.cache
|
||||
F:\Code\huaxueshiyanshi\20220101_HXSYS_upperpc_qx\QXXWCX\QXXWCX\obj\Debug\QXXWCX.csproj.SuggestedBindingRedirects.cache
|
||||
F:\Code\huaxueshiyanshi\20220101_HXSYS_upperpc_qx\QXXWCX\QXXWCX\obj\Debug\QXXWCX.Form1.resources
|
||||
F:\Code\huaxueshiyanshi\20220101_HXSYS_upperpc_qx\QXXWCX\QXXWCX\obj\Debug\QXXWCX.Properties.Resources.resources
|
||||
F:\Code\huaxueshiyanshi\20220101_HXSYS_upperpc_qx\QXXWCX\QXXWCX\obj\Debug\QXXWCX.csproj.GenerateResource.cache
|
||||
F:\Code\huaxueshiyanshi\20220101_HXSYS_upperpc_qx\QXXWCX\QXXWCX\obj\Debug\QXXWCX.csproj.CoreCompileInputs.cache
|
||||
F:\Code\huaxueshiyanshi\20220101_HXSYS_upperpc_qx\QXXWCX\QXXWCX\obj\Debug\QXXWCX.exe
|
||||
F:\Code\huaxueshiyanshi\20220101_HXSYS_upperpc_qx\QXXWCX\QXXWCX\obj\Debug\QXXWCX.pdb
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
QXXWCX/bin/Debug/QXXWCX.exe
Normal file
BIN
QXXWCX/bin/Debug/QXXWCX.exe
Normal file
Binary file not shown.
6
QXXWCX/bin/Debug/QXXWCX.exe.config
Normal file
6
QXXWCX/bin/Debug/QXXWCX.exe.config
Normal 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>
|
||||
BIN
QXXWCX/bin/Debug/QXXWCX.pdb
Normal file
BIN
QXXWCX/bin/Debug/QXXWCX.pdb
Normal file
Binary file not shown.
1
QXXWCX/bin/Debug/SaveDir/base64.txt
Normal file
1
QXXWCX/bin/Debug/SaveDir/base64.txt
Normal file
File diff suppressed because one or more lines are too long
BIN
QXXWCX/bin/Debug/picturefile/20230706174134.png
Normal file
BIN
QXXWCX/bin/Debug/picturefile/20230706174134.png
Normal file
Binary file not shown.
BIN
QXXWCX/bin/Debug/picturefile/20230706174244.png
Normal file
BIN
QXXWCX/bin/Debug/picturefile/20230706174244.png
Normal file
Binary file not shown.
BIN
QXXWCX/bin/Debug/picturefile/20230707102503.png
Normal file
BIN
QXXWCX/bin/Debug/picturefile/20230707102503.png
Normal file
Binary file not shown.
BIN
QXXWCX/bin/Debug/picturefile/20230707102732.png
Normal file
BIN
QXXWCX/bin/Debug/picturefile/20230707102732.png
Normal file
Binary file not shown.
BIN
QXXWCX/bin/Debug/picturefile/20230707102847.png
Normal file
BIN
QXXWCX/bin/Debug/picturefile/20230707102847.png
Normal file
Binary file not shown.
0
QXXWCX/bin/Debug/picturefile/20230707104721.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707104721.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707104812.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707104812.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707104919.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707104919.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707105015.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707105015.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707105145.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707105145.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707105420.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707105420.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707105539.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707105539.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707105706.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707105706.png
Normal file
BIN
QXXWCX/bin/Debug/picturefile/20230707105926.png
Normal file
BIN
QXXWCX/bin/Debug/picturefile/20230707105926.png
Normal file
Binary file not shown.
BIN
QXXWCX/bin/Debug/picturefile/20230707110039.png
Normal file
BIN
QXXWCX/bin/Debug/picturefile/20230707110039.png
Normal file
Binary file not shown.
0
QXXWCX/bin/Debug/picturefile/20230707110338.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707110338.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707110427.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707110427.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707111532.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707111532.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707111749.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230707111749.png
Normal file
0
QXXWCX/bin/Debug/picturefile/20230725160934.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230725160934.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230725161101.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230725161101.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230725161252.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230725161252.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230725161527.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230725161527.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230725161855.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230725161855.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230725164016.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230725164016.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726090638.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726090638.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726091004.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726091004.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726091947.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726091947.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726092212.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726092212.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726092346.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726092346.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726092715.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726092715.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726092757.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726092757.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726092924.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726092924.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726093222.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726093222.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726094032.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726094032.txt
Normal file
BIN
QXXWCX/bin/Debug/picturefile/20230726095016.txt
Normal file
BIN
QXXWCX/bin/Debug/picturefile/20230726095016.txt
Normal file
Binary file not shown.
0
QXXWCX/bin/Debug/picturefile/20230726095433.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726095433.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726095507.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726095507.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726095839.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726095839.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726095840.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726095840.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726095841.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726095841.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160455.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160455.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160612.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160612.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160613.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160613.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160614.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160614.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160701.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160701.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160702.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160702.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160729.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160729.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160730.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160730.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160904.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726160904.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726161007.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726161007.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726161420.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726161420.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726161647.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726161647.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726161714.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230726161714.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727104634.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727104634.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727104904.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727104904.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727104953.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727104953.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105014.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105014.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105317.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105317.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105318.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105318.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105319.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105319.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105456.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105456.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105551.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105551.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105654.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105654.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105730.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105730.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105738.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105738.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105747.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105747.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105848.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105848.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105939.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727105939.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727110128.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727110128.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727110210.txt
Normal file
0
QXXWCX/bin/Debug/picturefile/20230727110210.txt
Normal file
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user