📄 frmsearch.cs
字号:
namespace Client // Copyright 2001 Dreamtech Software India Inc.
{ // All rights reserved
using System; // Provides the basic functionality of .NET
using System.Drawing; // Provides the Drawing features, Used for cursors
using System.Windows.Forms; // Provides the darwing of buttons, listviews etc
using System.Collections; // Provides the different type of class collections
using System.ComponentModel;// Provides the facility of using components
/// <summary>
/// Summary description for frmSearch.
/// </summary>
public class frmSearch : System.Windows.Forms.Form
{
private System.ComponentModel.IContainer components;
public System.Windows.Forms.TextBox txtSearchFor;
public System.Windows.Forms.Label lblSearchFor;
private System.Windows.Forms.ToolTip toolTipText;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnSearch;
public System.Windows.Forms.TextBox txtSearchOn;
public System.Windows.Forms.Label lblSearchOn;
/// <summary>
/// The below variables are user defined variables
/// used to store various transient values.
/// </summary>
public string SearchOn; // Stores the value for first search scope
public string SearchFor;
private System.Windows.Forms.Label lblCopyright; // Stores the value for second search scope
public bool bFlag; // Determines whether to perform SearchOn validation or not
/// <summary>
/// Default constructor of the class
/// </summary>
public frmSearch()
{
//
// Required for Windows Form Designer support
//
InitializeComponent(); // auto generated line by the IDE
}
/// <summary>
/// Clean up any resources being used.
/// This function is auto generated by the IDE
/// </summary>
public override void Dispose()
{
base.Dispose();
components.Dispose();
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// This function is auto generated by the IDE
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.lblSearchFor = new System.Windows.Forms.Label();
this.toolTipText = new System.Windows.Forms.ToolTip(this.components);
this.txtSearchOn = new System.Windows.Forms.TextBox();
this.txtSearchFor = new System.Windows.Forms.TextBox();
this.btnSearch = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.lblSearchOn = new System.Windows.Forms.Label();
this.lblCopyright = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblSearchFor
//
this.lblSearchFor.Location = new System.Drawing.Point(13, 55);
this.lblSearchFor.Name = "lblSearchFor";
this.lblSearchFor.Size = new System.Drawing.Size(63, 13);
this.lblSearchFor.TabIndex = 4;
this.lblSearchFor.Text = "Search for :";
//
// txtSearchOn
//
this.txtSearchOn.Enabled = false;
this.txtSearchOn.Location = new System.Drawing.Point(80, 26);
this.txtSearchOn.Name = "txtSearchOn";
this.txtSearchOn.Size = new System.Drawing.Size(199, 20);
this.txtSearchOn.TabIndex = 0;
this.txtSearchOn.Text = "";
this.toolTipText.SetToolTip(this.txtSearchOn, "Write the search criteria here (For ex: *, A* or HAR* etc. for matching computer" +
"names)");
//
// txtSearchFor
//
this.txtSearchFor.Location = new System.Drawing.Point(80, 53);
this.txtSearchFor.Name = "txtSearchFor";
this.txtSearchFor.Size = new System.Drawing.Size(199, 20);
this.txtSearchFor.TabIndex = 1;
this.txtSearchFor.Text = "";
this.toolTipText.SetToolTip(this.txtSearchFor, "Write the search criteria here (For ex: *, A* or HAR* etc. for matching Filename" +
"s)");
//
// btnSearch
//
this.btnSearch.BackColor = System.Drawing.Color.Chocolate;
this.btnSearch.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnSearch.ForeColor = System.Drawing.Color.White;
this.btnSearch.Location = new System.Drawing.Point(79, 88);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(90, 32);
this.btnSearch.TabIndex = 2;
this.btnSearch.Text = "&Search";
this.toolTipText.SetToolTip(this.btnSearch, "Performs search operation");
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// btnCancel
//
this.btnCancel.BackColor = System.Drawing.Color.Chocolate;
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnCancel.ForeColor = System.Drawing.Color.White;
this.btnCancel.Location = new System.Drawing.Point(189, 88);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(90, 32);
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "&Cancel";
this.toolTipText.SetToolTip(this.btnCancel, "Cancel the search and close this window");
//
// lblSearchOn
//
this.lblSearchOn.Enabled = false;
this.lblSearchOn.Location = new System.Drawing.Point(13, 28);
this.lblSearchOn.Name = "lblSearchOn";
this.lblSearchOn.Size = new System.Drawing.Size(63, 13);
this.lblSearchOn.TabIndex = 0;
this.lblSearchOn.Text = "Search on :";
//
// lblCopyright
//
this.lblCopyright.Location = new System.Drawing.Point(93, 5);
this.lblCopyright.Name = "lblCopyright";
this.lblCopyright.Size = new System.Drawing.Size(192, 14);
this.lblCopyright.TabIndex = 5;
this.lblCopyright.Text = "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -