📄 frmquestionsearch.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;
namespace OES
{
/// <summary>
/// Summary description for QuestionSearch.
/// </summary>
public class frmQuestionSearch : System.Windows.Forms.Form
{
public System.Windows.Forms.Button btnSave;
private System.Windows.Forms.GroupBox grpSearch;
private System.Windows.Forms.Label lblSubject;
private System.Windows.Forms.ComboBox cboSubject;
private System.Windows.Forms.Button btnSearch;
private System.Windows.Forms.Label lblHeading;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Label lblTitle;
private System.Windows.Forms.Label lblKeywords;
private System.Windows.Forms.TextBox txtKeywords;
private System.Windows.Forms.DataGrid dbgQuestionDetails;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
frmQuestion objfrmQuestion;
Question objQuestion;
private string[] searchValue;
public static bool updateflag = false;
public DataTable dtQuestion;
private int QNumber;
private System.Windows.Forms.Button btnHelp;
private int index=0;
public frmQuestionSearch()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
searchValue=new string[2];
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmQuestionSearch));
this.lblTitle = new System.Windows.Forms.Label();
this.btnSave = new System.Windows.Forms.Button();
this.grpSearch = new System.Windows.Forms.GroupBox();
this.txtKeywords = new System.Windows.Forms.TextBox();
this.lblSubject = new System.Windows.Forms.Label();
this.cboSubject = new System.Windows.Forms.ComboBox();
this.lblKeywords = new System.Windows.Forms.Label();
this.btnSearch = new System.Windows.Forms.Button();
this.lblHeading = new System.Windows.Forms.Label();
this.btnClose = new System.Windows.Forms.Button();
this.dbgQuestionDetails = new System.Windows.Forms.DataGrid();
this.btnHelp = new System.Windows.Forms.Button();
this.grpSearch.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dbgQuestionDetails)).BeginInit();
this.SuspendLayout();
//
// lblTitle
//
this.lblTitle.AutoSize = true;
this.lblTitle.BackColor = System.Drawing.Color.Transparent;
this.lblTitle.Font = new System.Drawing.Font("Century Gothic", 21.75F);
this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255)));
this.lblTitle.Location = new System.Drawing.Point(115, 43);
this.lblTitle.Name = "lblTitle";
this.lblTitle.Size = new System.Drawing.Size(191, 39);
this.lblTitle.TabIndex = 54;
this.lblTitle.Text = "修 改 试 题";
//
// btnSave
//
this.btnSave.BackColor = System.Drawing.Color.Transparent;
this.btnSave.Enabled = false;
this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnSave.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnSave.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.btnSave.Location = new System.Drawing.Point(250, 439);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(96, 26);
this.btnSave.TabIndex = 53;
this.btnSave.Text = "保存(&S)";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// grpSearch
//
this.grpSearch.BackColor = System.Drawing.Color.Transparent;
this.grpSearch.Controls.Add(this.txtKeywords);
this.grpSearch.Controls.Add(this.lblSubject);
this.grpSearch.Controls.Add(this.cboSubject);
this.grpSearch.Controls.Add(this.lblKeywords);
this.grpSearch.Controls.Add(this.btnSearch);
this.grpSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.grpSearch.Font = new System.Drawing.Font("Century Gothic", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.grpSearch.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.grpSearch.Location = new System.Drawing.Point(115, 103);
this.grpSearch.Name = "grpSearch";
this.grpSearch.Size = new System.Drawing.Size(653, 110);
this.grpSearch.TabIndex = 51;
this.grpSearch.TabStop = false;
this.grpSearch.Text = "搜索试题信息";
//
// txtKeywords
//
this.txtKeywords.BackColor = System.Drawing.SystemColors.Info;
this.txtKeywords.Font = new System.Drawing.Font("Times New Roman", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.txtKeywords.Location = new System.Drawing.Point(394, 43);
this.txtKeywords.Name = "txtKeywords";
this.txtKeywords.Size = new System.Drawing.Size(144, 20);
this.txtKeywords.TabIndex = 46;
this.txtKeywords.Text = "";
//
// lblSubject
//
this.lblSubject.BackColor = System.Drawing.Color.Transparent;
this.lblSubject.Font = new System.Drawing.Font("Century Gothic", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblSubject.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.lblSubject.Location = new System.Drawing.Point(10, 43);
this.lblSubject.Name = "lblSubject";
this.lblSubject.Size = new System.Drawing.Size(67, 25);
this.lblSubject.TabIndex = 44;
this.lblSubject.Text = "科目";
//
// cboSubject
//
this.cboSubject.BackColor = System.Drawing.SystemColors.Info;
this.cboSubject.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboSubject.Location = new System.Drawing.Point(86, 43);
this.cboSubject.Name = "cboSubject";
this.cboSubject.Size = new System.Drawing.Size(87, 25);
this.cboSubject.TabIndex = 36;
//
// lblKeywords
//
this.lblKeywords.BackColor = System.Drawing.Color.Transparent;
this.lblKeywords.Font = new System.Drawing.Font("Century Gothic", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblKeywords.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.lblKeywords.Location = new System.Drawing.Point(192, 43);
this.lblKeywords.Name = "lblKeywords";
this.lblKeywords.Size = new System.Drawing.Size(192, 59);
this.lblKeywords.TabIndex = 29;
this.lblKeywords.Text = "关键字(使用逗号可以组合两个或多个词语)";
//
// btnSearch
//
this.btnSearch.BackColor = System.Drawing.Color.Transparent;
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnSearch.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnSearch.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.btnSearch.Location = new System.Drawing.Point(566, 43);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(77, 26);
this.btnSearch.TabIndex = 33;
this.btnSearch.Text = "搜索(&S)";
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// lblHeading
//
this.lblHeading.AutoSize = true;
this.lblHeading.BackColor = System.Drawing.Color.Transparent;
this.lblHeading.Font = new System.Drawing.Font("Century Gothic", 21.75F);
this.lblHeading.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255)));
this.lblHeading.Location = new System.Drawing.Point(-52, -32);
this.lblHeading.Name = "lblHeading";
this.lblHeading.Size = new System.Drawing.Size(262, 39);
this.lblHeading.TabIndex = 46;
this.lblHeading.Text = "U s e r S e a r c h";
//
// btnClose
//
this.btnClose.BackColor = System.Drawing.Color.Transparent;
this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnClose.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnClose.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -