添加登录窗体和进度条窗体

Former-commit-id: 751e4990acbb560cc2e0914a4e2a9ad95a8fc004
TangShanKaiPing
wanggang 5 years ago
parent 02cb542b57
commit 9009f627d1

@ -1,10 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="server" value="http://www.baidu.com"/>
<add key="version" value="1.0.0"/>
<add key="login" value="http://www.baidu.com" />
<add key="pull" value="http://www.baidu.com" />
<add key="push" value="http://www.baidu.com" />
<add key="version" value="1.0.0" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>

@ -65,7 +65,9 @@
<HintPath>.\DirectShowLib-2005.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@ -78,6 +80,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Data\Entity.cs" />
<Compile Include="Data\LoginResponse.cs" />
<Compile Include="Data\MyDbContext.cs" />
<Compile Include="Data\Student.cs" />
<Compile Include="Data\User.cs" />
@ -95,6 +98,12 @@
<Compile Include="Infrastructure\ICameraHelper.cs" />
<Compile Include="Infrastructure\IdCardModel.cs" />
<Compile Include="Infrastructure\OpenCvSharpCameraHelper.cs" />
<Compile Include="LoginForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="LoginForm.Designer.cs">
<DependentUpon>LoginForm.cs</DependentUpon>
</Compile>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
@ -102,13 +111,25 @@
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="ProgressForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ProgressForm.Designer.cs">
<DependentUpon>ProgressForm.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Controls\IdCard.resx">
<DependentUpon>IdCard.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="LoginForm.resx">
<DependentUpon>LoginForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ProgressForm.resx">
<DependentUpon>ProgressForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
@ -134,6 +155,9 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNet.WebApi.Client">
<Version>5.2.7</Version>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite">
<Version>3.1.2</Version>
</PackageReference>

@ -0,0 +1,9 @@
namespace CameraCard.Data
{
public class LoginResponse
{
public int code { get; set; }
public string message { get; set; }
public string data { get; set; }
}
}

@ -22,7 +22,7 @@ namespace CameraCard.Data
private void Seed()
{
this.Users.Add(new User { UserName = "admin", PasswordHash = "123456" });
//this.Users.Add(new User { UserName = "admin", Password = "123456" });
}
}
}

@ -3,6 +3,7 @@
public class User : Entity
{
public string UserName { get; set; }
public string Password { get; set; }
public string PasswordHash { get; set; }
}
}

@ -0,0 +1,147 @@
namespace CameraCard
{
partial class LoginForm
{
/// <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.userNameInput = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.passwordInput = new System.Windows.Forms.TextBox();
this.login = new System.Windows.Forms.Button();
this.userNameValid = new System.Windows.Forms.Label();
this.passwordValid = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(41, 56);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 0;
this.label1.Text = "登录名:";
//
// userNameInput
//
this.userNameInput.Location = new System.Drawing.Point(96, 50);
this.userNameInput.Name = "userNameInput";
this.userNameInput.Size = new System.Drawing.Size(157, 21);
this.userNameInput.TabIndex = 1;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(56, 18);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(197, 12);
this.label2.TabIndex = 2;
this.label2.Text = "普通高中学业水平考试信息管理系统";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(41, 105);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 3;
this.label3.Text = "密码:";
//
// passwordInput
//
this.passwordInput.Location = new System.Drawing.Point(96, 100);
this.passwordInput.Name = "passwordInput";
this.passwordInput.PasswordChar = '*';
this.passwordInput.Size = new System.Drawing.Size(157, 21);
this.passwordInput.TabIndex = 4;
//
// login
//
this.login.Location = new System.Drawing.Point(96, 149);
this.login.Name = "login";
this.login.Size = new System.Drawing.Size(157, 30);
this.login.TabIndex = 5;
this.login.Text = "登录";
this.login.UseVisualStyleBackColor = true;
this.login.Click += new System.EventHandler(this.login_Click);
//
// userNameValid
//
this.userNameValid.AutoSize = true;
this.userNameValid.ForeColor = System.Drawing.Color.Red;
this.userNameValid.Location = new System.Drawing.Point(96, 78);
this.userNameValid.Name = "userNameValid";
this.userNameValid.Size = new System.Drawing.Size(29, 12);
this.userNameValid.TabIndex = 6;
this.userNameValid.Text = "验证";
//
// passwordValid
//
this.passwordValid.AutoSize = true;
this.passwordValid.ForeColor = System.Drawing.Color.Red;
this.passwordValid.Location = new System.Drawing.Point(95, 127);
this.passwordValid.Name = "passwordValid";
this.passwordValid.Size = new System.Drawing.Size(29, 12);
this.passwordValid.TabIndex = 7;
this.passwordValid.Text = "验证";
//
// LoginForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(304, 202);
this.Controls.Add(this.passwordValid);
this.Controls.Add(this.userNameValid);
this.Controls.Add(this.login);
this.Controls.Add(this.passwordInput);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.userNameInput);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "LoginForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "登录";
this.Load += new System.EventHandler(this.LoginForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox userNameInput;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox passwordInput;
private System.Windows.Forms.Button login;
private System.Windows.Forms.Label userNameValid;
private System.Windows.Forms.Label passwordValid;
}
}

@ -0,0 +1,134 @@
using CameraCard.Data;
using System;
using System.Configuration;
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
using System.Windows.Forms;
namespace CameraCard
{
public partial class LoginForm : Form
{
private ProgressForm _progress;
public LoginForm()
{
InitializeComponent();
this.userNameValid.Text = "";
this.passwordValid.Text = "";
}
private void LoginForm_Load(object sender, EventArgs e)
{
MyDbContext.Init();
}
private void login_Click(object sender, EventArgs e)
{
var valid = true;
if (string.IsNullOrWhiteSpace(this.userNameInput.Text))
{
valid = false;
this.userNameValid.Text = "用户名不能为空";
}
else
{
this.userNameValid.Text = "";
}
if (string.IsNullOrWhiteSpace(this.passwordInput.Text))
{
valid = false;
this.passwordValid.Text = "用户名不能为空";
}
else
{
this.passwordValid.Text = "";
}
if (valid)
{
var userName = this.userNameInput.Text.Trim();
var password = this.passwordInput.Text.Trim();
using (var db = new MyDbContext())
{
if (db.Users.Any())
{
if (db.Users.Any(o => o.UserName == userName && o.Password == password))
{
this.Hide();
new MainForm().Show();
}
else
{
MessageBox.Show("用户名或密码错误");
}
}
else
{
this.BeginInvoke(new Action(() =>
{
if (this._progress == null)
{
var thread = new Thread(() =>
{
this._progress?.SetProgress("正在登录,请稍候", 30);
var url = ConfigurationManager.AppSettings["login"];
var client = HttpClientFactory.Create();
var content = new JavaScriptSerializer().Serialize(new { userName = userName, password = password });
var response = client.PostAsync(url, new StringContent(content)).Result;
this._progress?.SetProgress("正在登录,请稍候", 60);
if (response.StatusCode == HttpStatusCode.OK)
{
var result = new JavaScriptSerializer().Deserialize<LoginResponse>(response.Content.ReadAsStringAsync().Result);
if (result.code == 0)
{
var user = db.Users.FirstOrDefault(o => o.UserName == userName);
if (user == null)
{
user = new User { UserName = userName, Password = password, PasswordHash = result.data };
}
else
{
user.Password = password;
user.PasswordHash = result.data;
}
db.SaveChanges();
//this.Update();
this._progress?.SetProgress("登录成功", 100);
this._progress.Close();
this.Hide();
new MainForm().Show();
}
else
{
MessageBox.Show(result.message);
this._progress?.SetProgress("登录失败", 100);
this._progress.Close();
}
}
else
{
MessageBox.Show(response.Content.ReadAsStringAsync().Result);
this._progress?.SetProgress("登录失败", 100);
this._progress.Close();
}
});
this._progress = new ProgressForm("登录中", "正在登录,请稍候", 0, 100, this.Width, () =>
{
this._progress = null;
thread.Abort();
});
thread.Start();
this._progress.ShowDialog();
}
}));
}
}
}
}
}
}

@ -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>

@ -30,6 +30,7 @@
{
System.Windows.Forms.TabPage tab1;
this.idcGroupBox = new System.Windows.Forms.GroupBox();
this.idCard = new CameraCard.IdCard();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.photo = new System.Windows.Forms.PictureBox();
this.shotBtn = new System.Windows.Forms.Button();
@ -58,7 +59,6 @@
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.versionLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.idCard = new CameraCard.IdCard();
tab1 = new System.Windows.Forms.TabPage();
tab1.SuspendLayout();
this.idcGroupBox.SuspendLayout();
@ -102,6 +102,13 @@
this.idcGroupBox.TabStop = false;
this.idcGroupBox.Text = "身份证";
//
// idCard
//
this.idCard.Location = new System.Drawing.Point(-1, 16);
this.idCard.Name = "idCard";
this.idCard.Size = new System.Drawing.Size(420, 200);
this.idCard.TabIndex = 8;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@ -388,13 +395,6 @@
this.versionLabel.Size = new System.Drawing.Size(14, 17);
this.versionLabel.Text = "v";
//
// idCard
//
this.idCard.Location = new System.Drawing.Point(-1, 16);
this.idCard.Name = "idCard";
this.idCard.Size = new System.Drawing.Size(420, 200);
this.idCard.TabIndex = 8;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -402,11 +402,14 @@
this.ClientSize = new System.Drawing.Size(1008, 729);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.tabControl1);
this.KeyPreview = true;
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "MainFrom";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed);
this.Load += new System.EventHandler(this.MainFrom_Load);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.shotBtn_Click);
tab1.ResumeLayout(false);
this.idcGroupBox.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);

@ -1,11 +1,9 @@
using CameraCard.Data;
using System;
using System;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace CameraCard
@ -21,7 +19,6 @@ namespace CameraCard
InitializeComponent();
this.versionLabel.Alignment = ToolStripItemAlignment.Right;
this.versionLabel.Text += Assembly.GetExecutingAssembly().GetName().Version.ToString();
MyDbContext.Init();
}
private void MainFrom_Load(object sender, EventArgs e)
@ -239,5 +236,10 @@ namespace CameraCard
this._cameraHelper.Dispose();
this._pen.Dispose();
}
private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
{
Application.Exit();
}
}
}

@ -24,7 +24,7 @@ namespace CameraCard
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
Application.Run(new LoginForm());
GC.KeepAlive(mutex);
}

@ -0,0 +1,86 @@
namespace CameraCard
{
partial class ProgressForm
{
/// <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.progressBar = new System.Windows.Forms.ProgressBar();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.status = new System.Windows.Forms.ToolStripLabel();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// progressBar
//
this.progressBar.Dock = System.Windows.Forms.DockStyle.Top;
this.progressBar.Location = new System.Drawing.Point(0, 0);
this.progressBar.Name = "progressBar";
this.progressBar.Size = new System.Drawing.Size(284, 20);
this.progressBar.TabIndex = 0;
//
// toolStrip1
//
this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.status});
this.toolStrip1.Location = new System.Drawing.Point(0, 26);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(284, 25);
this.toolStrip1.TabIndex = 1;
this.toolStrip1.Text = "toolStrip1";
//
// status
//
this.status.Name = "status";
this.status.Size = new System.Drawing.Size(32, 22);
this.status.Text = "就绪";
//
// ProgressForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 51);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.progressBar);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "ProgressForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "任务执行中";
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ProgressBar progressBar;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripLabel status;
}
}

@ -0,0 +1,42 @@
using System;
using System.Windows.Forms;
namespace CameraCard
{
public partial class ProgressForm : Form
{
private readonly Action _closed;
public ProgressForm(string title, string status, int min, int max, int width = 0, Action action = null)
{
InitializeComponent();
this.Width = width == 0 ? this.Width : width;
this.Text = title;
this.status.Text = status;
this.progressBar.Minimum = min;
this.progressBar.Maximum = max;
this._closed = action;
//this.ControlBox = this._closed != null;
this.FormClosed += ProgressForm_FormClosed;
}
private void ProgressForm_FormClosed(object sender, FormClosedEventArgs e)
{
this._closed?.Invoke();
}
public void SetProgress(string label, int progress)
{
this.Invoke(new Action(() =>
{
this.status.Text = label;
this.progressBar.Value = progress;
}));
}
public void CloseProgress()
{
this.CloseProgress();
}
}
}

@ -0,0 +1,123 @@
<?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>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
Loading…
Cancel
Save