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

📄 optionsform.cs

📁 自己写的多窗口文本编辑器
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;


namespace 窗口编辑器
{
	/// <summary>
	/// OpenForm 的摘要说明。
	/// </summary>
	public class OptionsForm : System.Windows.Forms.Form
	{
		private System.Windows.Forms.TabControl tabControl1;
		private System.Windows.Forms.TabPage tabPage1;
		private System.Windows.Forms.Button btnOk;
		private System.Windows.Forms.Button btnCancel;
		private System.Windows.Forms.Button btnApp;
		private System.Windows.Forms.Label lbFont;
		private System.Windows.Forms.Label lbFontName;
		private System.Windows.Forms.Label PreView;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Label lbColor;
		private System.Windows.Forms.CheckBox chkStrikeout;
		private System.Windows.Forms.ComboBox cbFontName;
		private System.Windows.Forms.CheckBox chkBold;
		private System.Windows.Forms.ComboBox cbForeColor;
		private System.Windows.Forms.CheckBox chkItalic;
		private System.Windows.Forms.CheckBox chkUnderline;
		private System.Windows.Forms.ErrorProvider errorProvider;
		private System.Windows.Forms.ComboBox cbFontSize;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public OptionsForm()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(OptionsForm));
			this.tabControl1 = new System.Windows.Forms.TabControl();
			this.tabPage1 = new System.Windows.Forms.TabPage();
			this.cbFontSize = new System.Windows.Forms.ComboBox();
			this.cbForeColor = new System.Windows.Forms.ComboBox();
			this.lbColor = new System.Windows.Forms.Label();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.chkStrikeout = new System.Windows.Forms.CheckBox();
			this.chkUnderline = new System.Windows.Forms.CheckBox();
			this.chkItalic = new System.Windows.Forms.CheckBox();
			this.chkBold = new System.Windows.Forms.CheckBox();
			this.PreView = new System.Windows.Forms.Label();
			this.lbFontName = new System.Windows.Forms.Label();
			this.cbFontName = new System.Windows.Forms.ComboBox();
			this.lbFont = new System.Windows.Forms.Label();
			this.btnOk = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.btnApp = new System.Windows.Forms.Button();
			this.errorProvider = new System.Windows.Forms.ErrorProvider();
			this.tabControl1.SuspendLayout();
			this.tabPage1.SuspendLayout();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// tabControl1
			// 
			this.tabControl1.Controls.Add(this.tabPage1);
			this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.tabControl1.Location = new System.Drawing.Point(0, 0);
			this.tabControl1.Name = "tabControl1";
			this.tabControl1.SelectedIndex = 0;
			this.tabControl1.Size = new System.Drawing.Size(424, 270);
			this.tabControl1.TabIndex = 0;
			// 
			// tabPage1
			// 
			this.tabPage1.BackColor = System.Drawing.SystemColors.ControlLight;
			this.tabPage1.CausesValidation = false;
			this.tabPage1.Controls.Add(this.cbFontSize);
			this.tabPage1.Controls.Add(this.cbForeColor);
			this.tabPage1.Controls.Add(this.lbColor);
			this.tabPage1.Controls.Add(this.groupBox1);
			this.tabPage1.Controls.Add(this.PreView);
			this.tabPage1.Controls.Add(this.lbFontName);
			this.tabPage1.Controls.Add(this.cbFontName);
			this.tabPage1.Controls.Add(this.lbFont);
			this.tabPage1.Controls.Add(this.btnOk);
			this.tabPage1.Controls.Add(this.btnCancel);
			this.tabPage1.Controls.Add(this.btnApp);
			this.tabPage1.Location = new System.Drawing.Point(4, 21);
			this.tabPage1.Name = "tabPage1";
			this.tabPage1.Size = new System.Drawing.Size(416, 245);
			this.tabPage1.TabIndex = 0;
			this.tabPage1.Text = "效果";
			this.tabPage1.Click += new System.EventHandler(this.tabPage1_Click);
			// 
			// cbFontSize
			// 
			this.cbFontSize.Items.AddRange(new object[] {
															"8 pt",
															"9 pt",
															"10 pt",
															"12 pt",
															"14 pt",
															"16 pt",
															"24 pt",
															"36 pt",
															"72 pt"});
			this.cbFontSize.Location = new System.Drawing.Point(264, 16);
			this.cbFontSize.Name = "cbFontSize";
			this.cbFontSize.Size = new System.Drawing.Size(136, 20);
			this.cbFontSize.TabIndex = 8;
			this.cbFontSize.Text = "12pt";
			this.cbFontSize.TextChanged += new System.EventHandler(this.cbFontSize_TextChanged);
			this.cbFontSize.SelectedIndexChanged += new System.EventHandler(this.cbFontSize_SelectedIndexChanged);
			// 
			// cbForeColor
			// 
			this.cbForeColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cbForeColor.Location = new System.Drawing.Point(104, 48);
			this.cbForeColor.Name = "cbForeColor";
			this.cbForeColor.Size = new System.Drawing.Size(72, 20);
			this.cbForeColor.TabIndex = 5;
			this.cbForeColor.TabIndexChanged += new System.EventHandler(this.cbFontName_SelectedIndexChanged);
			this.cbForeColor.SelectedIndexChanged += new System.EventHandler(this.cbForeColor_SelectedIndexChanged);
			this.cbForeColor.RightToLeftChanged += new System.EventHandler(this.OptionsForm_Load);
			// 
			// lbColor
			// 
			this.lbColor.Location = new System.Drawing.Point(16, 48);
			this.lbColor.Name = "lbColor";
			this.lbColor.TabIndex = 4;
			this.lbColor.Text = "字体颜色(C)";
			this.lbColor.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// groupBox1
			// 
			this.groupBox1.BackColor = System.Drawing.Color.Honeydew;
			this.groupBox1.Controls.Add(this.chkStrikeout);
			this.groupBox1.Controls.Add(this.chkUnderline);
			this.groupBox1.Controls.Add(this.chkItalic);
			this.groupBox1.Controls.Add(this.chkBold);
			this.groupBox1.Location = new System.Drawing.Point(16, 96);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(184, 104);
			this.groupBox1.TabIndex = 6;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "选项";
			// 
			// chkStrikeout
			// 
			this.chkStrikeout.Location = new System.Drawing.Point(96, 64);
			this.chkStrikeout.Name = "chkStrikeout";
			this.chkStrikeout.Size = new System.Drawing.Size(80, 24);
			this.chkStrikeout.TabIndex = 3;
			this.chkStrikeout.Text = "删除线(K)";
			this.chkStrikeout.CheckedChanged += new System.EventHandler(this.cbFontName_SelectedIndexChanged);
			// 
			// chkUnderline
			// 
			this.chkUnderline.Location = new System.Drawing.Point(16, 64);
			this.chkUnderline.Name = "chkUnderline";
			this.chkUnderline.TabIndex = 2;
			this.chkUnderline.Text = "下划线(&U)";
			this.chkUnderline.CheckedChanged += new System.EventHandler(this.cbFontName_SelectedIndexChanged);
			// 
			// chkItalic
			// 
			this.chkItalic.Location = new System.Drawing.Point(96, 24);
			this.chkItalic.Name = "chkItalic";
			this.chkItalic.Size = new System.Drawing.Size(80, 24);
			this.chkItalic.TabIndex = 1;
			this.chkItalic.Text = "斜体(&I)";
			this.chkItalic.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			this.chkItalic.CheckedChanged += new System.EventHandler(this.cbFontName_SelectedIndexChanged);
			// 
			// chkBold
			// 
			this.chkBold.Location = new System.Drawing.Point(16, 24);
			this.chkBold.Name = "chkBold";
			this.chkBold.Size = new System.Drawing.Size(80, 24);
			this.chkBold.TabIndex = 0;
			this.chkBold.Text = "加粗(&B)";
			this.chkBold.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			this.chkBold.CheckedChanged += new System.EventHandler(this.cbFontName_SelectedIndexChanged);
			// 
			// PreView
			// 
			this.PreView.BackColor = System.Drawing.SystemColors.ControlLightLight;
			this.PreView.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.PreView.Font = new System.Drawing.Font("楷体_GB2312", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.PreView.ForeColor = System.Drawing.Color.Green;
			this.PreView.Location = new System.Drawing.Point(208, 56);
			this.PreView.Name = "PreView";
			this.PreView.Size = new System.Drawing.Size(192, 144);
			this.PreView.TabIndex = 7;
			this.PreView.Text = "预览(PriView)";
			this.PreView.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// lbFontName
			// 
			this.lbFontName.Location = new System.Drawing.Point(184, 16);
			this.lbFontName.Name = "lbFontName";
			this.lbFontName.TabIndex = 2;
			this.lbFontName.Text = "字号(&N)";
			this.lbFontName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// cbFontName
			// 
			this.cbFontName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cbFontName.Location = new System.Drawing.Point(104, 16);
			this.cbFontName.Name = "cbFontName";
			this.cbFontName.Size = new System.Drawing.Size(72, 20);
			this.cbFontName.TabIndex = 1;
			this.cbFontName.SelectedIndexChanged += new System.EventHandler(this.cbFontName_SelectedIndexChanged);

⌨️ 快捷键说明

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