⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmoption.cs

📁 本论文叙述了联机考试系统的现状以及C#语言的概况。重点介绍了联机考试系统的实现过程:包括系统分析、 系统调查、 数据流程分析、功能设计、 数据库设计、 系统物理配置方案、 系统实现、 系统测试和调试。
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace SupermarketProject
{
	/// <summary>
	/// frmOption 
	/// </summary>
	public class frmOption : System.Windows.Forms.Form
	{
		private System.Windows.Forms.TabPage tabPage1;
		private System.Windows.Forms.TabPage tabPage2;
		private System.Windows.Forms.TabPage tabPage3;
		private System.Windows.Forms.TabControl tabSettings;
		private System.Windows.Forms.CheckBox chkMaximizeWindow;
		private System.Windows.Forms.CheckBox chkShowToolBar;
		private System.Windows.Forms.GroupBox grpSelectBkFile;
		private System.Windows.Forms.TextBox txtFile;
		private System.Windows.Forms.Button btnSelectFile;
		private System.Windows.Forms.GroupBox grpSelectColor;
		private System.Windows.Forms.Button btnColor;
		private System.Windows.Forms.Label lblColor;
		private System.Windows.Forms.GroupBox grpMainWindowBackGround;
		private System.Windows.Forms.RadioButton rdoShowNothing;
		private System.Windows.Forms.RadioButton rdoShowPicture;
		private System.Windows.Forms.RadioButton rdoShowBackColor;
		private System.Windows.Forms.GroupBox grpLogFileOption;
		private System.Windows.Forms.RadioButton rdoSaveLogInfoByDate;
		private System.Windows.Forms.RadioButton rdoSaveLogInfoOneFile;
		private System.Windows.Forms.Button btnSelectDir;
		private System.Windows.Forms.Label lblRtnLogFile;
		private System.Windows.Forms.TextBox txtDir;
		private System.Windows.Forms.Label lblMaxUsers;
		private System.Windows.Forms.TextBox txtMaxUsers;
		private System.Windows.Forms.Label lblName;
		private System.Windows.Forms.Button btnCancel;
		private System.Windows.Forms.Button btnApply;
		private System.Windows.Forms.Button btnOK;
		private System.Windows.Forms.ColorDialog cdlgColor;
		private System.Windows.Forms.OpenFileDialog ofdlgOpenFile;
		private System.Windows.Forms.FolderBrowserDialog fbdFileBrDialog;

		//for storing the selected color
         private System.Drawing.Color clr;
		private System.ComponentModel.IContainer components;
		private System.Windows.Forms.ToolTip tipOption;
		private System.Windows.Forms.HelpProvider hlpOption;
		private System.Windows.Forms.TextBox txtMainTitle;
		
		//Defines a Toolbar variable to store the Main Form's toolbar
		private ToolBar tbrMain;

		private string mainTitle;

			
	public frmOption(ToolBar tbrMainTool)
		{
			//
			// Windows
			//
			InitializeComponent();
			//
			// TODO: InitializeComponent
			//
		clr = new Color();
		tbrMain = tbrMainTool;
		tbrMain.Visible = true;

		mainTitle = this.txtMainTitle.Text;
		}
		
		/// <summary>
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}
		/*[STAThread]
		static void Main()
		{
			Application.Run(new frmOption());
		}*/

		#region Windows Form Designer generated code
		/// <summary>
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.tabSettings = new System.Windows.Forms.TabControl();
			this.tabPage1 = new System.Windows.Forms.TabPage();
			this.chkMaximizeWindow = new System.Windows.Forms.CheckBox();
			this.chkShowToolBar = new System.Windows.Forms.CheckBox();
			this.grpSelectBkFile = new System.Windows.Forms.GroupBox();
			this.txtFile = new System.Windows.Forms.TextBox();
			this.btnSelectFile = new System.Windows.Forms.Button();
			this.grpSelectColor = new System.Windows.Forms.GroupBox();
			this.lblColor = new System.Windows.Forms.Label();
			this.btnColor = new System.Windows.Forms.Button();
			this.grpMainWindowBackGround = new System.Windows.Forms.GroupBox();
			this.rdoShowNothing = new System.Windows.Forms.RadioButton();
			this.rdoShowPicture = new System.Windows.Forms.RadioButton();
			this.rdoShowBackColor = new System.Windows.Forms.RadioButton();
			this.tabPage2 = new System.Windows.Forms.TabPage();
			this.grpLogFileOption = new System.Windows.Forms.GroupBox();
			this.rdoSaveLogInfoByDate = new System.Windows.Forms.RadioButton();
			this.rdoSaveLogInfoOneFile = new System.Windows.Forms.RadioButton();
			this.btnSelectDir = new System.Windows.Forms.Button();
			this.lblRtnLogFile = new System.Windows.Forms.Label();
			this.txtDir = new System.Windows.Forms.TextBox();
			this.tabPage3 = new System.Windows.Forms.TabPage();
			this.lblMaxUsers = new System.Windows.Forms.Label();
			this.txtMaxUsers = new System.Windows.Forms.TextBox();
			this.lblName = new System.Windows.Forms.Label();
			this.txtMainTitle = new System.Windows.Forms.TextBox();
			this.btnCancel = new System.Windows.Forms.Button();
			this.btnApply = new System.Windows.Forms.Button();
			this.btnOK = new System.Windows.Forms.Button();
			this.cdlgColor = new System.Windows.Forms.ColorDialog();
			this.ofdlgOpenFile = new System.Windows.Forms.OpenFileDialog();
			this.fbdFileBrDialog = new System.Windows.Forms.FolderBrowserDialog();
			this.tipOption = new System.Windows.Forms.ToolTip(this.components);
			this.hlpOption = new System.Windows.Forms.HelpProvider();
			this.tabSettings.SuspendLayout();
			this.tabPage1.SuspendLayout();
			this.grpSelectBkFile.SuspendLayout();
			this.grpSelectColor.SuspendLayout();
			this.grpMainWindowBackGround.SuspendLayout();
			this.tabPage2.SuspendLayout();
			this.grpLogFileOption.SuspendLayout();
			this.tabPage3.SuspendLayout();
			this.SuspendLayout();
			// 
			// tabSettings
			// 
			this.tabSettings.Controls.Add(this.tabPage1);
			this.tabSettings.Controls.Add(this.tabPage2);
			this.tabSettings.Controls.Add(this.tabPage3);
			this.tabSettings.Location = new System.Drawing.Point(6, 6);
			this.tabSettings.Name = "tabSettings";
			this.tabSettings.SelectedIndex = 0;
			this.tabSettings.Size = new System.Drawing.Size(602, 260);
			this.tabSettings.TabIndex = 0;
			// 
			// tabPage1
			// 
			this.tabPage1.BackColor = System.Drawing.SystemColors.ScrollBar;
			this.tabPage1.Controls.Add(this.chkMaximizeWindow);
			this.tabPage1.Controls.Add(this.chkShowToolBar);
			this.tabPage1.Controls.Add(this.grpSelectBkFile);
			this.tabPage1.Controls.Add(this.grpSelectColor);
			this.tabPage1.Controls.Add(this.grpMainWindowBackGround);
			this.tabPage1.Location = new System.Drawing.Point(4, 24);
			this.tabPage1.Name = "tabPage1";
			this.tabPage1.Size = new System.Drawing.Size(594, 232);
			this.tabPage1.TabIndex = 0;
			this.tabPage1.Text = "主窗口";
			// 
			// chkMaximizeWindow
			// 
			this.chkMaximizeWindow.Location = new System.Drawing.Point(12, 182);
			this.chkMaximizeWindow.Name = "chkMaximizeWindow";
			this.chkMaximizeWindow.Size = new System.Drawing.Size(284, 20);
			this.chkMaximizeWindow.TabIndex = 4;
			this.chkMaximizeWindow.Text = "启动时窗口最大化";
			this.chkMaximizeWindow.MouseHover += new System.EventHandler(this.chkMaximizeWindow_MouseHover);
			// 
			// chkShowToolBar
			// 
			this.chkShowToolBar.Checked = true;
			this.chkShowToolBar.CheckState = System.Windows.Forms.CheckState.Checked;
			this.chkShowToolBar.Location = new System.Drawing.Point(14, 146);
			this.chkShowToolBar.Name = "chkShowToolBar";
			this.chkShowToolBar.Size = new System.Drawing.Size(156, 20);
			this.chkShowToolBar.TabIndex = 3;
			this.chkShowToolBar.Text = "显示工具栏";
			this.chkShowToolBar.MouseHover += new System.EventHandler(this.chkShowToolBar_MouseHover);
			// 
			// grpSelectBkFile
			// 
			this.grpSelectBkFile.Controls.Add(this.txtFile);
			this.grpSelectBkFile.Controls.Add(this.btnSelectFile);
			this.grpSelectBkFile.Location = new System.Drawing.Point(192, 60);
			this.grpSelectBkFile.Name = "grpSelectBkFile";
			this.grpSelectBkFile.Size = new System.Drawing.Size(392, 64);
			this.grpSelectBkFile.TabIndex = 2;
			this.grpSelectBkFile.TabStop = false;
			this.grpSelectBkFile.Text = "选择背景文件";
			// 
			// txtFile
			// 
			this.txtFile.Location = new System.Drawing.Point(12, 26);
			this.txtFile.Name = "txtFile";
			this.txtFile.Size = new System.Drawing.Size(268, 21);
			this.txtFile.TabIndex = 2;
			this.txtFile.Text = "";
			this.txtFile.MouseHover += new System.EventHandler(this.txtFile_MouseHover);
			// 
			// btnSelectFile
			// 
			this.btnSelectFile.Location = new System.Drawing.Point(296, 24);
			this.btnSelectFile.Name = "btnSelectFile";
			this.btnSelectFile.Size = new System.Drawing.Size(72, 22);
			this.btnSelectFile.TabIndex = 1;
			this.btnSelectFile.Text = "选择文件";
			this.btnSelectFile.Click += new System.EventHandler(this.btnSelectFile_Click);
			// 
			// grpSelectColor
			// 
			this.grpSelectColor.Controls.Add(this.lblColor);
			this.grpSelectColor.Controls.Add(this.btnColor);
			this.grpSelectColor.Location = new System.Drawing.Point(12, 60);
			this.grpSelectColor.Name = "grpSelectColor";
			this.grpSelectColor.Size = new System.Drawing.Size(172, 64);
			this.grpSelectColor.TabIndex = 1;
			this.grpSelectColor.TabStop = false;
			this.grpSelectColor.Text = "选择颜色";
			this.grpSelectColor.MouseHover += new System.EventHandler(this.grpSelectColor_MouseHover);
			// 
			// lblColor
			// 
			this.lblColor.BackColor = System.Drawing.SystemColors.ControlLight;
			this.lblColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.lblColor.ForeColor = System.Drawing.SystemColors.ControlLight;
			this.lblColor.Location = new System.Drawing.Point(16, 26);
			this.lblColor.Name = "lblColor";
			this.lblColor.Size = new System.Drawing.Size(44, 24);
			this.lblColor.TabIndex = 0;
			// 
			// btnColor
			// 
			this.btnColor.Location = new System.Drawing.Point(80, 24);
			this.btnColor.Name = "btnColor";
			this.btnColor.Size = new System.Drawing.Size(76, 22);
			this.btnColor.TabIndex = 1;
			this.btnColor.Text = "选择颜色";
			this.btnColor.Click += new System.EventHandler(this.btnColor_Click);
			// 
			// grpMainWindowBackGround
			// 
			this.grpMainWindowBackGround.Controls.Add(this.rdoShowNothing);
			this.grpMainWindowBackGround.Controls.Add(this.rdoShowPicture);
			this.grpMainWindowBackGround.Controls.Add(this.rdoShowBackColor);
			this.grpMainWindowBackGround.Location = new System.Drawing.Point(10, 8);
			this.grpMainWindowBackGround.Name = "grpMainWindowBackGround";
			this.grpMainWindowBackGround.Size = new System.Drawing.Size(578, 50);
			this.grpMainWindowBackGround.TabIndex = 0;
			this.grpMainWindowBackGround.TabStop = false;
			this.grpMainWindowBackGround.Text = "主窗口背景";
			// 
			// rdoShowNothing
			// 
			this.rdoShowNothing.Checked = true;
			this.rdoShowNothing.Location = new System.Drawing.Point(444, 20);
			this.rdoShowNothing.Name = "rdoShowNothing";
			this.rdoShowNothing.Size = new System.Drawing.Size(108, 22);
			this.rdoShowNothing.TabIndex = 2;
			this.rdoShowNothing.TabStop = true;
			this.rdoShowNothing.Text = "不显示任何内容";
			this.rdoShowNothing.MouseHover += new System.EventHandler(this.rdoShowNothing_MouseHover);
			this.rdoShowNothing.CheckedChanged += new System.EventHandler(this.rdoShowNothing_CheckedChanged);
			// 
			// rdoShowPicture
			// 
			this.rdoShowPicture.Location = new System.Drawing.Point(238, 20);
			this.rdoShowPicture.Name = "rdoShowPicture";
			this.rdoShowPicture.Size = new System.Drawing.Size(150, 22);
			this.rdoShowPicture.TabIndex = 1;
			this.rdoShowPicture.Text = "显示图片";
			this.rdoShowPicture.MouseHover += new System.EventHandler(this.rdoShowPicture_MouseHover);
			this.rdoShowPicture.CheckedChanged += new System.EventHandler(this.rdoShowPicture_CheckedChanged);
			// 
			// rdoShowBackColor
			// 
			this.rdoShowBackColor.Location = new System.Drawing.Point(24, 20);
			this.rdoShowBackColor.Name = "rdoShowBackColor";
			this.rdoShowBackColor.Size = new System.Drawing.Size(168, 22);
			this.rdoShowBackColor.TabIndex = 0;
			this.rdoShowBackColor.Text = "显示背景色";
			this.rdoShowBackColor.MouseHover += new System.EventHandler(this.rdoShowBackColor_MouseHover);
			this.rdoShowBackColor.CheckedChanged += new System.EventHandler(this.rdoShowBackColor_CheckedChanged);
			// 
			// tabPage2
			// 
			this.tabPage2.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
			this.tabPage2.Controls.Add(this.grpLogFileOption);
			this.tabPage2.Controls.Add(this.btnSelectDir);
			this.tabPage2.Controls.Add(this.lblRtnLogFile);
			this.tabPage2.Controls.Add(this.txtDir);
			this.tabPage2.Location = new System.Drawing.Point(4, 24);
			this.tabPage2.Name = "tabPage2";
			this.tabPage2.Size = new System.Drawing.Size(594, 232);
			this.tabPage2.TabIndex = 1;
			this.tabPage2.Text = "日志文件";
			// 
			// grpLogFileOption
			// 
			this.grpLogFileOption.Controls.Add(this.rdoSaveLogInfoByDate);
			this.grpLogFileOption.Controls.Add(this.rdoSaveLogInfoOneFile);
			this.grpLogFileOption.Location = new System.Drawing.Point(16, 62);
			this.grpLogFileOption.Name = "grpLogFileOption";
			this.grpLogFileOption.Size = new System.Drawing.Size(314, 100);
			this.grpLogFileOption.TabIndex = 3;
			this.grpLogFileOption.TabStop = false;
			this.grpLogFileOption.Text = "日志文件选项";
			// 
			// rdoSaveLogInfoByDate
			// 
			this.rdoSaveLogInfoByDate.Checked = true;
			this.rdoSaveLogInfoByDate.Location = new System.Drawing.Point(24, 68);
			this.rdoSaveLogInfoByDate.Name = "rdoSaveLogInfoByDate";
			this.rdoSaveLogInfoByDate.Size = new System.Drawing.Size(272, 18);
			this.rdoSaveLogInfoByDate.TabIndex = 1;
			this.rdoSaveLogInfoByDate.TabStop = true;
			this.rdoSaveLogInfoByDate.Text = "按日期将日志信息保存在每个文件中";
			// 
			// rdoSaveLogInfoOneFile
			// 
			this.rdoSaveLogInfoOneFile.Location = new System.Drawing.Point(24, 34);
			this.rdoSaveLogInfoOneFile.Name = "rdoSaveLogInfoOneFile";
			this.rdoSaveLogInfoOneFile.Size = new System.Drawing.Size(272, 18);
			this.rdoSaveLogInfoOneFile.TabIndex = 0;
			this.rdoSaveLogInfoOneFile.Text = "将日志信息保存在一个文件中";
			// 
			// btnSelectDir

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -