📄 flowmodeldef.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using WorkFlow.user;
using WorkFlow.util;
namespace WorkFlow.flow
{
/// <summary>
/// FlowManager 的摘要说明。
/// </summary>
public class FlowModelDef : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tbFlowName;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox tbStepName;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.ListBox lbDepList;
private System.Windows.Forms.ListBox lbUserList;
private System.Windows.Forms.Label label3;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
private SqlConnection conn;
private System.Windows.Forms.TreeView DepTree;
private Hashtable depHash;
private System.Windows.Forms.ContextMenu contextMenu1;
private System.Windows.Forms.ContextMenu contextMenu2;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private Hashtable userHash;
private int step = 1;
private System.Windows.Forms.Button btnNext;
private System.Windows.Forms.Button btnConfirm;
private System.Windows.Forms.Button btnClose;
private ArrayList sqlList = new ArrayList();
private System.Windows.Forms.TextBox tbStepSeq;
private System.Windows.Forms.CheckBox cbNeed;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private int flowid = 0;
public FlowModelDef()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.tbFlowName = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label6 = new System.Windows.Forms.Label();
this.tbStepSeq = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.button3 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.lbUserList = new System.Windows.Forms.ListBox();
this.contextMenu2 = new System.Windows.Forms.ContextMenu();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.lbDepList = new System.Windows.Forms.ListBox();
this.contextMenu1 = new System.Windows.Forms.ContextMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.DepTree = new System.Windows.Forms.TreeView();
this.cbNeed = new System.Windows.Forms.CheckBox();
this.tbStepName = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.btnNext = new System.Windows.Forms.Button();
this.btnConfirm = new System.Windows.Forms.Button();
this.btnClose = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox5.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(56, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(66, 17);
this.label1.TabIndex = 0;
this.label1.Text = "模板名称:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// tbFlowName
//
this.tbFlowName.Location = new System.Drawing.Point(152, 20);
this.tbFlowName.Name = "tbFlowName";
this.tbFlowName.Size = new System.Drawing.Size(208, 21);
this.tbFlowName.TabIndex = 1;
this.tbFlowName.Text = "";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.tbStepSeq);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Controls.Add(this.cbNeed);
this.groupBox1.Controls.Add(this.tbStepName);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Location = new System.Drawing.Point(2, 64);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(588, 368);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "模板步骤信息:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(136, 42);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(17, 17);
this.label6.TabIndex = 7;
this.label6.Text = "步";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// tbStepSeq
//
this.tbStepSeq.BackColor = System.Drawing.Color.Ivory;
this.tbStepSeq.ForeColor = System.Drawing.Color.Red;
this.tbStepSeq.Location = new System.Drawing.Point(104, 40);
this.tbStepSeq.Name = "tbStepSeq";
this.tbStepSeq.ReadOnly = true;
this.tbStepSeq.Size = new System.Drawing.Size(24, 21);
this.tbStepSeq.TabIndex = 6;
this.tbStepSeq.Text = "1";
this.tbStepSeq.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(16, 42);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(85, 17);
this.label5.TabIndex = 5;
this.label5.Text = "步骤次序: 第";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.button4);
this.groupBox2.Controls.Add(this.button3);
this.groupBox2.Controls.Add(this.button2);
this.groupBox2.Controls.Add(this.button1);
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.groupBox5);
this.groupBox2.Controls.Add(this.groupBox4);
this.groupBox2.Controls.Add(this.groupBox3);
this.groupBox2.Location = new System.Drawing.Point(16, 80);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(560, 280);
this.groupBox2.TabIndex = 4;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "选择可操作此步骤人员:";
//
// button3
//
this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.button3.Location = new System.Drawing.Point(336, 152);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(48, 23);
this.button3.TabIndex = 6;
this.button3.Text = "全部>";
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button2
//
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.button2.Location = new System.Drawing.Point(336, 112);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(48, 23);
this.button2.TabIndex = 5;
this.button2.Text = "<<<";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button1
//
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.button1.Location = new System.Drawing.Point(336, 72);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(48, 23);
this.button1.TabIndex = 4;
this.button1.Text = ">>>";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label3.ForeColor = System.Drawing.SystemColors.ControlText;
this.label3.Location = new System.Drawing.Point(150, 136);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(23, 17);
this.label3.TabIndex = 3;
this.label3.Text = "->";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// groupBox5
//
this.groupBox5.Controls.Add(this.lbUserList);
this.groupBox5.Location = new System.Drawing.Point(400, 16);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(152, 256);
this.groupBox5.TabIndex = 2;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "操作人员列表:";
//
// lbUserList
//
this.lbUserList.ContextMenu = this.contextMenu2;
this.lbUserList.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbUserList.ItemHeight = 12;
this.lbUserList.Location = new System.Drawing.Point(3, 17);
this.lbUserList.Name = "lbUserList";
this.lbUserList.Size = new System.Drawing.Size(146, 232);
this.lbUserList.TabIndex = 0;
//
// contextMenu2
//
this.contextMenu2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem3,
this.menuItem4});
//
// menuItem3
//
this.menuItem3.Index = 0;
this.menuItem3.Text = "移除该用户";
this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
//
// menuItem4
//
this.menuItem4.Index = 1;
this.menuItem4.Text = "全部移除";
this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
//
// groupBox4
//
this.groupBox4.Controls.Add(this.lbDepList);
this.groupBox4.Location = new System.Drawing.Point(176, 16);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(152, 256);
this.groupBox4.TabIndex = 1;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "部门人员列表:";
//
// lbDepList
//
this.lbDepList.ContextMenu = this.contextMenu1;
this.lbDepList.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbDepList.ItemHeight = 12;
this.lbDepList.Location = new System.Drawing.Point(3, 17);
this.lbDepList.Name = "lbDepList";
this.lbDepList.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
this.lbDepList.Size = new System.Drawing.Size(146, 232);
this.lbDepList.TabIndex = 0;
//
// contextMenu1
//
this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1,
this.menuItem2});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.Text = "加入该用户";
this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
//
// menuItem2
//
this.menuItem2.Index = 1;
this.menuItem2.Text = "全部加入";
this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
//
// groupBox3
//
this.groupBox3.Controls.Add(this.DepTree);
this.groupBox3.Location = new System.Drawing.Point(8, 17);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(136, 256);
this.groupBox3.TabIndex = 0;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "部门列表:";
//
// DepTree
//
this.DepTree.Dock = System.Windows.Forms.DockStyle.Fill;
this.DepTree.ImageIndex = -1;
this.DepTree.Location = new System.Drawing.Point(3, 17);
this.DepTree.Name = "DepTree";
this.DepTree.SelectedImageIndex = -1;
this.DepTree.Size = new System.Drawing.Size(130, 236);
this.DepTree.TabIndex = 0;
this.DepTree.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.DepTree_AfterSelect);
//
// cbNeed
//
this.cbNeed.Enabled = false;
this.cbNeed.Location = new System.Drawing.Point(432, 40);
this.cbNeed.Name = "cbNeed";
this.cbNeed.Size = new System.Drawing.Size(128, 24);
this.cbNeed.TabIndex = 3;
this.cbNeed.Text = "是否需要强制关系";
this.cbNeed.Visible = false;
//
// tbStepName
//
this.tbStepName.Location = new System.Drawing.Point(248, 40);
this.tbStepName.Name = "tbStepName";
this.tbStepName.Size = new System.Drawing.Size(160, 21);
this.tbStepName.TabIndex = 2;
this.tbStepName.Text = "";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(176, 42);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(66, 17);
this.label2.TabIndex = 1;
this.label2.Text = "步骤名称:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnNext
//
this.btnNext.BackColor = System.Drawing.SystemColors.Control;
this.btnNext.Location = new System.Drawing.Point(80, 444);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(112, 23);
this.btnNext.TabIndex = 3;
this.btnNext.Text = "定义流程下一步";
this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
//
// btnConfirm
//
this.btnConfirm.BackColor = System.Drawing.SystemColors.Control;
this.btnConfirm.Location = new System.Drawing.Point(248, 445);
this.btnConfirm.Name = "btnConfirm";
this.btnConfirm.Size = new System.Drawing.Size(112, 23);
this.btnConfirm.TabIndex = 4;
this.btnConfirm.Text = "完成流程模板定义";
this.btnConfirm.Click += new System.EventHandler(this.btnConfirm_Click);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -