init: 导入项目到 meswork Gitea
This commit is contained in:
72
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar.Designer.cs
generated
Normal file
72
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar.Designer.cs
generated
Normal file
@@ -0,0 +1,72 @@
|
||||
namespace DTTest
|
||||
{
|
||||
partial class T_ProgressBar
|
||||
{
|
||||
/// <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.label_ProgressShow = new System.Windows.Forms.Label();
|
||||
this.progressBar_Output = new System.Windows.Forms.ProgressBar();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label_ProgressShow
|
||||
//
|
||||
this.label_ProgressShow.AutoSize = true;
|
||||
this.label_ProgressShow.Location = new System.Drawing.Point(271, 19);
|
||||
this.label_ProgressShow.Name = "label_ProgressShow";
|
||||
this.label_ProgressShow.Size = new System.Drawing.Size(53, 12);
|
||||
this.label_ProgressShow.TabIndex = 2;
|
||||
this.label_ProgressShow.Text = "进度显示";
|
||||
//
|
||||
// progressBar_Output
|
||||
//
|
||||
this.progressBar_Output.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.progressBar_Output.Location = new System.Drawing.Point(0, 0);
|
||||
this.progressBar_Output.Name = "progressBar_Output";
|
||||
this.progressBar_Output.Size = new System.Drawing.Size(619, 49);
|
||||
this.progressBar_Output.TabIndex = 4;
|
||||
this.progressBar_Output.Value = 20;
|
||||
//
|
||||
// T_ProgressBar
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(619, 49);
|
||||
this.Controls.Add(this.label_ProgressShow);
|
||||
this.Controls.Add(this.progressBar_Output);
|
||||
this.Name = "T_ProgressBar";
|
||||
this.Text = "通用调用进度条";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label_ProgressShow;
|
||||
private System.Windows.Forms.ProgressBar progressBar_Output;
|
||||
}
|
||||
}
|
||||
110
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar.cs
Normal file
110
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar.cs
Normal file
@@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class T_ProgressBar : Form
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前操作名称
|
||||
/// </summary>
|
||||
public string taskName = "-1";
|
||||
/// <summary>
|
||||
/// 设置的进度条的最大值
|
||||
/// </summary>
|
||||
public int progressBarMax = 100;
|
||||
|
||||
/// <summary>
|
||||
/// 初始化函数
|
||||
/// </summary>
|
||||
public T_ProgressBar()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.TopMost = true;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化函数
|
||||
/// </summary>
|
||||
/// <param name="taskName"></param>
|
||||
/// <param name="max"></param>
|
||||
public T_ProgressBar(string taskName, int max)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.TopMost = true;
|
||||
ShowProgressSet(taskName, max);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置参数
|
||||
/// </summary>
|
||||
/// <param name="taskName"></param>
|
||||
/// <param name="max"></param>
|
||||
public void ShowProgressSet(string taskName, int max)
|
||||
{
|
||||
Text = this.taskName = taskName;
|
||||
progressBar_Output.Maximum = progressBarMax = max;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示进度数据
|
||||
/// </summary>
|
||||
/// <param name="curr"></param>
|
||||
public void ShowProgress(int curr)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (progressBarMax == curr)
|
||||
{
|
||||
// new Task(delegate () { System.Threading.Thread.Sleep(1000); this.Close(); }).Start();
|
||||
System.Threading.Thread.Sleep(1000); this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.progressBar_Output.InvokeRequired)
|
||||
{
|
||||
|
||||
this.progressBar_Output.Invoke(new Action(delegate ()
|
||||
{
|
||||
this.progressBar_Output.Value = curr;
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.progressBar_Output.Value = curr;
|
||||
}
|
||||
|
||||
if (this.label_ProgressShow.InvokeRequired)
|
||||
{
|
||||
this.label_ProgressShow.Invoke(new Action(delegate ()
|
||||
{
|
||||
this.label_ProgressShow.Text = "进度:" + curr + " / " + progressBarMax;
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.label_ProgressShow.Text = "进度:" + curr + " / " + progressBarMax;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
LogNet.LogisTrac.WriteLog(typeof(T_ProgressBar), err);
|
||||
|
||||
// ModelBasic.ErrDef.iErrHandler.ErrInfoTransmit(err.ToString());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
120
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar.resx
Normal file
120
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
141
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar_2.Designer.cs
generated
Normal file
141
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar_2.Designer.cs
generated
Normal file
@@ -0,0 +1,141 @@
|
||||
namespace DTTest
|
||||
{
|
||||
partial class T_ProgressBar_2
|
||||
{
|
||||
/// <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.label_ProgressShow = new System.Windows.Forms.Label();
|
||||
this.progressBar_Output = new System.Windows.Forms.ProgressBar();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.label_ProgressShow_All = new System.Windows.Forms.Label();
|
||||
this.progressBar_Output_All = new System.Windows.Forms.ProgressBar();
|
||||
this.panel1.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label_ProgressShow
|
||||
//
|
||||
this.label_ProgressShow.AutoSize = true;
|
||||
this.label_ProgressShow.Location = new System.Drawing.Point(294, 20);
|
||||
this.label_ProgressShow.Name = "label_ProgressShow";
|
||||
this.label_ProgressShow.Size = new System.Drawing.Size(53, 12);
|
||||
this.label_ProgressShow.TabIndex = 2;
|
||||
this.label_ProgressShow.Text = "进度显示";
|
||||
//
|
||||
// progressBar_Output
|
||||
//
|
||||
this.progressBar_Output.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.progressBar_Output.Location = new System.Drawing.Point(0, 0);
|
||||
this.progressBar_Output.Name = "progressBar_Output";
|
||||
this.progressBar_Output.Size = new System.Drawing.Size(669, 49);
|
||||
this.progressBar_Output.TabIndex = 4;
|
||||
this.progressBar_Output.Value = 20;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.label_ProgressShow);
|
||||
this.panel1.Controls.Add(this.progressBar_Output);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(3, 3);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(669, 49);
|
||||
this.panel1.TabIndex = 5;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 1;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.panel2, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 0);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 2;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(675, 110);
|
||||
this.tableLayoutPanel1.TabIndex = 6;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.Controls.Add(this.label_ProgressShow_All);
|
||||
this.panel2.Controls.Add(this.progressBar_Output_All);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel2.Location = new System.Drawing.Point(3, 58);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(669, 49);
|
||||
this.panel2.TabIndex = 6;
|
||||
//
|
||||
// label_ProgressShow_All
|
||||
//
|
||||
this.label_ProgressShow_All.AutoSize = true;
|
||||
this.label_ProgressShow_All.Location = new System.Drawing.Point(294, 20);
|
||||
this.label_ProgressShow_All.Name = "label_ProgressShow_All";
|
||||
this.label_ProgressShow_All.Size = new System.Drawing.Size(53, 12);
|
||||
this.label_ProgressShow_All.TabIndex = 2;
|
||||
this.label_ProgressShow_All.Text = "进度显示";
|
||||
//
|
||||
// progressBar_Output_All
|
||||
//
|
||||
this.progressBar_Output_All.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.progressBar_Output_All.Location = new System.Drawing.Point(0, 0);
|
||||
this.progressBar_Output_All.Name = "progressBar_Output_All";
|
||||
this.progressBar_Output_All.Size = new System.Drawing.Size(669, 49);
|
||||
this.progressBar_Output_All.TabIndex = 4;
|
||||
this.progressBar_Output_All.Value = 20;
|
||||
//
|
||||
// T_ProgressBar_2
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(675, 110);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Name = "T_ProgressBar_2";
|
||||
this.Text = "通用调用进度条(双条)";
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel2.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label_ProgressShow;
|
||||
private System.Windows.Forms.ProgressBar progressBar_Output;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Label label_ProgressShow_All;
|
||||
private System.Windows.Forms.ProgressBar progressBar_Output_All;
|
||||
}
|
||||
}
|
||||
134
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar_2.cs
Normal file
134
DataMirrorTools_Simulator/ModelBasic/WinForm/T_ProgressBar_2.cs
Normal file
@@ -0,0 +1,134 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DTTest
|
||||
{
|
||||
public partial class T_ProgressBar_2 : Form
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前操作名称
|
||||
/// </summary>
|
||||
public string taskName = "-1";
|
||||
/// <summary>
|
||||
/// 设置的进度条的最大值
|
||||
/// </summary>
|
||||
public int progressBarMax = 100;
|
||||
/// <summary>
|
||||
/// 设置的进度条的最大值(总)
|
||||
/// </summary>
|
||||
public int progressBarMax_All = 100;
|
||||
|
||||
/// <summary>
|
||||
/// 初始化函数
|
||||
/// </summary>
|
||||
public T_ProgressBar_2()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.TopMost = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 初始化函数
|
||||
/// </summary>
|
||||
/// <param name="taskName"></param>
|
||||
/// <param name="max"></param>
|
||||
/// <param name="max_All"></param>
|
||||
public T_ProgressBar_2(string taskName,int max_All)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.TopMost = true;
|
||||
ShowProgressSet_All(taskName, max_All);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置参数
|
||||
/// </summary>
|
||||
/// <param name="taskName"></param>
|
||||
/// <param name="max"></param>
|
||||
public void ShowProgressSet( int max)
|
||||
{
|
||||
progressBar_Output.Maximum = progressBarMax = max;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置参数
|
||||
/// </summary>
|
||||
/// <param name="taskName"></param>
|
||||
/// <param name="max_All"></param>
|
||||
public void ShowProgressSet_All(string taskName,int max_All)
|
||||
{
|
||||
Text = this.taskName = taskName;
|
||||
progressBar_Output_All.Maximum = progressBarMax_All = max_All;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示进度数据
|
||||
/// </summary>
|
||||
/// <param name="curr"></param>
|
||||
public void ShowProgress(int curr)
|
||||
{
|
||||
if (progressBarMax == curr)
|
||||
{
|
||||
new Task(delegate () { System.Threading.Thread.Sleep(1000); this.Close(); }).Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
//if (progressBar_Output.InvokeRequired)
|
||||
//{
|
||||
progressBar_Output.Invoke(new Action(delegate () {
|
||||
progressBar_Output.Value = curr;
|
||||
label_ProgressShow.Text = "进度:" + curr + " / " + progressBarMax;
|
||||
}));
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// progressBar_Output.Value = curr;
|
||||
// label_ProgressShow.Text = "进度:" + curr + " / " + progressBarMax;
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示进度数据
|
||||
/// </summary>
|
||||
/// <param name="curr"></param>
|
||||
public void ShowProgress_All(int curr)
|
||||
{
|
||||
if (progressBarMax_All == curr)
|
||||
{
|
||||
new Task(delegate () { System.Threading.Thread.Sleep(1000); this.Close(); }).Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (progressBar_Output_All.InvokeRequired)
|
||||
{
|
||||
progressBar_Output_All.Invoke(new Action(delegate () {
|
||||
progressBar_Output_All.Value = curr;
|
||||
label_ProgressShow_All.Text = "进度:" + curr + " / " + progressBarMax_All;
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
progressBar_Output_All.Value = curr;
|
||||
label_ProgressShow_All.Text = "进度:" + curr + " / " + progressBarMax_All;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user