📄 frmfindnode.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using DataAccessLayer;
using System.Data;
using PublicUIComponent;
namespace PersonalInfo
{
/// <summary>
/// frmFindNode 的摘要说明。
/// </summary>
public class frmFindNode : System.Windows.Forms.Form
{
#region Windows 窗体设计器生成的代码
private PublicUIComponent.SuperComboBox scboFindCategory;
private System.Windows.Forms.TextBox txtFind;
private System.Windows.Forms.TextBox txtFilter;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.Button btnFind;
private System.Windows.Forms.Button btnClearFilter;
private System.Windows.Forms.Button btnMovePrev;
private System.Windows.Forms.Button btnMoveNext;
private System.Windows.Forms.Button btnMoveLast;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnMoveFirst;
private System.Windows.Forms.Button btnLocateNodeInTree;
private System.Windows.Forms.DataGridTableStyle dataGridTableStyle1;
private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public frmFindNode()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmFindNode));
this.scboFindCategory = new PublicUIComponent.SuperComboBox();
this.txtFind = new System.Windows.Forms.TextBox();
this.txtFilter = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.dataGridTableStyle1 = new System.Windows.Forms.DataGridTableStyle();
this.dataGridTextBoxColumn1 = new System.Windows.Forms.DataGridTextBoxColumn();
this.btnFind = new System.Windows.Forms.Button();
this.btnClearFilter = new System.Windows.Forms.Button();
this.btnMovePrev = new System.Windows.Forms.Button();
this.btnMoveNext = new System.Windows.Forms.Button();
this.btnMoveLast = new System.Windows.Forms.Button();
this.btnClose = new System.Windows.Forms.Button();
this.btnMoveFirst = new System.Windows.Forms.Button();
this.btnLocateNodeInTree = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.SuspendLayout();
//
// scboFindCategory
//
this.scboFindCategory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.scboFindCategory.Location = new System.Drawing.Point(152, 8);
this.scboFindCategory.Name = "scboFindCategory";
this.scboFindCategory.Size = new System.Drawing.Size(272, 20);
this.scboFindCategory.TabIndex = 0;
this.scboFindCategory.SelectedIndexChanged += new System.EventHandler(this.scboFindCategory_SelectedIndexChanged);
//
// txtFind
//
this.txtFind.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtFind.Location = new System.Drawing.Point(152, 40);
this.txtFind.Name = "txtFind";
this.txtFind.Size = new System.Drawing.Size(272, 21);
this.txtFind.TabIndex = 1;
this.txtFind.Text = "";
//
// txtFilter
//
this.txtFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtFilter.Location = new System.Drawing.Point(152, 72);
this.txtFilter.Name = "txtFilter";
this.txtFilter.Size = new System.Drawing.Size(272, 21);
this.txtFilter.TabIndex = 1;
this.txtFilter.Text = "";
this.txtFilter.TextChanged += new System.EventHandler(this.txtFilter_TextChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Location = new System.Drawing.Point(16, 10);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(91, 17);
this.label1.TabIndex = 2;
this.label1.Text = "选择查找种类:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Location = new System.Drawing.Point(16, 42);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(103, 17);
this.label2.TabIndex = 2;
this.label2.Text = "在数据库中查找:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Location = new System.Drawing.Point(16, 74);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(116, 17);
this.label3.TabIndex = 2;
this.label3.Text = "在当前网格中查找:";
//
// dataGrid1
//
this.dataGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(12, 101);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.ReadOnly = true;
this.dataGrid1.Size = new System.Drawing.Size(464, 160);
this.dataGrid1.TabIndex = 3;
this.dataGrid1.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] {
this.dataGridTableStyle1});
//
// dataGridTableStyle1
//
this.dataGridTableStyle1.DataGrid = this.dataGrid1;
this.dataGridTableStyle1.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] {
this.dataGridTextBoxColumn1});
this.dataGridTableStyle1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGridTableStyle1.MappingName = "TreeNodes";
//
// dataGridTextBoxColumn1
//
this.dataGridTextBoxColumn1.Format = "";
this.dataGridTextBoxColumn1.FormatInfo = null;
this.dataGridTextBoxColumn1.HeaderText = "节点路径";
this.dataGridTextBoxColumn1.MappingName = "NodePath";
this.dataGridTextBoxColumn1.Width = 500;
//
// btnFind
//
this.btnFind.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnFind.BackColor = System.Drawing.Color.Transparent;
this.btnFind.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnFind.Location = new System.Drawing.Point(432, 40);
this.btnFind.Name = "btnFind";
this.btnFind.Size = new System.Drawing.Size(40, 24);
this.btnFind.TabIndex = 4;
this.btnFind.Text = "执行";
this.btnFind.Click += new System.EventHandler(this.btnFind_Click);
//
// btnClearFilter
//
this.btnClearFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnClearFilter.BackColor = System.Drawing.Color.Transparent;
this.btnClearFilter.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClearFilter.Location = new System.Drawing.Point(432, 72);
this.btnClearFilter.Name = "btnClearFilter";
this.btnClearFilter.Size = new System.Drawing.Size(40, 24);
this.btnClearFilter.TabIndex = 4;
this.btnClearFilter.Text = "清空";
this.btnClearFilter.Click += new System.EventHandler(this.btnClearFilter_Click);
//
// btnMovePrev
//
this.btnMovePrev.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnMovePrev.BackColor = System.Drawing.Color.Transparent;
this.btnMovePrev.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMovePrev.Location = new System.Drawing.Point(165, 272);
this.btnMovePrev.Name = "btnMovePrev";
this.btnMovePrev.Size = new System.Drawing.Size(40, 24);
this.btnMovePrev.TabIndex = 5;
this.btnMovePrev.Text = "<";
this.btnMovePrev.Click += new System.EventHandler(this.btnMovePrev_Click);
//
// btnMoveNext
//
this.btnMoveNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnMoveNext.BackColor = System.Drawing.Color.Transparent;
this.btnMoveNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMoveNext.Location = new System.Drawing.Point(218, 272);
this.btnMoveNext.Name = "btnMoveNext";
this.btnMoveNext.Size = new System.Drawing.Size(40, 24);
this.btnMoveNext.TabIndex = 5;
this.btnMoveNext.Text = ">";
this.btnMoveNext.Click += new System.EventHandler(this.btnMoveNext_Click);
//
// btnMoveLast
//
this.btnMoveLast.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnMoveLast.BackColor = System.Drawing.Color.Transparent;
this.btnMoveLast.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMoveLast.Location = new System.Drawing.Point(271, 272);
this.btnMoveLast.Name = "btnMoveLast";
this.btnMoveLast.Size = new System.Drawing.Size(40, 24);
this.btnMoveLast.TabIndex = 5;
this.btnMoveLast.Text = ">|";
this.btnMoveLast.Click += new System.EventHandler(this.btnMoveLast_Click);
//
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClose.BackColor = System.Drawing.Color.Transparent;
this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClose.Location = new System.Drawing.Point(424, 272);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(56, 24);
this.btnClose.TabIndex = 5;
this.btnClose.Text = "关闭";
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// btnMoveFirst
//
this.btnMoveFirst.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnMoveFirst.BackColor = System.Drawing.Color.Transparent;
this.btnMoveFirst.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMoveFirst.Location = new System.Drawing.Point(112, 272);
this.btnMoveFirst.Name = "btnMoveFirst";
this.btnMoveFirst.Size = new System.Drawing.Size(40, 24);
this.btnMoveFirst.TabIndex = 5;
this.btnMoveFirst.Text = "|<";
this.btnMoveFirst.Click += new System.EventHandler(this.btnMoveFirst_Click);
//
// btnLocateNodeInTree
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -