Compare commits

...

1 Commits
main ... XWTest

Author SHA1 Message Date
e5da43e013 显微成像测试代码 2023-07-28 10:26:01 +08:00
34 changed files with 951 additions and 0 deletions

View File

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

Binary file not shown.

25
XWCX/XWCX.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}") = "XWCX", "XWCX\XWCX.csproj", "{D7B519C7-98C1-4F68-9124-DF6C70B08249}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D7B519C7-98C1-4F68-9124-DF6C70B08249}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D7B519C7-98C1-4F68-9124-DF6C70B08249}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7B519C7-98C1-4F68-9124-DF6C70B08249}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D7B519C7-98C1-4F68-9124-DF6C70B08249}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A7E298FF-2EEE-46FD-8885-A68662028909}
EndGlobalSection
EndGlobal

6
XWCX/XWCX/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>

125
XWCX/XWCX/Form1.Designer.cs generated Normal file
View File

@ -0,0 +1,125 @@
namespace XWCX
{
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.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(72, 105);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(131, 40);
this.button1.TabIndex = 0;
this.button1.Text = "初始化";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(72, 263);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(131, 40);
this.button2.TabIndex = 1;
this.button2.Text = "开始采集";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.Location = new System.Drawing.Point(72, 337);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(131, 40);
this.button3.TabIndex = 2;
this.button3.Text = "请求数据";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.Location = new System.Drawing.Point(72, 32);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(131, 40);
this.button4.TabIndex = 3;
this.button4.Text = "开始连接";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// button5
//
this.button5.Location = new System.Drawing.Point(72, 187);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(131, 40);
this.button5.TabIndex = 4;
this.button5.Text = "请求数据";
this.button5.UseVisualStyleBackColor = true;
//
// button6
//
this.button6.Location = new System.Drawing.Point(336, 32);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(131, 40);
this.button6.TabIndex = 5;
this.button6.Text = "开始连接";
this.button6.UseVisualStyleBackColor = true;
this.button6.Click += new System.EventHandler(this.button6_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(555, 450);
this.Controls.Add(this.button6);
this.Controls.Add(this.button5);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
}
}

287
XWCX/XWCX/Form1.cs Normal file
View File

@ -0,0 +1,287 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net.Sockets;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
namespace XWCX
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//MEMS气象色谱仪IP
string _ip = "192.168.1.203";
//string _ip = "192.168.43.59";
//端口号
int _port = 11008;
//int _port = 8000;
//是否ping通
bool _ping = false;
Socket _client_XWCX;
//数据接收线程
Thread th_XWCX = null;
//开关量用于控制数据是否收发
bool _switch = true;
//判断是否进行下一次分析
int _switch_ret = 0;
int Flag = 0;
//断开连接
private void Dispose()
{
if (_client_XWCX.Connected)
{
_client_XWCX.Close();
_client_XWCX.Dispose();
}
if (th_XWCX.IsAlive)
{
th_XWCX.Abort();
th_XWCX = null;
}
}
/// <summary>
/// 数据接收线程
/// </summary>
public void ReceiveMessage_MEMS()
{
byte[] messageBytes = null;
int num = 0;
try
{
while (true)
{
messageBytes = new byte[_client_XWCX.ReceiveBufferSize];
num = _client_XWCX.Receive(messageBytes);
byte[] buffer = new byte[num];
for(int i=0;i<num;i++)
{
buffer[i] = messageBytes[i];
}
Console.WriteLine(BitConverter.ToString(buffer));
if (_switch && (buffer[0] == 0xA5 && buffer[1] == 0xB5))
ParsingData(buffer);
}
}
catch (Exception err)
{
Console.WriteLine(err.Message);
SendMsgSilent(err.Message);
}
}
private void ParsingData(byte[] byteArray)
{
if (byteArray.Length == 16)
{
if (PasswordEquals(byteArray, new byte[16] { 0xA5, 0xB5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF }))
{
Console.WriteLine("初始化成功");
}
else if (PasswordEquals(byteArray, new byte[16] { 0xA5, 0xB5, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF }))
{
Console.WriteLine("采集数据成功");
}
else if (PasswordEquals(new byte[] { byteArray[0], byteArray[1], byteArray[2], byteArray[3], byteArray[4], byteArray[5] }, new byte[] { 0xA5, 0xB5, 0x01, 0x00, 0x00, 0x00 }))
{
Console.WriteLine("初始化失败");
}
else if (PasswordEquals(new byte[] { byteArray[0], byteArray[1], byteArray[2], byteArray[3], byteArray[4], byteArray[5] }, new byte[] { 0xA5, 0xB5, 0x02, 0x00, 0x00, 0x00 }))
{
Console.WriteLine("采集数据失败");
}
}
else if (byteArray.Length == 36)
{
float tem1 = BitConverter.ToSingle(new byte[] { byteArray[2], byteArray[3], byteArray[4], byteArray[5] },0);
float tem2 = BitConverter.ToSingle(new byte[] { byteArray[6], byteArray[7], byteArray[8], byteArray[9] },0);
float tem3 = BitConverter.ToSingle(new byte[] { byteArray[10], byteArray[11], byteArray[12], byteArray[13] },0);
float him1 = BitConverter.ToSingle(new byte[] { byteArray[14], byteArray[15], byteArray[16], byteArray[17] },0);
float him2 = BitConverter.ToSingle(new byte[] {byteArray[18], byteArray[19], byteArray[20], byteArray[21] },0);
float pre = BitConverter.ToSingle(new byte[] { byteArray[22], byteArray[23], byteArray[24], byteArray[25] },0);
float ini = BitConverter.ToSingle(new byte[] { byteArray[26], byteArray[27], byteArray[28], byteArray[29] },0);
float err = BitConverter.ToSingle(new byte[] { byteArray[30], byteArray[31], byteArray[32], byteArray[33] },0);
Console.WriteLine("温度1" + tem1 + "\n温度2" + tem2 + "\n温度3" + tem3 + "\n湿度1" + him1 + "\n湿度2" + him2 + "\n气压" + pre + "\n初始化情况" + ini + "\n故障信息" + err);
}
}
private void button1_Click(object sender, EventArgs e)
{
SendMessage_MEMS(new byte[16] { 0xA5, 0xB5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF });
}
private void button2_Click(object sender, EventArgs e)
{
SendMessage_MEMS(new byte[16] { 0xA5, 0xB5, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF });
}
private void button3_Click(object sender, EventArgs e)
{
SendMessage_MEMS(new byte[16] { 0xA5, 0xB5, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF });
}
private void button4_Click(object sender, EventArgs e)
{
_client_XWCX = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
try
{
IPEndPoint point = new IPEndPoint(IPAddress.Parse(_ip), _port);
_client_XWCX.Connect(point);
th_XWCX = new Thread(ReceiveMessage_MEMS);
th_XWCX.IsBackground = true;
th_XWCX.Start();
}
catch (Exception)
{
Console.WriteLine("服务器没有开启" + "\r\n");
}
Console.WriteLine("已连接服务器" + "\r\n");
}
public void SendMessage_MEMS(byte[] messageBytes)
{
if (_client_XWCX.Connected)
{
try
{
_client_XWCX.Send(messageBytes);
}
catch (Exception)
{
}
}
//else
//{
// //如果设备断开 就尝试重新连接服务器
// if (Wait_con())
// {
// _client_XWCX.Send(messageBytes);
// }
// else
// {
// Dispose();
// }
//}
}
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;
}
Socket _client_Pic;
int _portPic = 11007;
private void button6_Click(object sender, EventArgs e)
{
_client_Pic = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
try
{
IPEndPoint point = new IPEndPoint(IPAddress.Parse(_ip), _portPic);
_client_Pic.Connect(point);
_client_Pic.Send(new byte[] { 0xA5, 0xB5, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF });
Thread.Sleep(1000);
Thread thPicture = new Thread(Picture);
thPicture.IsBackground = true;
thPicture.Start();
}
catch (Exception)
{
Console.WriteLine("服务器没有开启" + "\r\n");
}
}
private void Picture()
{
FileStream wrtr; //文件读写类
byte[] dataBuffer = new byte[40];
int rect = _client_Pic.Receive(dataBuffer, 0, 30, 0);
Console.WriteLine(BitConverter.ToString(dataBuffer));
int date = BitConverter.ToInt32(new byte[] { dataBuffer[6], dataBuffer[7], dataBuffer[8], dataBuffer[9] }, 0);
int time = BitConverter.ToInt32(new byte[] { dataBuffer[10], dataBuffer[11], dataBuffer[12], dataBuffer[13] }, 0);
int weight = BitConverter.ToInt32(new byte[] { dataBuffer[14], dataBuffer[15], dataBuffer[16], dataBuffer[17] }, 0);
int height = BitConverter.ToInt32(new byte[] { dataBuffer[18], dataBuffer[19], dataBuffer[20], dataBuffer[21] }, 0);
short form = dataBuffer[22];
short channel = dataBuffer[23];
string form1 = "";
if (form == 1)
{
form1 = ".jpg";
}
else if (form == 0)
{
form1 = ".bmp";
}
int size = BitConverter.ToInt32(new byte[] { dataBuffer[26], dataBuffer[27], dataBuffer[28], dataBuffer[29] }, 0); //16进制转成int型
int dataleft = size - 2;
dataBuffer = new byte[size - 2]; //创建byte组
//创建文件夹
Directory.CreateDirectory(Environment.CurrentDirectory + "/" + date);
Directory.CreateDirectory(Environment.CurrentDirectory + "/" + date + "/" + channel);
wrtr = new FileStream(Environment.CurrentDirectory + "\\" + date + "\\" + channel + "\\" + weight + "_" + height + "_" + time + form1, FileMode.Create); //创建新文件
int total = 0;
while (total < (size-2)) //当接收长度小于总长度时继续执行
{
rect = _client_Pic.Receive(dataBuffer, total, dataleft, 0); //接收字节流receive方法返回int获取已接收字节个数第一个参数是需要写入的字节组第二个参数是起始位置第三个参数是接收字节的长度
total += rect; //已接收个数-下一次从当前个数开始接收
dataleft -= rect; //剩下的字节长度
Console.WriteLine(dataleft);
}
wrtr.Write(dataBuffer, 0, dataBuffer.Length); //输出文件
wrtr.Flush(); //强制输出
wrtr.Close(); //关闭文件流对象
Console.WriteLine("文件已存储");
}
}
}

