Commit fb3751ef authored by tr's avatar tr

1、审批样例程序

parent a53d5ff3
namespace Tools.MyCommon.controls
{
partial class ucAudit
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.panelAuditHome = new System.Windows.Forms.Panel();
this.SuspendLayout();
//
// panelAuditHome
//
this.panelAuditHome.AutoScroll = true;
this.panelAuditHome.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelAuditHome.Location = new System.Drawing.Point(0, 0);
this.panelAuditHome.Name = "panelAuditHome";
this.panelAuditHome.Size = new System.Drawing.Size(346, 312);
this.panelAuditHome.TabIndex = 0;
//
// ucAudit
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.panelAuditHome);
this.Name = "ucAudit";
this.Size = new System.Drawing.Size(346, 312);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panelAuditHome;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Tools.MyCommon.controls
{
public partial class ucAudit : UserControl
{
public ucAudit()
{
InitializeComponent();
}
private DataTable _dt = null;
/// <summary>
/// 数据源
/// </summary>
public DataTable DataSource
{
get
{
return this._dt;
}
set
{
this._dt = value;
if (this._dt != null)
{
this.InitAuditView();
this.InitAuditActived();
}
}
}
/// <summary>
/// 刷新节点状态
/// </summary>
public void RefreshNode()
{
this.SetAuditActived();
}
List<ucAuditNode> auditNodeList = null;
int previous = -1; //前一节点
int current = 0; //当前节点
bool isIniting = false;
private void InitAuditView()
{
if (this.isIniting)
return;
try
{
this.isIniting = true;
//清除控件
this.panelAuditHome.Controls.Clear();
//初始化审批节点列表
auditNodeList = new List<ucAuditNode>();
int index = 0;
foreach (DataRow dr in this.DataSource.Rows)
{
ucAuditNode node = new ucAuditNode();
node.DataSource = dr;
node.Index = index;
node.AuditStateChanged += Audit_AuditStateChanged;
node.Location = new Point(0, index * 155);
node.Parent = this.panelAuditHome;
auditNodeList.Add(node);
index++;
}
}
catch (Exception ex)
{
MyUtils.Utils.Tip(ex.Message);
}
finally
{
this.isIniting = false;
}
}
private void InitAuditActived()
{
int index = 0;
int total = this.auditNodeList.Count;
while (index < total && this.auditNodeList[index].AuditState != 0)
{
index++;
}
this.current = index >= total ? total - 1 : index;
this.previous = this.current - 1;
this.SetAuditActived();
}
private void SetAuditActived()
{
if (auditNodeList == null || auditNodeList.Count == 0)
return;
if (previous < 0) //到达边界时,分别处理
{
this.SetAuditActived(current, true);
}
else
{
this.SetAuditActived(previous, auditNodeList[current].AuditState == 0); //下一节点待审核时,当前节点有效,即可以撤销
this.SetAuditActived(current, auditNodeList[previous].AuditState == 1); //上一节点审核通过后,当前节点有效,即可以审批
}
}
private void SetAuditActived(int index, bool IsActive)
{
if (auditNodeList == null || auditNodeList.Count == 0)
return;
if (index >= 0 && index < auditNodeList.Count)
{
auditNodeList[index].IsActive = IsActive;
}
}
private void Audit_AuditStateChanged(object sender, EventArgs e)
{
ucAuditNode node = sender as ucAuditNode;
//向下偏移是正常方向
bool IsDown = node.Index == current;
//上下偏移时,修改前序节点状态
int disposal = IsDown ? previous : current;
this.SetAuditActived(disposal, false);
//移动当前指针位置
current += IsDown && current < auditNodeList.Count - 1 ? 1 : 0; //向下
current += !IsDown && current > 0 ? -1 : 0; //向上
previous = current - 1; //前序指针永远等于:current-1
//激活当前节点和前序节点
this.SetAuditActived();
}
}
}
<?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>
\ No newline at end of file
namespace Tools.MyCommon.controls
{
partial class ucAuditNode
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.lbAuditUser = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.tbAuditRemark = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.rbRevert = new System.Windows.Forms.RadioButton();
this.rbNoPass = new System.Windows.Forms.RadioButton();
this.rbPass = new System.Windows.Forms.RadioButton();
this.rbInit = new System.Windows.Forms.RadioButton();
this.lbAuditDateTime = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.lbAuditState = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.lbWaitAuditUser = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.lbAuditUser);
this.panel1.Controls.Add(this.label8);
this.panel1.Controls.Add(this.tbAuditRemark);
this.panel1.Controls.Add(this.label7);
this.panel1.Controls.Add(this.rbRevert);
this.panel1.Controls.Add(this.rbNoPass);
this.panel1.Controls.Add(this.rbPass);
this.panel1.Controls.Add(this.rbInit);
this.panel1.Controls.Add(this.lbAuditDateTime);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.lbAuditState);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.lbWaitAuditUser);
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(419, 153);
this.panel1.TabIndex = 0;
//
// lbAuditUser
//
this.lbAuditUser.AutoSize = true;
this.lbAuditUser.Location = new System.Drawing.Point(285, 40);
this.lbAuditUser.Name = "lbAuditUser";
this.lbAuditUser.Size = new System.Drawing.Size(41, 12);
this.lbAuditUser.TabIndex = 14;
this.lbAuditUser.Text = "李某某";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(214, 40);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(65, 12);
this.label8.TabIndex = 13;
this.label8.Text = "审 核 人:";
//
// tbAuditRemark
//
this.tbAuditRemark.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbAuditRemark.Location = new System.Drawing.Point(88, 65);
this.tbAuditRemark.Multiline = true;
this.tbAuditRemark.Name = "tbAuditRemark";
this.tbAuditRemark.Size = new System.Drawing.Size(316, 56);
this.tbAuditRemark.TabIndex = 12;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(16, 65);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(65, 12);
this.label7.TabIndex = 11;
this.label7.Text = "审核备注:";
//
// rbRevert
//
this.rbRevert.AutoSize = true;
this.rbRevert.Location = new System.Drawing.Point(357, 127);
this.rbRevert.Name = "rbRevert";
this.rbRevert.Size = new System.Drawing.Size(47, 16);
this.rbRevert.TabIndex = 10;
this.rbRevert.TabStop = true;
this.rbRevert.Text = "返审";
this.rbRevert.UseVisualStyleBackColor = true;
//
// rbNoPass
//
this.rbNoPass.AutoSize = true;
this.rbNoPass.Location = new System.Drawing.Point(292, 127);
this.rbNoPass.Name = "rbNoPass";
this.rbNoPass.Size = new System.Drawing.Size(59, 16);
this.rbNoPass.TabIndex = 9;
this.rbNoPass.TabStop = true;
this.rbNoPass.Text = "不通过";
this.rbNoPass.UseVisualStyleBackColor = true;
//
// rbPass
//
this.rbPass.AutoSize = true;
this.rbPass.Location = new System.Drawing.Point(227, 127);
this.rbPass.Name = "rbPass";
this.rbPass.Size = new System.Drawing.Size(47, 16);
this.rbPass.TabIndex = 8;
this.rbPass.TabStop = true;
this.rbPass.Text = "通过";
this.rbPass.UseVisualStyleBackColor = true;
//
// rbInit
//
this.rbInit.AutoSize = true;
this.rbInit.Location = new System.Drawing.Point(156, 127);
this.rbInit.Name = "rbInit";
this.rbInit.Size = new System.Drawing.Size(47, 16);
this.rbInit.TabIndex = 6;
this.rbInit.TabStop = true;
this.rbInit.Text = "待审";
this.rbInit.UseVisualStyleBackColor = true;
//
// lbAuditDateTime
//
this.lbAuditDateTime.AutoSize = true;
this.lbAuditDateTime.Location = new System.Drawing.Point(285, 17);
this.lbAuditDateTime.Name = "lbAuditDateTime";
this.lbAuditDateTime.Size = new System.Drawing.Size(119, 12);
this.lbAuditDateTime.TabIndex = 5;
this.lbAuditDateTime.Text = "2020-12-02 09:01:23";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(214, 17);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(65, 12);
this.label5.TabIndex = 4;
this.label5.Text = "审核时间:";
//
// lbAuditState
//
this.lbAuditState.AutoSize = true;
this.lbAuditState.Location = new System.Drawing.Point(87, 17);
this.lbAuditState.Name = "lbAuditState";
this.lbAuditState.Size = new System.Drawing.Size(29, 12);
this.lbAuditState.TabIndex = 3;
this.lbAuditState.Text = "待审";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(16, 40);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(65, 12);
this.label3.TabIndex = 2;
this.label3.Text = "待 审 人:";
//
// lbWaitAuditUser
//
this.lbWaitAuditUser.AutoSize = true;
this.lbWaitAuditUser.Location = new System.Drawing.Point(87, 40);
this.lbWaitAuditUser.Name = "lbWaitAuditUser";
this.lbWaitAuditUser.Size = new System.Drawing.Size(41, 12);
this.lbWaitAuditUser.TabIndex = 1;
this.lbWaitAuditUser.Text = "李某某";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(16, 17);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 0;
this.label1.Text = "审核状态:";
//
// ucAudit
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.panel1);
this.Name = "ucAudit";
this.Size = new System.Drawing.Size(419, 153);
this.Load += new System.EventHandler(this.ucAudit_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.RadioButton rbRevert;
private System.Windows.Forms.RadioButton rbNoPass;
private System.Windows.Forms.RadioButton rbPass;
private System.Windows.Forms.RadioButton rbInit;
private System.Windows.Forms.Label lbAuditDateTime;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label lbAuditState;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label lbWaitAuditUser;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tbAuditRemark;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label lbAuditUser;
private System.Windows.Forms.Label label8;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Tools.MyUtils;
namespace Tools.MyCommon.controls
{
public partial class ucAuditNode : UserControl
{
public event EventHandler AuditStateChanged;
public ucAuditNode()
{
InitializeComponent();
}
/// <summary>
/// 数据源
/// </summary>
public DataRow DataSource { get; set; } = null;
/// <summary>
/// (私有)是否激活
/// </summary>
private bool _actived = false;
/// <summary>
/// 是否激活
/// </summary>
public bool IsActive
{
get
{
return this._actived;
}
set
{
this._actived = value;
this.SetEnabled();
}
}
/// <summary>
/// 序号
/// </summary>
public int Index { get; set; }
/// <summary>
/// 审批状态
/// </summary>
public int AuditState => this.DataSource == null ? 0 : Convert.ToInt32(this.DataSource["AuditState"].ToString());
/// <summary>
/// 是否待审
/// </summary>
private bool IsWaitAudit => this.AuditState == 0;
/// <summary>
/// 待审人
/// </summary>
private string WaitAuditUser => this.DataSource == null ? "" : $";{this.DataSource["WaitAuditUser"].ToString()};";
private void ucAudit_Load(object sender, EventArgs e)
{
if (!this.DesignMode && this.DataSource != null)
{
this.SetEnabled();
this.lbAuditState.Text = this.GetAuditStateText();
this.lbAuditDateTime.Text = this.DataSource["AuditDateTime"].ToString();
this.lbWaitAuditUser.Text = this.DataSource["WaitAuditUser"].ToString();
this.lbAuditUser.Text = this.DataSource["AuditUser"].ToString();
this.tbAuditRemark.Text = this.DataSource["AuditRemark"].ToString();
//
this.rbInit.CheckedChanged += RadioButton_CheckedChanged;
this.rbPass.CheckedChanged += RadioButton_CheckedChanged;
this.rbNoPass.CheckedChanged += RadioButton_CheckedChanged;
this.rbRevert.CheckedChanged += RadioButton_CheckedChanged;
}
}
private void RadioButton_CheckedChanged(object sender, EventArgs e)
{
//只接收选中事件
if ((sender as RadioButton).Checked)
{
this.DataSource["AuditState"] = this.GetAuditState();
this.DataSource.EndEdit();
//设定审批信息
this.SetAuditInfo();
//触发状态改变事件
this.AuditStateChanged?.Invoke(this, new EventArgs());
//设置有效性
this.SetEnabled();
}
}
private int GetAuditState()
{
if (this.rbPass.Checked)
return 1;
if (this.rbNoPass.Checked)
return 2;
if (this.rbRevert.Checked)
return 3;
return 0;
}
private string GetAuditStateText()
{
string result = "";
switch (this.AuditState)
{
//0:待审; 1:通过; 2:不通过; 3:返审
case 0: result = "待审"; break;
case 1: result = "通过"; break;
case 2: result = "不通过"; break;
case 3: result = "返审"; break;
default: result = "未知"; break;
}
return result;
}
private void SetEnabled()
{
this.Enabled = this.IsActive && this.WaitAuditUser.IndexOf($";{Utils.LoginUser};") >= 0;
this.tbAuditRemark.Enabled = this.Enabled && this.IsWaitAudit;
}
private void SetAuditInfo()
{
this.lbAuditState.Text = this.GetAuditStateText();
string AuditUser = this.IsWaitAudit ? "" : Utils.LoginUser;
string AuditDateTime = this.IsWaitAudit ? "" : Utils.Now();
//更新界面
this.lbAuditUser.Text = AuditUser;
this.lbAuditDateTime.Text = AuditDateTime;
//更新数据源
this.DataSource["AuditUser"] = AuditUser;
this.DataSource["AuditDateTime"] = AuditDateTime;
this.DataSource.EndEdit();
}
}
}
<?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>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Tools.MyUtils
{
public abstract class DrawHelper
{
//基础设置
private static readonly int bitmap_width = 32; //图片大小 32*32
private static readonly int label_width = 60; //文本标签长度
private static readonly int label_height = 24; //文本标签高度
private static readonly int gab_width = 6; //标签间隔
private static readonly int init_x = 50; //起始坐标x
private static readonly int init_y = 50; //起始坐标y
//横坐标相对位置:因为单向绘制,这里只需考虑横坐标
private static readonly int arrow_width = label_width + gab_width - bitmap_width; //箭头长度
private static readonly int arrow_relative_x = bitmap_width; //箭头相对位置x
private static readonly int label_relative_x = label_width / 2 + bitmap_width / 2 + gab_width; //标签相对位置x
private static readonly int bitmap_relative_x = label_width + gab_width; //图片相对位置x
//纵坐标固定位置
private static readonly int arrow_y = init_y + bitmap_width / 2; //箭头纵坐标绝对位置
private static readonly int label_y = init_y + bitmap_width; //标签纵坐标绝对位置
static Graphics g = null;
static Point bitmap_location = default(Point);
static Point arrow_location = default(Point);
static Point label_location = default(Point);
/// <summary>
/// 绘制流程节点
/// </summary>
/// <param name="graphics"></param>
/// <param name="dt"></param>
public static int DrawFlowNode(Graphics graphics, DataTable dt)
{
//初始化绘图对象
g = graphics;
//初始化默认位置
bitmap_location = new Point(init_x, init_y);
//绘制节点
for (int i = 0; i < dt.DefaultView.Count; i++)
{
DataRow row = dt.DefaultView[i].Row;
string name = row["Name"].ToString();
BitmapType bitmapType = BitmapType.AuditNode;
if (i == 0)
{
bitmapType = BitmapType.StartNode;
}
else if (i == dt.DefaultView.Count - 1)
{
bitmapType = BitmapType.EndNode;
}
DrawNode(name, bitmapType, row);
}
//返回流程长度
return bitmap_location.X;
}
/// <summary>
/// 绘制节点
/// </summary>
/// <param name="text"></param>
/// <param name="bitmapType"></param>
private static void DrawNode(string text, BitmapType bitmapType, DataRow row)
{
//获取当前位置
int x = bitmap_location.X;
//是否开始节点
bool IsStartNode = bitmapType == BitmapType.StartNode;
if(IsStartNode)
{
label_location = new Point(x - (label_width / 2) + (bitmap_width / 2), label_y);
}
//绘制
if (!IsStartNode)
{
DrawArrow(arrow_location);
}
DrawLabel(label_location, text);
DrawBitmap(bitmap_location, bitmapType);
//记录Location,用于点击判定
if (row != null && row.Table.Columns.Contains("Location"))
{
row["Location"] = $"Location:{label_location.X},{init_y};Size:{label_width},{bitmap_width + label_height}";
row.EndEdit();
}
//位置移至下一节点
arrow_location = new Point(x + arrow_relative_x, arrow_y);
label_location = new Point(x + label_relative_x, label_y);
bitmap_location = new Point(x + bitmap_relative_x, init_y);
}
/// <summary>
/// 绘制图形
/// </summary>
private static void DrawBitmap(Point location, BitmapType bitmapType)
{
Bitmap bmp = GetBitmap(bitmapType);
g.DrawImageUnscaled(bmp, location);
}
/// <summary>
/// 绘制箭头
/// </summary>
/// <param name="location"></param>
private static void DrawArrow(Point location)
{
Pen pen = new Pen(Brushes.Blue);
Point end = new Point(location.X + arrow_width, location.Y);
Point down = new Point(end.X - 5, end.Y + 3);
Point up = new Point(end.X - 5, end.Y - 3);
g.DrawLine(pen, location, end);
g.DrawLine(pen, down, end);
g.DrawLine(pen, up, end);
}
/// <summary>
/// 绘制标签
/// </summary>
/// <param name="location"></param>
/// <param name="text"></param>
private static void DrawLabel(Point location, string text)
{
Font font = new Font("宋体", 9f);
Size size = new Size(label_width, label_height);
Rectangle rectangle = new Rectangle(location, size);
StringFormat format = new StringFormat
{
Alignment = StringAlignment.Center,
LineAlignment = StringAlignment.Center,
FormatFlags = StringFormatFlags.NoWrap | StringFormatFlags.LineLimit,
Trimming = StringTrimming.EllipsisPath
};
g.DrawRectangle(new Pen(Brushes.Red), rectangle);
g.DrawString(text, font, Brushes.Black, rectangle, format);
}
/// <summary>
/// 获取资源图片
/// </summary>
/// <param name="bitmapType"></param>
/// <returns></returns>
private static Bitmap GetBitmap(BitmapType bitmapType)
{
Bitmap bmp = null;
switch (bitmapType)
{
case BitmapType.AuditNode: bmp = Properties.Resources.node_audit; break;
case BitmapType.StartNode: bmp = Properties.Resources.node_start; break;
case BitmapType.EndNode: bmp = Properties.Resources.node_end; break;
default:break;
}
return bmp;
}
}
enum BitmapType
{
StartNode,
AuditNode,
EndNode,
}
}
......@@ -45,6 +45,20 @@ namespace Tools.MyUtils
/// </summary>
public static string TempPath => $@"{Application.StartupPath}\temp";
#endregion
#region 常用日期
public static string LoginUser = "";
/// <summary>
/// 获取当前日期
/// </summary>
/// <returns></returns>
public static string Now()
{
return DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
}
#endregion
#region 打开文件
......
......@@ -70,6 +70,36 @@ namespace Tools.Properties {
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap node_audit {
get {
object obj = ResourceManager.GetObject("node_audit", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap node_end {
get {
object obj = ResourceManager.GetObject("node_end", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap node_start {
get {
object obj = ResourceManager.GetObject("node_start", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
......
......@@ -121,6 +121,15 @@
<data name="excel" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\excel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="node_audit" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\node_audit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="node_end" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\node_end.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="node_start" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\node_start.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="sql" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\sql.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
......
......@@ -64,6 +64,18 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="MyCommon\controls\ucAudit.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="MyCommon\controls\ucAudit.Designer.cs">
<DependentUpon>ucAudit.cs</DependentUpon>
</Compile>
<Compile Include="MyCommon\controls\ucAuditNode.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="MyCommon\controls\ucAuditNode.Designer.cs">
<DependentUpon>ucAuditNode.cs</DependentUpon>
</Compile>
<Compile Include="MyCommon\IEditForm.cs" />
<Compile Include="MyCommon\wEditBasic.cs">
<SubType>Form</SubType>
......@@ -73,6 +85,13 @@
</Compile>
<Compile Include="MyData\DBHelper.cs" />
<Compile Include="MyData\SqlHelper.cs" />
<Compile Include="MyUtils\DrawHelper.cs" />
<Compile Include="UI\wAuditDemo.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\wAuditDemo.Designer.cs">
<DependentUpon>wAuditDemo.cs</DependentUpon>
</Compile>
<Compile Include="UI\wAutoClass.cs">
<SubType>Form</SubType>
</Compile>
......@@ -160,6 +179,12 @@
<Compile Include="wMain.Designer.cs">
<DependentUpon>wMain.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="MyCommon\controls\ucAudit.resx">
<DependentUpon>ucAudit.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MyCommon\controls\ucAuditNode.resx">
<DependentUpon>ucAuditNode.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MyCommon\wBasic.resx">
<DependentUpon>wBasic.cs</DependentUpon>
</EmbeddedResource>
......@@ -191,6 +216,9 @@
<EmbeddedResource Include="UI\wAppModelEdit.resx">
<DependentUpon>wAppModelEdit.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\wAuditDemo.resx">
<DependentUpon>wAuditDemo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\wAutoClass.resx">
<DependentUpon>wAutoClass.cs</DependentUpon>
</EmbeddedResource>
......@@ -288,5 +316,14 @@
<ItemGroup>
<None Include="Resources\测试.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\node_end.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\node_start.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\node_audit.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
namespace Tools.UI
{
partial class wAuditDemo
{
/// <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.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(wAuditDemo));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.dgvModules = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.panel1 = new System.Windows.Forms.Panel();
this.pbAuditFlow = new System.Windows.Forms.PictureBox();
this.tvAuditModules = new System.Windows.Forms.TreeView();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.tsbAdd = new System.Windows.Forms.ToolStripButton();
this.tsbDelete = new System.Windows.Forms.ToolStripButton();
this.tsbSave = new System.Windows.Forms.ToolStripButton();
this.tsbProperty = new System.Windows.Forms.ToolStripButton();
this.tsbRequire = new System.Windows.Forms.ToolStripButton();
this.tsbExit = new System.Windows.Forms.ToolStripButton();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.panel2 = new System.Windows.Forms.Panel();
this.lbInfo = new System.Windows.Forms.Label();
this.cmbLoginUser = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.ucAudit1 = new Tools.MyCommon.controls.ucAudit();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvModules)).BeginInit();
this.tabPage2.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbAuditFlow)).BeginInit();
this.toolStrip1.SuspendLayout();
this.tabPage3.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(800, 450);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.dgvModules);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(792, 424);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "审核开启";
this.tabPage1.UseVisualStyleBackColor = true;
//
// dgvModules
//
this.dgvModules.AllowUserToAddRows = false;
this.dgvModules.AllowUserToDeleteRows = false;
this.dgvModules.BackgroundColor = System.Drawing.SystemColors.Window;
this.dgvModules.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvModules.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2,
this.Column3});
this.dgvModules.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvModules.Location = new System.Drawing.Point(3, 3);
this.dgvModules.Name = "dgvModules";
this.dgvModules.RowTemplate.Height = 23;
this.dgvModules.Size = new System.Drawing.Size(786, 418);
this.dgvModules.TabIndex = 0;
//
// Column1
//
this.Column1.DataPropertyName = "ModuleName";
this.Column1.HeaderText = "模块名称";
this.Column1.Name = "Column1";
//
// Column2
//
this.Column2.DataPropertyName = "IsAudit";
this.Column2.HeaderText = "开启审核";
this.Column2.Name = "Column2";
this.Column2.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
//
// Column3
//
this.Column3.DataPropertyName = "AuditStartDateTime";
this.Column3.HeaderText = "审核开启时间";
this.Column3.Name = "Column3";
this.Column3.Resizable = System.Windows.Forms.DataGridViewTriState.True;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.panel1);
this.tabPage2.Controls.Add(this.tvAuditModules);
this.tabPage2.Controls.Add(this.toolStrip1);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(792, 424);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "审核流程设定";
this.tabPage2.UseVisualStyleBackColor = true;
//
// panel1
//
this.panel1.AutoScroll = true;
this.panel1.Controls.Add(this.pbAuditFlow);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(199, 28);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(590, 393);
this.panel1.TabIndex = 3;
//
// pbAuditFlow
//
this.pbAuditFlow.Dock = System.Windows.Forms.DockStyle.Left;
this.pbAuditFlow.Location = new System.Drawing.Point(0, 0);
this.pbAuditFlow.Name = "pbAuditFlow";
this.pbAuditFlow.Size = new System.Drawing.Size(590, 393);
this.pbAuditFlow.TabIndex = 2;
this.pbAuditFlow.TabStop = false;
//
// tvAuditModules
//
this.tvAuditModules.Dock = System.Windows.Forms.DockStyle.Left;
this.tvAuditModules.ImageIndex = 0;
this.tvAuditModules.ImageList = this.imageList1;
this.tvAuditModules.Location = new System.Drawing.Point(3, 28);
this.tvAuditModules.Name = "tvAuditModules";
this.tvAuditModules.SelectedImageIndex = 0;
this.tvAuditModules.Size = new System.Drawing.Size(196, 393);
this.tvAuditModules.TabIndex = 1;
//
// imageList1
//
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
this.imageList1.Images.SetKeyName(0, "tv2-deepblue.png");
this.imageList1.Images.SetKeyName(1, "tv6-black.png");
this.imageList1.Images.SetKeyName(2, "tv6-red.png");
//
// toolStrip1
//
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbAdd,
this.tsbDelete,
this.tsbSave,
this.tsbProperty,
this.tsbRequire,
this.tsbExit});
this.toolStrip1.Location = new System.Drawing.Point(3, 3);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(786, 25);
this.toolStrip1.TabIndex = 0;
this.toolStrip1.Text = "toolStrip1";
//
// tsbAdd
//
this.tsbAdd.Image = ((System.Drawing.Image)(resources.GetObject("tsbAdd.Image")));
this.tsbAdd.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbAdd.Name = "tsbAdd";
this.tsbAdd.Size = new System.Drawing.Size(76, 22);
this.tsbAdd.Text = "增加节点";
//
// tsbDelete
//
this.tsbDelete.Image = ((System.Drawing.Image)(resources.GetObject("tsbDelete.Image")));
this.tsbDelete.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbDelete.Name = "tsbDelete";
this.tsbDelete.Size = new System.Drawing.Size(76, 22);
this.tsbDelete.Text = "删除节点";
//
// tsbSave
//
this.tsbSave.Image = ((System.Drawing.Image)(resources.GetObject("tsbSave.Image")));
this.tsbSave.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbSave.Name = "tsbSave";
this.tsbSave.Size = new System.Drawing.Size(76, 22);
this.tsbSave.Text = "流程保存";
//
// tsbProperty
//
this.tsbProperty.Image = ((System.Drawing.Image)(resources.GetObject("tsbProperty.Image")));
this.tsbProperty.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbProperty.Name = "tsbProperty";
this.tsbProperty.Size = new System.Drawing.Size(76, 22);
this.tsbProperty.Text = "节点属性";
//
// tsbRequire
//
this.tsbRequire.Image = ((System.Drawing.Image)(resources.GetObject("tsbRequire.Image")));
this.tsbRequire.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbRequire.Name = "tsbRequire";
this.tsbRequire.Size = new System.Drawing.Size(76, 22);
this.tsbRequire.Text = "审核条件";
//
// tsbExit
//
this.tsbExit.Image = ((System.Drawing.Image)(resources.GetObject("tsbExit.Image")));
this.tsbExit.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbExit.Name = "tsbExit";
this.tsbExit.Size = new System.Drawing.Size(52, 22);
this.tsbExit.Text = "退出";
//
// tabPage3
//
this.tabPage3.Controls.Add(this.ucAudit1);
this.tabPage3.Controls.Add(this.panel2);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(792, 424);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "审批处理";
this.tabPage3.UseVisualStyleBackColor = true;
//
// panel2
//
this.panel2.Controls.Add(this.lbInfo);
this.panel2.Controls.Add(this.cmbLoginUser);
this.panel2.Controls.Add(this.label1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(792, 35);
this.panel2.TabIndex = 1;
//
// lbInfo
//
this.lbInfo.AutoSize = true;
this.lbInfo.Location = new System.Drawing.Point(313, 12);
this.lbInfo.Name = "lbInfo";
this.lbInfo.Size = new System.Drawing.Size(41, 12);
this.lbInfo.TabIndex = 2;
this.lbInfo.Text = "label2";
//
// cmbLoginUser
//
this.cmbLoginUser.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbLoginUser.FormattingEnabled = true;
this.cmbLoginUser.Location = new System.Drawing.Point(79, 9);
this.cmbLoginUser.Name = "cmbLoginUser";
this.cmbLoginUser.Size = new System.Drawing.Size(146, 20);
this.cmbLoginUser.TabIndex = 1;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(8, 12);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 0;
this.label1.Text = "登录用户:";
//
// ucAudit1
//
this.ucAudit1.DataSource = null;
this.ucAudit1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucAudit1.Location = new System.Drawing.Point(0, 35);
this.ucAudit1.Name = "ucAudit1";
this.ucAudit1.Size = new System.Drawing.Size(792, 389);
this.ucAudit1.TabIndex = 2;
//
// wAuditDemo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.tabControl1);
this.Name = "wAuditDemo";
this.Text = "wAuditDemo";
this.Load += new System.EventHandler(this.wAuditDemo_Load);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvModules)).EndInit();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pbAuditFlow)).EndInit();
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.tabPage3.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.DataGridView dgvModules;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.PictureBox pbAuditFlow;
private System.Windows.Forms.TreeView tvAuditModules;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.ToolStripButton tsbAdd;
private System.Windows.Forms.ToolStripButton tsbDelete;
private System.Windows.Forms.ToolStripButton tsbProperty;
private System.Windows.Forms.ToolStripButton tsbRequire;
private System.Windows.Forms.ToolStripButton tsbExit;
private System.Windows.Forms.ToolStripButton tsbSave;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewCheckBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.ComboBox cmbLoginUser;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lbInfo;
private MyCommon.controls.ucAudit ucAudit1;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
//
using Tools.MyCommon;
using Tools.MyCommon.controls;
using Tools.MyData;
using Tools.MyUtils;
namespace Tools.UI
{
public partial class wAuditDemo : wEditBasic
{
/// <summary>
/// 模块信息
/// </summary>
DataTable _dt = null;
/// <summary>
/// 审核信息
/// </summary>
DataSet _dsAudit = null;
/// <summary>
/// 模块信息-暂存XML路径
/// </summary>
string ModulesXmlPath = $@"{Utils.TempPath}\audit_demo_modules.xml";
/// <summary>
/// 流程信息-暂存XML路径
/// </summary>
string FlowMapXmlPath = $@"{Utils.TempPath}\audit_demo_flowmap.xml";
/// <summary>
/// 审批信息-暂存xml路径
/// </summary>
string AuditingXmlPath = $@"{Utils.TempPath}\audit_demo_auditing.xml";
public wAuditDemo()
{
InitializeComponent();
}
private void wAuditDemo_Load(object sender, EventArgs e)
{
this.InitData();
this.InitUI();
}
public override void InitData()
{
#region 初始化数据库对象
string link = Utils.GetLinkString("192.168.1.204", "sa", "sa", "FTT_PDM");
this.InitDBHelper(link);
#endregion
#region 初始化模块信息
if (File.Exists(this.ModulesXmlPath))
{
#region 读取暂存信息
this._dt = new DataTable();
this._dt.ReadXml(this.ModulesXmlPath);
#endregion
}
else
{
#region 创建默认结构
this._dt = new DataTable()
{
TableName = "demo",
Columns = {
{ "ID", typeof(int) },
{ "PrevID", typeof(int) },
{ "ModuleName", typeof(string) },
{ "IsAudit", typeof(bool) },
{ "AuditStartDateTime", typeof(string) },
},
Rows = {
{ 1, 0, "模块1", true, Utils.Now() },
{ 2, 0, "模块2", true, Utils.Now() },
{ 3, 0, "模块3", false, DBNull.Value },
},
};
#endregion
}
#endregion
#region 初始化流程信息
if (File.Exists(this.FlowMapXmlPath))
{
#region 读取暂存信息
this._ds = new DataSet();
this._ds.ReadXml(this.FlowMapXmlPath);
#endregion
}
else
{
#region 创建默认结构
List<TQuery> list = new List<TQuery> {
//new TQuery("VF_FlowMap", "SELECT TOP 0 ID, VerificationFlowType AS ModelID, IsRuning, StartEndAuditing, EndAuditingPassword FROM dbo.VF_FlowMap"),
new TQuery("VF_FlowMapNode", "SELECT TOP 0 '' AS iGuid, 0 AS ModelID, Name, 0 AS IndexNumber, '' as Location, '' as AuditUser FROM dbo.VF_FlowMapNode"),
new TQuery("VF_FlowMapNodeUser", "SELECT TOP 0 '' AS ParentGuid, UserID FROM dbo.VF_FlowMapNodeUser"),
};
this._ds = this._db.GetData(list, false);
#endregion
}
#endregion
#region 初始化审批信息
if (File.Exists(this.AuditingXmlPath))
{
#region 读取暂存信息
this._dsAudit = new DataSet();
this._dsAudit.ReadXml(this.AuditingXmlPath);
#endregion
}
else
{
#region 创建默认结构
List<TQuery> list = new List<TQuery> {
//new TQuery("VF_DataInFlow"),
new TQuery("VF_AuditingText", "SELECT TOP 0 0 AS ModelID,0 AS KeyID, '' as MapNodeGuid,'' as WaitAuditUser, '' as AuditRemark, '' as AuditDateTime,'' AuditUser, 0 AS AuditState FROM dbo.VF_AuditingText"),
};
this._dsAudit = this._db.GetData(list, false);
#endregion
}
#endregion
}
public override void InitUI()
{
this.dgvModules.AutoGenerateColumns = false;
this.dgvModules.DataSource = this._dt.DefaultView;
this.dgvModules.CellValueChanged += DgvModules_CellValueChanged;
this.tabControl1.SelectedIndexChanged += TabControl1_SelectedIndexChanged;
this.tvAuditModules.AfterSelect += TvAuditModules_AfterSelect;
this.pbAuditFlow.Paint += PbAuditFlow_Paint;
this.cmbLoginUser.SelectedIndexChanged += CmbLoginUser_SelectedIndexChanged;
}
public override bool Save()
{
this._dt.WriteXml(this.ModulesXmlPath);
this._ds.WriteXml(this.FlowMapXmlPath);
this._dsAudit.WriteXml(this.AuditingXmlPath);
return true;
}
private void DgvModules_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
int RowIndex = this.dgvModules.CurrentRow.Index;
DataRowView drv = this._dt.DefaultView[RowIndex];
bool IsAudit = drv["IsAudit"].ToString().ToLower() == "true";
drv["AuditStartDateTime"] = IsAudit ? Utils.Now() : "";
drv.EndEdit();
}
bool IsIniting = false;
private void TabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.tabControl1.SelectedTab == this.tabPage2)
{
this.InitTreeView();
}
else if (this.tabControl1.SelectedTab == this.tabPage3)
{
if (this.IsIniting)
return;
try
{
this.IsIniting = true;
//实际这里的操作是将FlowMapNode表与AuditingText左连得到,这里通过克隆模拟
DataTable dt = this._dsAudit.Tables["VF_AuditingText"].Clone();
//复制审批节点信息
DataTable dtMapNode = this._ds.Tables["VF_FlowMapNode"];
string AuditUsers = "";
for (int i = 1; i < dtMapNode.DefaultView.Count - 1; i++) //去掉首尾行,即开始和结束节点
{
DataRowView drv = dtMapNode.DefaultView[i];
DataRow drNew = dt.NewRow();
drNew["ModelID"] = drv["ModelID"];
drNew["WaitAuditUser"] = drv["AuditUser"];
drNew["MapNodeGuid"] = drv["iGuid"];
drNew["AuditState"] = 0; //0:待审; 1:通过; 2:不通过; 3:返审
drNew.EndEdit();
dt.Rows.Add(drNew);
//收集待审人
AuditUsers += $";{drv["AuditUser"]}";
}
//模拟不同人员登录
this.cmbLoginUser.Items.AddRange(AuditUsers.Split(';').Distinct().ToArray());
this.cmbLoginUser.SelectedIndex = 0;
//绑定审批数据源
this.ucAudit1.DataSource = dt;
}
catch (Exception ex)
{
Utils.Tip(ex.Message);
}
finally
{
this.IsIniting = false;
}
}
}
private void InitTreeView()
{
this.tvAuditModules.Nodes.Clear();
TreeNode node = new TreeNode("审核设置", 0, 0);
DataRow[] rows = this._dt.Select("IsAudit = 1");
foreach (DataRow r in rows)
{
node.Nodes.Add(r["ID"].ToString(), r["ModuleName"].ToString(), 1, 2);
}
this.tvAuditModules.Nodes.Add(node);
this.tvAuditModules.ExpandAll();
}
private void TvAuditModules_AfterSelect(object sender, TreeViewEventArgs e)
{
//获取节点主键
TreeNode node = e.Node;
int key = string.IsNullOrEmpty(node.Name) ? 0 : Convert.ToInt32(node.Name);
DataTable dt = this._ds.Tables["VF_FlowMapNode"];
dt.DefaultView.RowFilter = $"ModelID={key}";
dt.DefaultView.Sort = "IndexNumber";
//如果没有节点,默认加开始和结束节点
if (key > 0 && dt.DefaultView.Count == 0)
{
int index = 0;
this.AddRow(dt, key, index++, "开始");
this.AddRow(dt, key, index++, "审核节点1");
this.AddRow(dt, key, index++, "审核节点2");
this.AddRow(dt, key, index++, "审核节点3");
if (key == 1)
{
this.AddRow(dt, key, index++, "审核节点4");
this.AddRow(dt, key, index++, "审核节点5");
this.AddRow(dt, key, index++, "审核节点6");
this.AddRow(dt, key, index++, "审核节点7");
}
this.AddRow(dt, key, index++, "结束");
}
//刷新图片框
this.pbAuditFlow.Refresh();
}
private void AddRow(DataTable dt, int key, int index, string name)
{
DataRow drNew = dt.NewRow();
drNew["ModelID"] = key;
drNew["IndexNumber"] = index;
drNew["Name"] = name;
drNew["iGuid"] = Guid.NewGuid();
drNew["AuditUser"] = this.GetAuditUser(index);
drNew.EndEdit();
dt.Rows.Add(drNew);
}
private string GetAuditUser(int index)
{
string result = "";
switch (index)
{
case 1: result = "王覃欢;黄秀丽"; break;
case 2: result = "罗显方"; break;
case 3: result = "黄总监"; break;
case 4: result = "吴副总;许总"; break;
default: result = "管理员"; break;
}
return result;
}
private void PbAuditFlow_Paint(object sender, PaintEventArgs e)
{
//绘制流程图
DataTable dt = this._ds.Tables["VF_FlowMapNode"];
int realWidth = DrawHelper.DrawFlowNode(e.Graphics, dt);
this.pbAuditFlow.Width = realWidth;
}
private void CmbLoginUser_SelectedIndexChanged(object sender, EventArgs e)
{
Utils.LoginUser = this.cmbLoginUser.Text;
this.ucAudit1.RefreshNode();
}
}
}
<?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="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>127, 17</value>
</metadata>
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADW
CAAAAk1TRnQBSQFMAgEBAwEAAUgBAAFIAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/8MAAfECZQLxAmUC8QJl
AfEIAAHsAQAB8wHsDAABbwEAAfMBFhgADAcHAAHxAREB7AIHAfQKAAEbASUBbwIaAf8XAAwHBQAB/wHz
AQAC7AHrAZIBAAHzAf8GAAH/AfMBAAIWAW8BkwEAAfMB/xUADAcFAAHsAQcB/wHyARIBbQHwAf8BBwHs
BgABbwEaAf8B8wFGAW8BGgH/ARoBbxYAAbUBZQIAAbUBZQIAAbUBZQYABBEB7AH3BBEGAAQlAW8BkwQl
FgABBwhlAQcGAAHvAhEBBwIRAQcCEQHvBgABkwIlARoCJQEaAiUBkxgAAfMEBwHzCQAB8wH/AfACEQHw
Af8B8wgAAfMB/wEaAiUBGgH/AfMZAAGuAmUBiwFlAa4LAAHzAhEB8wwAAfMCJQHzGwABrgRlAa4MAAJt
DgACTBwAAQcErgEHDAAC8A4AAhrXAAFCAU0BPgcAAT4DAAEoAwABQAMAARADAAEBAQABAQUAAYAXAAP/
AQAG/wIABv8CAAb/AgABwAEDAf0BPwH9AT8CAAHAAQMB+AEfAfgBHwIAAcABAwHkAScB5AEnAgABwAED
AeABBwHgAQcCAAHmAWcB4AEHAeABBwIAAeABBwHgAQcB4AEHAgAB+AEfAfABDwHwAQ8CAAH4AR8B/AE/
AfwBPwIAAfgBHwH+AX8B/gF/AgAB+AEfAf4BfwH+AX8CAAb/AgAG/wIABv8CAAs=
</value>
</data>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tsbAdd.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbDelete.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbProperty.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbRequire.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="tsbExit.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
</root>
\ No newline at end of file
......@@ -29,6 +29,7 @@ namespace Tools
this.CreateModule(typeof(UI.wAppModel), "APP模块管理"),
this.CreateModule(typeof(UI.wSysModule), "功能模块管理"),
this.CreateModule(typeof(UI.wAutoClass), "类生成工具"),
this.CreateModule(typeof(UI.wAuditDemo), "审批示例"),
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment