删除原先一些重复代码,使用了ClientsLibrary代码实现
This commit is contained in:
71
软件系统客户端模版/FormDownloading.Designer.cs
generated
71
软件系统客户端模版/FormDownloading.Designer.cs
generated
@@ -1,71 +0,0 @@
|
||||
namespace 软件系统客户端模版
|
||||
{
|
||||
partial class FormDownloading
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(56, 28);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(43, 17);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "label1";
|
||||
//
|
||||
// FormDownloading
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(300, 56);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FormDownloading";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "FormDownloading";
|
||||
this.Load += new System.EventHandler(this.FormDownloading_Load);
|
||||
this.Shown += new System.EventHandler(this.FormDownloading_Shown);
|
||||
this.Paint += new System.Windows.Forms.PaintEventHandler(this.FormDownloading_Paint);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using HslCommunication;
|
||||
|
||||
namespace 软件系统客户端模版
|
||||
{
|
||||
//=============================================================================
|
||||
//
|
||||
// 时间:2017-03-08 12:41:37
|
||||
// 用于下载数据的提示窗口
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
|
||||
|
||||
|
||||
public partial class FormDownloading : Form
|
||||
{
|
||||
public FormDownloading(int customer,Action<OperateResultString> action)
|
||||
{
|
||||
InitializeComponent();
|
||||
net_cmd = customer;
|
||||
DealWithResult = action;
|
||||
DoubleBuffered = true;
|
||||
}
|
||||
|
||||
|
||||
private void FormDownloading_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
//绘制显示
|
||||
|
||||
e.Graphics.DrawLines(pen_dash, new Point[]
|
||||
{
|
||||
new Point(44,44),
|
||||
new Point(14,44),
|
||||
new Point(14,14),
|
||||
new Point(44,14),
|
||||
new Point(44,44),
|
||||
});
|
||||
|
||||
//画边框
|
||||
e.Graphics.DrawRectangle(Pens.LightGray, new Rectangle(0, 0, Width - 1, Height - 1));
|
||||
}
|
||||
|
||||
Pen pen_dash = new Pen(Color.Green);
|
||||
float Pen_Offect = 0;
|
||||
|
||||
private void FormDownloading_Load(object sender, EventArgs e)
|
||||
{
|
||||
pen_dash.DashStyle = System.Drawing.Drawing2D.DashStyle.Custom;
|
||||
pen_dash.DashPattern = new float[] { 5, 5 };
|
||||
pen_dash.DashOffset = 0;
|
||||
|
||||
time.Interval = 38;//2017-03-08 13:20:33
|
||||
time.Tick += Time_Tick;
|
||||
|
||||
label1.Text = "正在请求数据...";
|
||||
}
|
||||
|
||||
private void Time_Tick(object sender, EventArgs e)
|
||||
{
|
||||
Pen_Offect--;
|
||||
if (Pen_Offect < -5) Pen_Offect = 4;
|
||||
pen_dash.DashOffset = Pen_Offect;
|
||||
Invalidate();//引发重画
|
||||
}
|
||||
|
||||
|
||||
//定时块
|
||||
private Timer time = new Timer();
|
||||
|
||||
private void FormDownloading_Shown(object sender, EventArgs e)
|
||||
{
|
||||
time.Start();
|
||||
System.Threading.Thread thread = new System.Threading.Thread(ThreadRequestServer);
|
||||
thread.IsBackground = true;
|
||||
thread.Start();
|
||||
}
|
||||
|
||||
|
||||
private int net_cmd = 0;
|
||||
private Action<OperateResultString> DealWithResult = null;
|
||||
|
||||
private void ThreadRequestServer()
|
||||
{
|
||||
//后台请求数据
|
||||
System.Threading.Thread.Sleep(100);
|
||||
OperateResultString result = UserClient.Net_simplify_client.ReadFromServer(net_cmd);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
DealWithResult(result);
|
||||
time.Stop();
|
||||
System.Threading.Thread.Sleep(20);
|
||||
Dispose();
|
||||
}));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?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=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>
|
||||
483
软件系统客户端模版/FormLog.Designer.cs
generated
483
软件系统客户端模版/FormLog.Designer.cs
generated
@@ -1,483 +0,0 @@
|
||||
using HslCommunication.Controls;
|
||||
|
||||
namespace 软件系统客户端模版
|
||||
{
|
||||
partial class FormLog
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.userButton_login = new HslCommunication.Controls.UserButton();
|
||||
this.userButton1 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton2 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton3 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton4 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton5 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton6 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton7 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton_log1 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton_log2 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton_log3 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton_log4 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton_log = new HslCommunication.Controls.UserButton();
|
||||
this.userButton8 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton9 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton10 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton11 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton12 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton13 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton14 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton15 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton16 = new HslCommunication.Controls.UserButton();
|
||||
this.userButton17 = new HslCommunication.Controls.UserButton();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox1.Location = new System.Drawing.Point(12, 12);
|
||||
this.textBox1.Multiline = true;
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.textBox1.Size = new System.Drawing.Size(608, 498);
|
||||
this.textBox1.TabIndex = 0;
|
||||
//
|
||||
// userButton_login
|
||||
//
|
||||
this.userButton_login.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton_login.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton_login.CustomerInformation = "";
|
||||
this.userButton_login.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton_login.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton_login.Location = new System.Drawing.Point(626, 13);
|
||||
this.userButton_login.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton_login.Name = "userButton_login";
|
||||
this.userButton_login.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton_login.TabIndex = 6;
|
||||
this.userButton_login.UIText = "网络日志查看";
|
||||
this.userButton_login.Click += new System.EventHandler(this.userButton_login_Click);
|
||||
//
|
||||
// userButton1
|
||||
//
|
||||
this.userButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton1.CustomerInformation = "";
|
||||
this.userButton1.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton1.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton1.Location = new System.Drawing.Point(736, 13);
|
||||
this.userButton1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton1.Name = "userButton1";
|
||||
this.userButton1.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton1.TabIndex = 7;
|
||||
this.userButton1.UIText = "网络日志清空";
|
||||
this.userButton1.Click += new System.EventHandler(this.userButton1_Click);
|
||||
//
|
||||
// userButton2
|
||||
//
|
||||
this.userButton2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton2.CustomerInformation = "";
|
||||
this.userButton2.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton2.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton2.Location = new System.Drawing.Point(626, 62);
|
||||
this.userButton2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton2.Name = "userButton2";
|
||||
this.userButton2.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton2.TabIndex = 8;
|
||||
this.userButton2.UIText = "同步日志查看";
|
||||
this.userButton2.Click += new System.EventHandler(this.userButton2_Click);
|
||||
//
|
||||
// userButton3
|
||||
//
|
||||
this.userButton3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton3.CustomerInformation = "";
|
||||
this.userButton3.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton3.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton3.Location = new System.Drawing.Point(736, 62);
|
||||
this.userButton3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton3.Name = "userButton3";
|
||||
this.userButton3.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton3.TabIndex = 9;
|
||||
this.userButton3.UIText = "同步日志清空";
|
||||
this.userButton3.Click += new System.EventHandler(this.userButton3_Click);
|
||||
//
|
||||
// userButton4
|
||||
//
|
||||
this.userButton4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton4.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton4.CustomerInformation = "";
|
||||
this.userButton4.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton4.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton4.Location = new System.Drawing.Point(626, 111);
|
||||
this.userButton4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton4.Name = "userButton4";
|
||||
this.userButton4.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton4.TabIndex = 10;
|
||||
this.userButton4.UIText = "更新日志查看";
|
||||
this.userButton4.Click += new System.EventHandler(this.userButton4_Click);
|
||||
//
|
||||
// userButton5
|
||||
//
|
||||
this.userButton5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton5.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton5.CustomerInformation = "";
|
||||
this.userButton5.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton5.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton5.Location = new System.Drawing.Point(736, 111);
|
||||
this.userButton5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton5.Name = "userButton5";
|
||||
this.userButton5.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton5.TabIndex = 11;
|
||||
this.userButton5.UIText = "更新日志清空";
|
||||
this.userButton5.Click += new System.EventHandler(this.userButton5_Click);
|
||||
//
|
||||
// userButton6
|
||||
//
|
||||
this.userButton6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton6.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton6.CustomerInformation = "";
|
||||
this.userButton6.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton6.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton6.Location = new System.Drawing.Point(736, 517);
|
||||
this.userButton6.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton6.Name = "userButton6";
|
||||
this.userButton6.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton6.TabIndex = 13;
|
||||
this.userButton6.UIText = "运行日志清空";
|
||||
this.userButton6.Click += new System.EventHandler(this.userButton6_Click);
|
||||
//
|
||||
// userButton7
|
||||
//
|
||||
this.userButton7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton7.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton7.CustomerInformation = "";
|
||||
this.userButton7.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton7.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton7.Location = new System.Drawing.Point(626, 517);
|
||||
this.userButton7.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton7.Name = "userButton7";
|
||||
this.userButton7.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton7.TabIndex = 12;
|
||||
this.userButton7.UIText = "运行日志查看";
|
||||
this.userButton7.Click += new System.EventHandler(this.userButton7_Click);
|
||||
//
|
||||
// userButton_log1
|
||||
//
|
||||
this.userButton_log1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.userButton_log1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton_log1.CustomerInformation = "";
|
||||
this.userButton_log1.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton_log1.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton_log1.Location = new System.Drawing.Point(12, 517);
|
||||
this.userButton_log1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton_log1.Name = "userButton_log1";
|
||||
this.userButton_log1.Size = new System.Drawing.Size(63, 26);
|
||||
this.userButton_log1.TabIndex = 14;
|
||||
this.userButton_log1.UIText = "普通";
|
||||
this.userButton_log1.Click += new System.EventHandler(this.userButton_log1_Click);
|
||||
//
|
||||
// userButton_log2
|
||||
//
|
||||
this.userButton_log2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.userButton_log2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton_log2.CustomerInformation = "";
|
||||
this.userButton_log2.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton_log2.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton_log2.Location = new System.Drawing.Point(81, 517);
|
||||
this.userButton_log2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton_log2.Name = "userButton_log2";
|
||||
this.userButton_log2.Size = new System.Drawing.Size(63, 26);
|
||||
this.userButton_log2.TabIndex = 15;
|
||||
this.userButton_log2.UIText = "信息";
|
||||
this.userButton_log2.Click += new System.EventHandler(this.userButton_log2_Click);
|
||||
//
|
||||
// userButton_log3
|
||||
//
|
||||
this.userButton_log3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.userButton_log3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton_log3.CustomerInformation = "";
|
||||
this.userButton_log3.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton_log3.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton_log3.Location = new System.Drawing.Point(150, 517);
|
||||
this.userButton_log3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton_log3.Name = "userButton_log3";
|
||||
this.userButton_log3.Size = new System.Drawing.Size(63, 26);
|
||||
this.userButton_log3.TabIndex = 16;
|
||||
this.userButton_log3.UIText = "警告";
|
||||
this.userButton_log3.Click += new System.EventHandler(this.userButton_log3_Click);
|
||||
//
|
||||
// userButton_log4
|
||||
//
|
||||
this.userButton_log4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.userButton_log4.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton_log4.CustomerInformation = "";
|
||||
this.userButton_log4.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton_log4.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton_log4.Location = new System.Drawing.Point(219, 517);
|
||||
this.userButton_log4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton_log4.Name = "userButton_log4";
|
||||
this.userButton_log4.Size = new System.Drawing.Size(63, 26);
|
||||
this.userButton_log4.TabIndex = 17;
|
||||
this.userButton_log4.UIText = "错误";
|
||||
this.userButton_log4.Click += new System.EventHandler(this.userButton_log4_Click);
|
||||
//
|
||||
// userButton_log
|
||||
//
|
||||
this.userButton_log.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.userButton_log.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton_log.CustomerInformation = "";
|
||||
this.userButton_log.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton_log.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton_log.Location = new System.Drawing.Point(288, 517);
|
||||
this.userButton_log.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton_log.Name = "userButton_log";
|
||||
this.userButton_log.Size = new System.Drawing.Size(63, 26);
|
||||
this.userButton_log.TabIndex = 18;
|
||||
this.userButton_log.UIText = "全部";
|
||||
this.userButton_log.Click += new System.EventHandler(this.userButton_log_Click);
|
||||
//
|
||||
// userButton8
|
||||
//
|
||||
this.userButton8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton8.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton8.CustomerInformation = "";
|
||||
this.userButton8.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton8.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton8.Location = new System.Drawing.Point(736, 159);
|
||||
this.userButton8.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton8.Name = "userButton8";
|
||||
this.userButton8.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton8.TabIndex = 20;
|
||||
this.userButton8.UIText = "共享文件日志清空";
|
||||
this.userButton8.Click += new System.EventHandler(this.userButton8_Click);
|
||||
//
|
||||
// userButton9
|
||||
//
|
||||
this.userButton9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton9.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton9.CustomerInformation = "";
|
||||
this.userButton9.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton9.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton9.Location = new System.Drawing.Point(626, 159);
|
||||
this.userButton9.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton9.Name = "userButton9";
|
||||
this.userButton9.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton9.TabIndex = 19;
|
||||
this.userButton9.UIText = "共享文件日志查看";
|
||||
this.userButton9.Click += new System.EventHandler(this.userButton9_Click);
|
||||
//
|
||||
// userButton10
|
||||
//
|
||||
this.userButton10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton10.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton10.CustomerInformation = "";
|
||||
this.userButton10.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton10.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton10.Location = new System.Drawing.Point(734, 208);
|
||||
this.userButton10.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton10.Name = "userButton10";
|
||||
this.userButton10.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton10.TabIndex = 22;
|
||||
this.userButton10.UIText = "建议反馈清空";
|
||||
this.userButton10.Click += new System.EventHandler(this.userButton10_Click);
|
||||
//
|
||||
// userButton11
|
||||
//
|
||||
this.userButton11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton11.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton11.CustomerInformation = "";
|
||||
this.userButton11.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton11.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton11.Location = new System.Drawing.Point(626, 208);
|
||||
this.userButton11.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton11.Name = "userButton11";
|
||||
this.userButton11.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton11.TabIndex = 21;
|
||||
this.userButton11.UIText = "建议反馈查看";
|
||||
this.userButton11.Click += new System.EventHandler(this.userButton11_Click);
|
||||
//
|
||||
// userButton12
|
||||
//
|
||||
this.userButton12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton12.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton12.CustomerInformation = "";
|
||||
this.userButton12.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton12.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton12.Location = new System.Drawing.Point(734, 255);
|
||||
this.userButton12.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton12.Name = "userButton12";
|
||||
this.userButton12.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton12.TabIndex = 24;
|
||||
this.userButton12.UIText = "Udp日志清空";
|
||||
this.userButton12.Click += new System.EventHandler(this.userButton12_Click);
|
||||
//
|
||||
// userButton13
|
||||
//
|
||||
this.userButton13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton13.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton13.CustomerInformation = "";
|
||||
this.userButton13.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton13.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton13.Location = new System.Drawing.Point(626, 255);
|
||||
this.userButton13.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton13.Name = "userButton13";
|
||||
this.userButton13.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton13.TabIndex = 23;
|
||||
this.userButton13.UIText = "Udp日志查看";
|
||||
this.userButton13.Click += new System.EventHandler(this.userButton13_Click);
|
||||
//
|
||||
// userButton14
|
||||
//
|
||||
this.userButton14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton14.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton14.CustomerInformation = "";
|
||||
this.userButton14.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton14.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton14.Location = new System.Drawing.Point(626, 300);
|
||||
this.userButton14.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton14.Name = "userButton14";
|
||||
this.userButton14.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton14.TabIndex = 25;
|
||||
this.userButton14.UIText = "客户端日志查看";
|
||||
this.userButton14.Click += new System.EventHandler(this.userButton14_Click);
|
||||
//
|
||||
// userButton15
|
||||
//
|
||||
this.userButton15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton15.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton15.CustomerInformation = "";
|
||||
this.userButton15.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton15.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton15.Location = new System.Drawing.Point(734, 300);
|
||||
this.userButton15.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton15.Name = "userButton15";
|
||||
this.userButton15.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton15.TabIndex = 26;
|
||||
this.userButton15.UIText = "客户端日志清空";
|
||||
this.userButton15.Click += new System.EventHandler(this.userButton15_Click);
|
||||
//
|
||||
// userButton16
|
||||
//
|
||||
this.userButton16.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton16.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton16.CustomerInformation = "";
|
||||
this.userButton16.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton16.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton16.Location = new System.Drawing.Point(734, 344);
|
||||
this.userButton16.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton16.Name = "userButton16";
|
||||
this.userButton16.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton16.TabIndex = 28;
|
||||
this.userButton16.UIText = "头像日志清空";
|
||||
this.userButton16.Click += new System.EventHandler(this.userButton16_Click);
|
||||
//
|
||||
// userButton17
|
||||
//
|
||||
this.userButton17.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.userButton17.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton17.CustomerInformation = "";
|
||||
this.userButton17.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton17.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton17.Location = new System.Drawing.Point(626, 344);
|
||||
this.userButton17.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.userButton17.Name = "userButton17";
|
||||
this.userButton17.Size = new System.Drawing.Size(103, 26);
|
||||
this.userButton17.TabIndex = 27;
|
||||
this.userButton17.UIText = "头像日志查看";
|
||||
this.userButton17.Click += new System.EventHandler(this.userButton17_Click);
|
||||
//
|
||||
// FormLog
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(849, 547);
|
||||
this.Controls.Add(this.userButton16);
|
||||
this.Controls.Add(this.userButton17);
|
||||
this.Controls.Add(this.userButton15);
|
||||
this.Controls.Add(this.userButton14);
|
||||
this.Controls.Add(this.userButton12);
|
||||
this.Controls.Add(this.userButton13);
|
||||
this.Controls.Add(this.userButton10);
|
||||
this.Controls.Add(this.userButton11);
|
||||
this.Controls.Add(this.userButton8);
|
||||
this.Controls.Add(this.userButton9);
|
||||
this.Controls.Add(this.userButton_log);
|
||||
this.Controls.Add(this.userButton_log4);
|
||||
this.Controls.Add(this.userButton_log3);
|
||||
this.Controls.Add(this.userButton_log2);
|
||||
this.Controls.Add(this.userButton_log1);
|
||||
this.Controls.Add(this.userButton6);
|
||||
this.Controls.Add(this.userButton7);
|
||||
this.Controls.Add(this.userButton5);
|
||||
this.Controls.Add(this.userButton4);
|
||||
this.Controls.Add(this.userButton3);
|
||||
this.Controls.Add(this.userButton2);
|
||||
this.Controls.Add(this.userButton1);
|
||||
this.Controls.Add(this.userButton_login);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.Name = "FormLog";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "网络日志查看";
|
||||
this.Load += new System.EventHandler(this.FormLog_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private UserButton userButton_login;
|
||||
private UserButton userButton1;
|
||||
private UserButton userButton2;
|
||||
private UserButton userButton3;
|
||||
private UserButton userButton4;
|
||||
private UserButton userButton5;
|
||||
private UserButton userButton6;
|
||||
private UserButton userButton7;
|
||||
private UserButton userButton_log1;
|
||||
private UserButton userButton_log2;
|
||||
private UserButton userButton_log3;
|
||||
private UserButton userButton_log4;
|
||||
private UserButton userButton_log;
|
||||
private UserButton userButton8;
|
||||
private UserButton userButton9;
|
||||
private UserButton userButton10;
|
||||
private UserButton userButton11;
|
||||
private UserButton userButton12;
|
||||
private UserButton userButton13;
|
||||
private UserButton userButton14;
|
||||
private UserButton userButton15;
|
||||
private UserButton userButton16;
|
||||
private UserButton userButton17;
|
||||
}
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using CommonLibrary;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using HslCommunication;
|
||||
using HslCommunication.Enthernet;
|
||||
|
||||
|
||||
namespace 软件系统客户端模版
|
||||
{
|
||||
public partial class FormLog : Form
|
||||
{
|
||||
public FormLog()
|
||||
{
|
||||
InitializeComponent();
|
||||
net_simplify_client = UserClient.Net_simplify_client;
|
||||
}
|
||||
|
||||
private Net_Simplify_Client net_simplify_client = null;
|
||||
|
||||
private void FormLog_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ReadFromServer(int head_code)
|
||||
{
|
||||
OperateResultString result = net_simplify_client.ReadFromServer(head_code);
|
||||
if (result.IsSuccess)
|
||||
{
|
||||
textBox1.Text = result.Content;
|
||||
LogTemp = result.Content;
|
||||
}
|
||||
else textBox1.Text = result.ToMessageShowString();
|
||||
}
|
||||
private void ClearFromServer(int head_code)
|
||||
{
|
||||
OperateResultString result = net_simplify_client.ReadFromServer(head_code);
|
||||
if (result.IsSuccess) textBox1.Text = "清除成功";
|
||||
else textBox1.Text = result.ToMessageShowString();
|
||||
}
|
||||
|
||||
private void userButton_login_Click(object sender, EventArgs e)
|
||||
{
|
||||
ReadFromServer(CommonHeadCode.SimplifyHeadCode.网络日志查看);
|
||||
}
|
||||
|
||||
private void userButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearFromServer(CommonHeadCode.SimplifyHeadCode.网络日志清空);
|
||||
}
|
||||
|
||||
private void userButton2_Click(object sender, EventArgs e)
|
||||
{
|
||||
ReadFromServer(CommonHeadCode.SimplifyHeadCode.同步日志查看);
|
||||
}
|
||||
|
||||
private void userButton3_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearFromServer(CommonHeadCode.SimplifyHeadCode.同步日志清空);
|
||||
}
|
||||
|
||||
private void userButton4_Click(object sender, EventArgs e)
|
||||
{
|
||||
ReadFromServer(CommonHeadCode.SimplifyHeadCode.更新日志查看);
|
||||
}
|
||||
|
||||
private void userButton5_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearFromServer(CommonHeadCode.SimplifyHeadCode.更新日志清空);
|
||||
}
|
||||
|
||||
private void userButton7_Click(object sender, EventArgs e)
|
||||
{
|
||||
ReadFromServer(CommonHeadCode.SimplifyHeadCode.运行日志查看);
|
||||
}
|
||||
|
||||
private void userButton6_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearFromServer(CommonHeadCode.SimplifyHeadCode.运行日志清空);
|
||||
}
|
||||
private void userButton9_Click(object sender, EventArgs e)
|
||||
{
|
||||
ReadFromServer(CommonHeadCode.SimplifyHeadCode.文件日志查看);
|
||||
}
|
||||
|
||||
private void userButton8_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearFromServer(CommonHeadCode.SimplifyHeadCode.文件日志清空);
|
||||
}
|
||||
|
||||
private void userButton11_Click(object sender, EventArgs e)
|
||||
{
|
||||
ReadFromServer(CommonHeadCode.SimplifyHeadCode.反馈日志查看);
|
||||
}
|
||||
|
||||
private void userButton10_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearFromServer(CommonHeadCode.SimplifyHeadCode.反馈日志清空);
|
||||
}
|
||||
private void userButton13_Click(object sender, EventArgs e)
|
||||
{
|
||||
ReadFromServer(CommonHeadCode.SimplifyHeadCode.UDP日志查看);
|
||||
}
|
||||
|
||||
private void userButton12_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearFromServer(CommonHeadCode.SimplifyHeadCode.UDP日志清空);
|
||||
}
|
||||
|
||||
|
||||
private void userButton14_Click(object sender, EventArgs e)
|
||||
{
|
||||
ReadFromServer(CommonHeadCode.SimplifyHeadCode.客户端日志查看);
|
||||
}
|
||||
|
||||
private void userButton15_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearFromServer(CommonHeadCode.SimplifyHeadCode.客户端日志清空);
|
||||
}
|
||||
private void userButton17_Click(object sender, EventArgs e)
|
||||
{
|
||||
ReadFromServer(CommonHeadCode.SimplifyHeadCode.头像日志查看);
|
||||
}
|
||||
|
||||
private void userButton16_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearFromServer(CommonHeadCode.SimplifyHeadCode.头像日志清空);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询日志的缓存
|
||||
/// </summary>
|
||||
private string LogTemp = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 筛选出符合需求的日志
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
/// <returns></returns>
|
||||
private string FilterString(string filter)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
MatchCollection mc = Regex.Matches(LogTemp, @"\u0002\[" + filter + @"[^\u0002]+");
|
||||
foreach (Match m in mc)
|
||||
{
|
||||
sb.Append(m.Value);
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private void userButton_log1_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBox1.Text = FilterString(HslCommunication.BasicFramework.SoftLogHelper.Normal);
|
||||
}
|
||||
|
||||
private void userButton_log2_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBox1.Text = FilterString(HslCommunication.BasicFramework.SoftLogHelper.Information);
|
||||
}
|
||||
|
||||
private void userButton_log3_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBox1.Text = FilterString(HslCommunication.BasicFramework.SoftLogHelper.Warnning);
|
||||
}
|
||||
|
||||
private void userButton_log4_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBox1.Text = FilterString(HslCommunication.BasicFramework.SoftLogHelper.Error);
|
||||
}
|
||||
|
||||
private void userButton_log_Click(object sender, EventArgs e)
|
||||
{
|
||||
textBox1.Text = LogTemp;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?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=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>
|
||||
@@ -11,6 +11,7 @@ using Newtonsoft.Json.Linq;
|
||||
using HslCommunication;
|
||||
using CommonLibrary;
|
||||
using HslCommunication.BasicFramework;
|
||||
using ClientsLibrary;
|
||||
|
||||
namespace 软件系统客户端模版
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@ using System.Threading;
|
||||
using HslCommunication;
|
||||
using HslCommunication.Enthernet;
|
||||
using HslCommunication.BasicFramework;
|
||||
using ClientsLibrary;
|
||||
|
||||
|
||||
/***************************************************************************************
|
||||
|
||||
210
软件系统客户端模版/FormRegisterAccount.Designer.cs
generated
210
软件系统客户端模版/FormRegisterAccount.Designer.cs
generated
@@ -1,210 +0,0 @@
|
||||
using HslCommunication.Controls;
|
||||
|
||||
namespace 软件系统客户端模版
|
||||
{
|
||||
partial class FormRegisterAccount
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.textBox4 = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.userButton_login = new UserButton();
|
||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||
this.comboBox2 = new System.Windows.Forms.ComboBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(21, 18);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(56, 17);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "用户名:";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(98, 15);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(232, 23);
|
||||
this.textBox1.TabIndex = 1;
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Location = new System.Drawing.Point(98, 51);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.Size = new System.Drawing.Size(232, 23);
|
||||
this.textBox2.TabIndex = 3;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(21, 54);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(44, 17);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "密码:";
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
this.textBox3.Location = new System.Drawing.Point(98, 87);
|
||||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.Size = new System.Drawing.Size(232, 23);
|
||||
this.textBox3.TabIndex = 5;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(21, 90);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(44, 17);
|
||||
this.label3.TabIndex = 4;
|
||||
this.label3.Text = "工厂:";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(21, 125);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(44, 17);
|
||||
this.label4.TabIndex = 6;
|
||||
this.label4.Text = "权限:";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(21, 161);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(68, 17);
|
||||
this.label5.TabIndex = 8;
|
||||
this.label5.Text = "能否登录:";
|
||||
//
|
||||
// textBox4
|
||||
//
|
||||
this.textBox4.Location = new System.Drawing.Point(98, 192);
|
||||
this.textBox4.Name = "textBox4";
|
||||
this.textBox4.Size = new System.Drawing.Size(232, 23);
|
||||
this.textBox4.TabIndex = 11;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(21, 195);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(68, 17);
|
||||
this.label6.TabIndex = 10;
|
||||
this.label6.Text = "禁止原因:";
|
||||
//
|
||||
// userButton_login
|
||||
//
|
||||
this.userButton_login.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton_login.CustomerInformation = "";
|
||||
this.userButton_login.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton_login.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton_login.Location = new System.Drawing.Point(149, 279);
|
||||
this.userButton_login.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
|
||||
this.userButton_login.Name = "userButton_login";
|
||||
this.userButton_login.Size = new System.Drawing.Size(97, 31);
|
||||
this.userButton_login.TabIndex = 12;
|
||||
this.userButton_login.UIText = "注册";
|
||||
this.userButton_login.Click += new System.EventHandler(this.userButton_login_Click);
|
||||
//
|
||||
// comboBox1
|
||||
//
|
||||
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
this.comboBox1.Location = new System.Drawing.Point(98, 122);
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.Size = new System.Drawing.Size(232, 25);
|
||||
this.comboBox1.TabIndex = 13;
|
||||
//
|
||||
// comboBox2
|
||||
//
|
||||
this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBox2.FormattingEnabled = true;
|
||||
this.comboBox2.Location = new System.Drawing.Point(98, 157);
|
||||
this.comboBox2.Name = "comboBox2";
|
||||
this.comboBox2.Size = new System.Drawing.Size(232, 25);
|
||||
this.comboBox2.TabIndex = 14;
|
||||
//
|
||||
// FormRegisterAccount
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(382, 342);
|
||||
this.Controls.Add(this.comboBox2);
|
||||
this.Controls.Add(this.comboBox1);
|
||||
this.Controls.Add(this.userButton_login);
|
||||
this.Controls.Add(this.textBox4);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.textBox3);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.textBox2);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "FormRegisterAccount";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "注册新账户";
|
||||
this.Load += new System.EventHandler(this.FormRegisterAccount_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.TextBox textBox2;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox3;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox textBox4;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private UserButton userButton_login;
|
||||
private System.Windows.Forms.ComboBox comboBox1;
|
||||
private System.Windows.Forms.ComboBox comboBox2;
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using HslCommunication.Enthernet;
|
||||
using HslCommunication;
|
||||
using CommonLibrary;
|
||||
|
||||
namespace 软件系统客户端模版
|
||||
{
|
||||
public partial class FormRegisterAccount : Form
|
||||
{
|
||||
public FormRegisterAccount()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
net_client = UserClient.Net_simplify_client;
|
||||
}
|
||||
|
||||
private void FormRegisterAccount_Load(object sender, EventArgs e)
|
||||
{
|
||||
comboBox1.DataSource = AccountGrade.GetDescription();
|
||||
comboBox2.DataSource = new string[] { "允许", "不允许" };
|
||||
|
||||
comboBox1.SelectedItem = AccountGrade.GetDescription(AccountGrade.Technology);
|
||||
comboBox2.SelectedItem = "允许";
|
||||
|
||||
textBox4.Text = (new UserAccount()).ForbidMessage;
|
||||
}
|
||||
|
||||
private Net_Simplify_Client net_client = null;
|
||||
|
||||
private void userButton_login_Click(object sender, EventArgs e)
|
||||
{
|
||||
//点击了注册,先获取数据
|
||||
UserAccount account = new UserAccount();
|
||||
account.UserName = textBox1.Text;
|
||||
account.Password = textBox2.Text;
|
||||
account.Factory = textBox3.Text;
|
||||
switch (comboBox1.SelectedIndex)
|
||||
{
|
||||
case 0: account.Grade = AccountGrade.SuperAdministrator; break;
|
||||
case 1: account.Grade = AccountGrade.Admin; break;
|
||||
case 2: account.Grade = AccountGrade.Technology; break;
|
||||
default: account.Grade = AccountGrade.General; break;
|
||||
}
|
||||
account.LoginEnable = comboBox2.SelectedItem.ToString() == "允许";
|
||||
account.ForbidMessage = textBox4.Text;
|
||||
|
||||
OperateResultString result = net_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode.注册账号, account.ToJsonString());
|
||||
if (result.IsSuccess && result.Content == "1")
|
||||
{
|
||||
MessageBox.Show("注册成功!");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("注册失败!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?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=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>
|
||||
126
软件系统客户端模版/FormUpdateRemote.Designer.cs
generated
126
软件系统客户端模版/FormUpdateRemote.Designer.cs
generated
@@ -1,126 +0,0 @@
|
||||
using HslCommunication.Controls;
|
||||
|
||||
namespace 软件系统客户端模版
|
||||
{
|
||||
partial class FormUpdateRemote
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.userButton_file = new UserButton();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.userButton_version = new UserButton();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label1.Location = new System.Drawing.Point(24, 22);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(188, 17);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "第一步:更新所有新版本的文件。";
|
||||
//
|
||||
// userButton_file
|
||||
//
|
||||
this.userButton_file.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton_file.CustomerInformation = "";
|
||||
this.userButton_file.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton_file.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton_file.Location = new System.Drawing.Point(216, 62);
|
||||
this.userButton_file.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
|
||||
this.userButton_file.Name = "userButton_file";
|
||||
this.userButton_file.Size = new System.Drawing.Size(94, 37);
|
||||
this.userButton_file.TabIndex = 13;
|
||||
this.userButton_file.UIText = "选择文件";
|
||||
this.userButton_file.Click += new System.EventHandler(this.userButton_file_Click);
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(141, 181);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(245, 23);
|
||||
this.textBox1.TabIndex = 14;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label2.Location = new System.Drawing.Point(24, 132);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(176, 17);
|
||||
this.label2.TabIndex = 15;
|
||||
this.label2.Text = "第二步:更新服务器的版本号。";
|
||||
//
|
||||
// userButton_version
|
||||
//
|
||||
this.userButton_version.BackColor = System.Drawing.Color.Transparent;
|
||||
this.userButton_version.CustomerInformation = "";
|
||||
this.userButton_version.EnableColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(190)))), ((int)(((byte)(190)))));
|
||||
this.userButton_version.Font = new System.Drawing.Font("微软雅黑", 9F);
|
||||
this.userButton_version.Location = new System.Drawing.Point(216, 236);
|
||||
this.userButton_version.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
|
||||
this.userButton_version.Name = "userButton_version";
|
||||
this.userButton_version.Size = new System.Drawing.Size(94, 37);
|
||||
this.userButton_version.TabIndex = 16;
|
||||
this.userButton_version.UIText = "提交版本号";
|
||||
this.userButton_version.Click += new System.EventHandler(this.userButton_version_Click);
|
||||
//
|
||||
// FormUpdateRemote
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(569, 311);
|
||||
this.Controls.Add(this.userButton_version);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.userButton_file);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
this.MaximumSize = new System.Drawing.Size(585, 350);
|
||||
this.MinimumSize = new System.Drawing.Size(585, 350);
|
||||
this.Name = "FormUpdateRemote";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "远程更新客户端";
|
||||
this.Load += new System.EventHandler(this.FormUpdateRemote_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private UserButton userButton_file;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private UserButton userButton_version;
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using HslCommunication;
|
||||
using HslCommunication.Enthernet;
|
||||
using CommonLibrary;
|
||||
|
||||
namespace 软件系统客户端模版
|
||||
{
|
||||
|
||||
//=====================================================================================
|
||||
//
|
||||
// 用途: 本窗口用于实现对本系统的客户端进行全面的远程更新的操作。
|
||||
// 第一步: 先将新版本的所有客户端传送到服务器端进行覆盖。
|
||||
// 第二步: 再将版本号传送到服务器进行更新,这样所有的客户端登录后就会自动更新新的版本了
|
||||
//
|
||||
//=====================================================================================
|
||||
|
||||
|
||||
public partial class FormUpdateRemote : Form
|
||||
{
|
||||
public FormUpdateRemote()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void userButton_file_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (OpenFileDialog ofd = new OpenFileDialog())
|
||||
{
|
||||
ofd.Multiselect = true;
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
using (FormFileOperate fUpload = new FormFileOperate(CommonHeadCode.KeyToken, new System.Net.IPEndPoint(
|
||||
System.Net.IPAddress.Parse(UserClient.ServerIp), CommonLibrary.CommonLibrary.Port_Update_Remote),
|
||||
ofd.FileNames, "", "", ""))
|
||||
{
|
||||
fUpload.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void userButton_version_Click(object sender, EventArgs e)
|
||||
{
|
||||
OperateResultString result = UserClient.Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode.更新版本, textBox1.Text);
|
||||
if (result.IsSuccess && result.Content == "1")
|
||||
{
|
||||
MessageBox.Show("更新成功!");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("更新失败!原因:" + result.ToMessageShowString());
|
||||
}
|
||||
}
|
||||
|
||||
private void FormUpdateRemote_Load(object sender, EventArgs e)
|
||||
{
|
||||
textBox1.Text = UserClient.CurrentVersion.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?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=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>
|
||||
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
namespace 软件系统客户端模版
|
||||
{
|
||||
static class Program
|
||||
@@ -20,7 +21,7 @@ namespace 软件系统客户端模版
|
||||
static void Main()
|
||||
{
|
||||
//捕获未处理的异常
|
||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
||||
AppDomain.CurrentDomain.UnhandledException += ClientsLibrary.UserClient.CurrentDomain_UnhandledException;
|
||||
//=====================================================================
|
||||
//为了强制只启动一个应用程序的实例
|
||||
|
||||
@@ -65,19 +66,7 @@ namespace 软件系统客户端模版
|
||||
}
|
||||
}
|
||||
|
||||
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
if(e.ExceptionObject is Exception ex)
|
||||
{
|
||||
//使用UDP方法传送会服务器
|
||||
string info = $"{Environment.NewLine}信息:{ex.Message}" +
|
||||
$"{Environment.NewLine}类型:{ex.GetType().ToString()}" +
|
||||
$"{Environment.NewLine}堆栈:{ex.StackTrace}" +
|
||||
$"{Environment.NewLine}方法:{ex.TargetSite.Name}" +
|
||||
$"{Environment.NewLine}" + "=".PadLeft(50, '=');
|
||||
UserClient.Net_simplify_client.ReadFromServer(CommonLibrary.CommonHeadCode.SimplifyHeadCode.异常消息, info);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[DllImport("User32.dll")]
|
||||
private static extern bool ShowWindowAsync(IntPtr hWnd, int cmdShow);
|
||||
|
||||
@@ -10,6 +10,7 @@ using Newtonsoft.Json.Linq;
|
||||
using HslCommunication.Enthernet;
|
||||
using HslCommunication;
|
||||
using CommonLibrary;
|
||||
using ClientsLibrary;
|
||||
|
||||
namespace 软件系统客户端模版.UIControls
|
||||
{
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using HslCommunication.Enthernet;
|
||||
using HslCommunication.BasicFramework;
|
||||
using CommonLibrary;
|
||||
|
||||
namespace 软件系统客户端模版
|
||||
{
|
||||
|
||||
//====================================================================================================
|
||||
// 模版说明:
|
||||
//====================================================================================================
|
||||
|
||||
|
||||
public class UserClient
|
||||
{
|
||||
public static JsonSettings JsonSettings = new JsonSettings();
|
||||
/// <summary>
|
||||
/// 本软件的当前版本,用来验证更新的关键依据
|
||||
/// </summary>
|
||||
public static SystemVersion CurrentVersion { get; } = new SystemVersion("1.0.0");
|
||||
|
||||
/// <summary>
|
||||
/// 服务器的IP地址,默认为127.0.0.1,可用于单机调试
|
||||
/// </summary>
|
||||
public static string ServerIp { get; } = "127.0.0.1";
|
||||
|
||||
/// <summary>
|
||||
/// 所有版本更新信息的对象
|
||||
/// </summary>
|
||||
public static List<VersionInfo> HistoryVersions { get; } = new List<VersionInfo>
|
||||
{
|
||||
//写入所有的历史版本信息,这样就能在更新日志的界面查看到信息
|
||||
new VersionInfo()
|
||||
{
|
||||
VersionNum=new SystemVersion("1.0.0"),
|
||||
ReleaseDate=new DateTime(2017,1,1),//该版本发布的日期
|
||||
UpdateDetails=new StringBuilder("1.本系统第一版本正式发布使用。"+Environment.NewLine+
|
||||
"2.提供了多客户端用时在线的功能。"+Environment.NewLine+
|
||||
"3.需要用户自行添加"),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置或获取系统的公告
|
||||
/// </summary>
|
||||
public static string Announcement { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 当前系统的登录账户
|
||||
/// </summary>
|
||||
public static UserAccount UserAccount { get; set; } = new UserAccount();
|
||||
|
||||
/// <summary>
|
||||
/// 服务器的时间,该时间与服务器同步,每隔10秒钟,防止客户端串改单机时间,可以作为各种时间条件判定
|
||||
/// </summary>
|
||||
public static DateTime DateTimeServer { get; set; } = DateTime.Now;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用于访问服务器数据的网络对象类,必须修改这个端口参数,否则运行失败
|
||||
/// </summary>
|
||||
public static Net_Simplify_Client Net_simplify_client = new Net_Simplify_Client(
|
||||
new System.Net.IPEndPoint(System.Net.IPAddress.Parse(ServerIp),
|
||||
CommonLibrary.CommonLibrary.Port_Second_Net))
|
||||
{
|
||||
KeyToken = CommonHeadCode.KeyToken,
|
||||
ConnectTimeout = 5000,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// 用于使用udp向服务器进行发送即时可丢失数据的对象
|
||||
/// </summary>
|
||||
public static Net_Udp_Client Net_Udp_Client = new Net_Udp_Client(
|
||||
new System.Net.IPEndPoint(System.Net.IPAddress.Parse(ServerIp),
|
||||
CommonLibrary.CommonLibrary.Port_Udp_Server))
|
||||
{
|
||||
KeyToken = CommonHeadCode.KeyToken,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,9 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ClientsLibrary">
|
||||
<HintPath>..\ClientsLibrary\bin\Debug\ClientsLibrary.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CommonLibrary">
|
||||
<HintPath>..\CommonLibrary\bin\Debug\CommonLibrary.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -53,18 +56,6 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FormDownloading.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormDownloading.Designer.cs">
|
||||
<DependentUpon>FormDownloading.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FormLog.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormLog.Designer.cs">
|
||||
<DependentUpon>FormLog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FormLogin.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -77,18 +68,6 @@
|
||||
<Compile Include="FormMainWindow.Designer.cs">
|
||||
<DependentUpon>FormMainWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FormRegisterAccount.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormRegisterAccount.Designer.cs">
|
||||
<DependentUpon>FormRegisterAccount.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FormUpdateRemote.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormUpdateRemote.Designer.cs">
|
||||
<DependentUpon>FormUpdateRemote.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="UIControls\OnlineChatRender.cs">
|
||||
@@ -103,25 +82,12 @@
|
||||
<Compile Include="UIControls\ShareFilesRender.Designer.cs">
|
||||
<DependentUpon>ShareFilesRender.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserClient.cs" />
|
||||
<EmbeddedResource Include="FormDownloading.resx">
|
||||
<DependentUpon>FormDownloading.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormLog.resx">
|
||||
<DependentUpon>FormLog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormLogin.resx">
|
||||
<DependentUpon>FormLogin.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormMainWindow.resx">
|
||||
<DependentUpon>FormMainWindow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormRegisterAccount.resx">
|
||||
<DependentUpon>FormRegisterAccount.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormUpdateRemote.resx">
|
||||
<DependentUpon>FormUpdateRemote.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
|
||||
Reference in New Issue
Block a user