120
XWCX/XWCX/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
XWCX/XWCX/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 XWCX
{
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("XWCX")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("XWCX")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("d7b519c7-98c1-4f68-9124-df6c70b08249")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [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 XWCX.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("XWCX.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 XWCX.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>

83
XWCX/XWCX/XWCX.csproj Normal file
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>{D7B519C7-98C1-4F68-9124-DF6C70B08249}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>XWCX</RootNamespace>
<AssemblyName>XWCX</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.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

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,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\XWCX\XWCX\bin\Debug\XWCX.exe.config
F:\Code\huaxueshiyanshi\XWCX\XWCX\bin\Debug\XWCX.exe
F:\Code\huaxueshiyanshi\XWCX\XWCX\bin\Debug\XWCX.pdb
F:\Code\huaxueshiyanshi\XWCX\XWCX\obj\Debug\XWCX.csproj.AssemblyReference.cache
F:\Code\huaxueshiyanshi\XWCX\XWCX\obj\Debug\XWCX.csproj.SuggestedBindingRedirects.cache
F:\Code\huaxueshiyanshi\XWCX\XWCX\obj\Debug\XWCX.Form1.resources
F:\Code\huaxueshiyanshi\XWCX\XWCX\obj\Debug\XWCX.Properties.Resources.resources
F:\Code\huaxueshiyanshi\XWCX\XWCX\obj\Debug\XWCX.csproj.GenerateResource.cache
F:\Code\huaxueshiyanshi\XWCX\XWCX\obj\Debug\XWCX.csproj.CoreCompileInputs.cache
F:\Code\huaxueshiyanshi\XWCX\XWCX\obj\Debug\XWCX.exe
F:\Code\huaxueshiyanshi\XWCX\XWCX\obj\Debug\XWCX.pdb

Binary file not shown.

Binary file not shown.

Binary file not shown.