frmSearch.cs
上传用户:hkhxjs
上传日期:2008-11-25
资源大小:155k
文件大小:8k
源码类别:

Internet/网络编程

开发平台:

C#

  1. namespace Client // Copyright 2001 Dreamtech Software India Inc.
  2. { // All rights reserved
  3.     using System; // Provides the basic functionality of .NET
  4. using System.Drawing; // Provides the Drawing features, Used for cursors
  5.     using System.Windows.Forms; // Provides the darwing of buttons, listviews etc
  6. using System.Collections; // Provides the different type of class collections
  7.     using System.ComponentModel;// Provides the facility of using components
  8. /// <summary>
  9.     ///    Summary description for frmSearch.
  10.     /// </summary>
  11.     public class frmSearch : System.Windows.Forms.Form
  12.     {
  13. private System.ComponentModel.IContainer components;
  14. public System.Windows.Forms.TextBox txtSearchFor;
  15. public System.Windows.Forms.Label lblSearchFor;
  16. private System.Windows.Forms.ToolTip toolTipText;
  17. private System.Windows.Forms.Button btnCancel;
  18. private System.Windows.Forms.Button btnSearch;
  19. public System.Windows.Forms.TextBox txtSearchOn;
  20. public System.Windows.Forms.Label lblSearchOn;
  21. /// <summary>
  22. /// The below variables are user defined variables
  23. /// used to store various transient values.
  24. /// </summary>
  25. public string SearchOn; // Stores the value for first search scope
  26. public string SearchFor;
  27. private System.Windows.Forms.Label lblCopyright; // Stores the value for second search scope
  28. public bool bFlag; // Determines whether to perform SearchOn validation or not
  29. /// <summary>
  30.         /// Default constructor of the class
  31.         /// </summary>
  32. public frmSearch()
  33.         {
  34.             //
  35.             // Required for Windows Form Designer support
  36.             //
  37.             InitializeComponent(); // auto generated line by the IDE
  38.         }
  39.         /// <summary>
  40.         ///    Clean up any resources being used.
  41.         ///    This function is auto generated by the IDE
  42.         /// </summary>
  43.         public override void Dispose()
  44.         {
  45.             base.Dispose();
  46.             components.Dispose();
  47.         }
  48.         /// <summary>
  49.         ///    Required method for Designer support - do not modify
  50.         ///    the contents of this method with the code editor.
  51.         ///    This function is auto generated by the IDE
  52.         /// </summary>
  53.         private void InitializeComponent()
  54. {
  55. this.components = new System.ComponentModel.Container();
  56. this.lblSearchFor = new System.Windows.Forms.Label();
  57. this.toolTipText = new System.Windows.Forms.ToolTip(this.components);
  58. this.txtSearchOn = new System.Windows.Forms.TextBox();
  59. this.txtSearchFor = new System.Windows.Forms.TextBox();
  60. this.btnSearch = new System.Windows.Forms.Button();
  61. this.btnCancel = new System.Windows.Forms.Button();
  62. this.lblSearchOn = new System.Windows.Forms.Label();
  63. this.lblCopyright = new System.Windows.Forms.Label();
  64. this.SuspendLayout();
  65. // 
  66. // lblSearchFor
  67. // 
  68. this.lblSearchFor.Location = new System.Drawing.Point(13, 55);
  69. this.lblSearchFor.Name = "lblSearchFor";
  70. this.lblSearchFor.Size = new System.Drawing.Size(63, 13);
  71. this.lblSearchFor.TabIndex = 4;
  72. this.lblSearchFor.Text = "Search for :";
  73. // 
  74. // txtSearchOn
  75. // 
  76. this.txtSearchOn.Enabled = false;
  77. this.txtSearchOn.Location = new System.Drawing.Point(80, 26);
  78. this.txtSearchOn.Name = "txtSearchOn";
  79. this.txtSearchOn.Size = new System.Drawing.Size(199, 20);
  80. this.txtSearchOn.TabIndex = 0;
  81. this.txtSearchOn.Text = "";
  82. this.toolTipText.SetToolTip(this.txtSearchOn, "Write the search criteria here (For ex:  *, A* or HAR* etc. for matching computer" +
  83. "names)");
  84. // 
  85. // txtSearchFor
  86. // 
  87. this.txtSearchFor.Location = new System.Drawing.Point(80, 53);
  88. this.txtSearchFor.Name = "txtSearchFor";
  89. this.txtSearchFor.Size = new System.Drawing.Size(199, 20);
  90. this.txtSearchFor.TabIndex = 1;
  91. this.txtSearchFor.Text = "";
  92. this.toolTipText.SetToolTip(this.txtSearchFor, "Write the search criteria here (For ex:  *, A* or HAR* etc. for matching Filename" +
  93. "s)");
  94. // 
  95. // btnSearch
  96. // 
  97. this.btnSearch.BackColor = System.Drawing.Color.Chocolate;
  98. this.btnSearch.DialogResult = System.Windows.Forms.DialogResult.OK;
  99. this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
  100. this.btnSearch.ForeColor = System.Drawing.Color.White;
  101. this.btnSearch.Location = new System.Drawing.Point(79, 88);
  102. this.btnSearch.Name = "btnSearch";
  103. this.btnSearch.Size = new System.Drawing.Size(90, 32);
  104. this.btnSearch.TabIndex = 2;
  105. this.btnSearch.Text = "&Search";
  106. this.toolTipText.SetToolTip(this.btnSearch, "Performs search operation");
  107. this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
  108. // 
  109. // btnCancel
  110. // 
  111. this.btnCancel.BackColor = System.Drawing.Color.Chocolate;
  112. this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  113. this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
  114. this.btnCancel.ForeColor = System.Drawing.Color.White;
  115. this.btnCancel.Location = new System.Drawing.Point(189, 88);
  116. this.btnCancel.Name = "btnCancel";
  117. this.btnCancel.Size = new System.Drawing.Size(90, 32);
  118. this.btnCancel.TabIndex = 3;
  119. this.btnCancel.Text = "&Cancel";
  120. this.toolTipText.SetToolTip(this.btnCancel, "Cancel the search and close this window");
  121. // 
  122. // lblSearchOn
  123. // 
  124. this.lblSearchOn.Enabled = false;
  125. this.lblSearchOn.Location = new System.Drawing.Point(13, 28);
  126. this.lblSearchOn.Name = "lblSearchOn";
  127. this.lblSearchOn.Size = new System.Drawing.Size(63, 13);
  128. this.lblSearchOn.TabIndex = 0;
  129. this.lblSearchOn.Text = "Search on :";
  130. // 
  131. // lblCopyright
  132. // 
  133. this.lblCopyright.Location = new System.Drawing.Point(93, 5);
  134. this.lblCopyright.Name = "lblCopyright";
  135. this.lblCopyright.Size = new System.Drawing.Size(192, 14);
  136. this.lblCopyright.TabIndex = 5;
  137. this.lblCopyright.Text = "