📄 frmdetailtext.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using DataAccessLayer;
namespace PersonalInfo
{
/// <summary>
/// frmDetailText 的摘要说明。
/// </summary>
public class frmDetailText : System.Windows.Forms.Form
{
#region Windows 窗体设计器生成的代码
private PublicUIComponent.SuperRichTextBox txtDetailText;
public System.Windows.Forms.Panel pnlDetailText;
private System.Windows.Forms.LinkLabel lnkBold;
private System.Windows.Forms.LinkLabel lnkItalic;
private System.Windows.Forms.LinkLabel lnkFontSizeUp;
private System.Windows.Forms.LinkLabel lnkFontSizeDown;
private System.Windows.Forms.LinkLabel lnkSelectFont;
private System.Windows.Forms.LinkLabel lnkSelectColor;
private System.Windows.Forms.LinkLabel lnkFind;
private System.Windows.Forms.LinkLabel lnkBullet;
private System.Windows.Forms.LinkLabel lnkSelectAll;
private System.Windows.Forms.LinkLabel lnkPaste;
private System.Windows.Forms.LinkLabel lnkCopy;
private System.Windows.Forms.LinkLabel lnkCut;
private System.Windows.Forms.LinkLabel lnkZoomIn;
private System.Windows.Forms.LinkLabel lnkMoveToBegin;
private System.Windows.Forms.LinkLabel lnkInsertImage;
private System.Windows.Forms.LinkLabel lnkInsertLineNum;
private System.Windows.Forms.LinkLabel lnkSave;
private System.Windows.Forms.LinkLabel lnkMoveToEnd;
private System.Windows.Forms.LinkLabel lnkClearFormat;
private System.Windows.Forms.LinkLabel lnkPrint;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmDetailText));
this.txtDetailText = new PublicUIComponent.SuperRichTextBox();
this.pnlDetailText = new System.Windows.Forms.Panel();
this.lnkBold = new System.Windows.Forms.LinkLabel();
this.lnkItalic = new System.Windows.Forms.LinkLabel();
this.lnkFontSizeUp = new System.Windows.Forms.LinkLabel();
this.lnkFontSizeDown = new System.Windows.Forms.LinkLabel();
this.lnkZoomIn = new System.Windows.Forms.LinkLabel();
this.lnkSelectFont = new System.Windows.Forms.LinkLabel();
this.lnkSelectColor = new System.Windows.Forms.LinkLabel();
this.lnkFind = new System.Windows.Forms.LinkLabel();
this.lnkBullet = new System.Windows.Forms.LinkLabel();
this.lnkMoveToBegin = new System.Windows.Forms.LinkLabel();
this.lnkInsertImage = new System.Windows.Forms.LinkLabel();
this.lnkInsertLineNum = new System.Windows.Forms.LinkLabel();
this.lnkSave = new System.Windows.Forms.LinkLabel();
this.lnkMoveToEnd = new System.Windows.Forms.LinkLabel();
this.lnkClearFormat = new System.Windows.Forms.LinkLabel();
this.lnkSelectAll = new System.Windows.Forms.LinkLabel();
this.lnkPaste = new System.Windows.Forms.LinkLabel();
this.lnkCopy = new System.Windows.Forms.LinkLabel();
this.lnkCut = new System.Windows.Forms.LinkLabel();
this.lnkPrint = new System.Windows.Forms.LinkLabel();
this.pnlDetailText.SuspendLayout();
this.SuspendLayout();
//
// txtDetailText
//
this.txtDetailText.AcceptsTab = true;
this.txtDetailText.AllowDrop = true;
this.txtDetailText.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtDetailText.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtDetailText.HideSelection = false;
this.txtDetailText.Location = new System.Drawing.Point(32, 56);
this.txtDetailText.Name = "txtDetailText";
this.txtDetailText.ShowContextMenu = false;
this.txtDetailText.Size = new System.Drawing.Size(464, 176);
this.txtDetailText.TabIndex = 0;
this.txtDetailText.Text = "";
this.txtDetailText.TextChanged += new System.EventHandler(this.txtDetailText_TextChanged);
this.txtDetailText.Leave += new System.EventHandler(this.txtDetailText_Leave);
//
// pnlDetailText
//
this.pnlDetailText.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pnlDetailText.BackgroundImage")));
this.pnlDetailText.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlDetailText.Controls.Add(this.lnkBold);
this.pnlDetailText.Controls.Add(this.txtDetailText);
this.pnlDetailText.Controls.Add(this.lnkItalic);
this.pnlDetailText.Controls.Add(this.lnkFontSizeUp);
this.pnlDetailText.Controls.Add(this.lnkFontSizeDown);
this.pnlDetailText.Controls.Add(this.lnkZoomIn);
this.pnlDetailText.Controls.Add(this.lnkSelectFont);
this.pnlDetailText.Controls.Add(this.lnkSelectColor);
this.pnlDetailText.Controls.Add(this.lnkFind);
this.pnlDetailText.Controls.Add(this.lnkBullet);
this.pnlDetailText.Controls.Add(this.lnkMoveToBegin);
this.pnlDetailText.Controls.Add(this.lnkInsertImage);
this.pnlDetailText.Controls.Add(this.lnkInsertLineNum);
this.pnlDetailText.Controls.Add(this.lnkSave);
this.pnlDetailText.Controls.Add(this.lnkMoveToEnd);
this.pnlDetailText.Controls.Add(this.lnkClearFormat);
this.pnlDetailText.Controls.Add(this.lnkSelectAll);
this.pnlDetailText.Controls.Add(this.lnkPaste);
this.pnlDetailText.Controls.Add(this.lnkCopy);
this.pnlDetailText.Controls.Add(this.lnkCut);
this.pnlDetailText.Controls.Add(this.lnkPrint);
this.pnlDetailText.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlDetailText.Location = new System.Drawing.Point(0, 0);
this.pnlDetailText.Name = "pnlDetailText";
this.pnlDetailText.Size = new System.Drawing.Size(512, 286);
this.pnlDetailText.TabIndex = 1;
this.pnlDetailText.VisibleChanged += new System.EventHandler(this.pnlDetailText_VisibleChanged);
//
// lnkBold
//
this.lnkBold.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lnkBold.AutoSize = true;
this.lnkBold.BackColor = System.Drawing.Color.Transparent;
this.lnkBold.Location = new System.Drawing.Point(176, 8);
this.lnkBold.Name = "lnkBold";
this.lnkBold.Size = new System.Drawing.Size(29, 17);
this.lnkBold.TabIndex = 1;
this.lnkBold.TabStop = true;
this.lnkBold.Text = "粗体";
this.lnkBold.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkBold_LinkClicked);
//
// lnkItalic
//
this.lnkItalic.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lnkItalic.AutoSize = true;
this.lnkItalic.BackColor = System.Drawing.Color.Transparent;
this.lnkItalic.Location = new System.Drawing.Point(214, 8);
this.lnkItalic.Name = "lnkItalic";
this.lnkItalic.Size = new System.Drawing.Size(29, 17);
this.lnkItalic.TabIndex = 1;
this.lnkItalic.TabStop = true;
this.lnkItalic.Text = "斜体";
this.lnkItalic.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkItalic_LinkClicked);
//
// lnkFontSizeUp
//
this.lnkFontSizeUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lnkFontSizeUp.AutoSize = true;
this.lnkFontSizeUp.BackColor = System.Drawing.Color.Transparent;
this.lnkFontSizeUp.Location = new System.Drawing.Point(252, 8);
this.lnkFontSizeUp.Name = "lnkFontSizeUp";
this.lnkFontSizeUp.Size = new System.Drawing.Size(54, 17);
this.lnkFontSizeUp.TabIndex = 1;
this.lnkFontSizeUp.TabStop = true;
this.lnkFontSizeUp.Text = "增大字体";
this.lnkFontSizeUp.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkFontSizeUp_LinkClicked);
//
// lnkFontSizeDown
//
this.lnkFontSizeDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lnkFontSizeDown.AutoSize = true;
this.lnkFontSizeDown.BackColor = System.Drawing.Color.Transparent;
this.lnkFontSizeDown.Location = new System.Drawing.Point(315, 8);
this.lnkFontSizeDown.Name = "lnkFontSizeDown";
this.lnkFontSizeDown.Size = new System.Drawing.Size(54, 17);
this.lnkFontSizeDown.TabIndex = 1;
this.lnkFontSizeDown.TabStop = true;
this.lnkFontSizeDown.Text = "减小字体";
this.lnkFontSizeDown.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkFontSizeDown_LinkClicked);
//
// lnkZoomIn
//
this.lnkZoomIn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.lnkZoomIn.AutoSize = true;
this.lnkZoomIn.BackColor = System.Drawing.Color.Transparent;
this.lnkZoomIn.Location = new System.Drawing.Point(361, 248);
this.lnkZoomIn.Name = "lnkZoomIn";
this.lnkZoomIn.Size = new System.Drawing.Size(42, 17);
this.lnkZoomIn.TabIndex = 1;
this.lnkZoomIn.TabStop = true;
this.lnkZoomIn.Text = "放大镜";
this.lnkZoomIn.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkZoomIn_LinkClicked);
//
// lnkSelectFont
//
this.lnkSelectFont.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lnkSelectFont.AutoSize = true;
this.lnkSelectFont.BackColor = System.Drawing.Color.Transparent;
this.lnkSelectFont.Location = new System.Drawing.Point(378, 8);
this.lnkSelectFont.Name = "lnkSelectFont";
this.lnkSelectFont.Size = new System.Drawing.Size(54, 17);
this.lnkSelectFont.TabIndex = 1;
this.lnkSelectFont.TabStop = true;
this.lnkSelectFont.Text = "设置字体";
this.lnkSelectFont.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkSelectFont_LinkClicked);
//
// lnkSelectColor
//
this.lnkSelectColor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lnkSelectColor.AutoSize = true;
this.lnkSelectColor.BackColor = System.Drawing.Color.Transparent;
this.lnkSelectColor.Location = new System.Drawing.Point(441, 8);
this.lnkSelectColor.Name = "lnkSelectColor";
this.lnkSelectColor.Size = new System.Drawing.Size(54, 17);
this.lnkSelectColor.TabIndex = 1;
this.lnkSelectColor.TabStop = true;
this.lnkSelectColor.Text = "字体颜色";
this.lnkSelectColor.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkSelectColor_LinkClicked);
//
// lnkFind
//
this.lnkFind.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lnkFind.AutoSize = true;
this.lnkFind.BackColor = System.Drawing.Color.Transparent;
this.lnkFind.Location = new System.Drawing.Point(368, 32);
this.lnkFind.Name = "lnkFind";
this.lnkFind.Size = new System.Drawing.Size(54, 17);
this.lnkFind.TabIndex = 1;
this.lnkFind.TabStop = true;
this.lnkFind.Text = "查找替换";
this.lnkFind.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkFind_LinkClicked);
//
// lnkBullet
//
this.lnkBullet.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lnkBullet.AutoSize = true;
this.lnkBullet.BackColor = System.Drawing.Color.Transparent;
this.lnkBullet.Location = new System.Drawing.Point(441, 32);
this.lnkBullet.Name = "lnkBullet";
this.lnkBullet.Size = new System.Drawing.Size(54, 17);
this.lnkBullet.TabIndex = 1;
this.lnkBullet.TabStop = true;
this.lnkBullet.Text = "项目编号";
this.lnkBullet.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkBullet_LinkClicked);
//
// lnkMoveToBegin
//
this.lnkMoveToBegin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.lnkMoveToBegin.AutoSize = true;
this.lnkMoveToBegin.BackColor = System.Drawing.Color.Transparent;
this.lnkMoveToBegin.Location = new System.Drawing.Point(223, 248);
this.lnkMoveToBegin.Name = "lnkMoveToBegin";
this.lnkMoveToBegin.Size = new System.Drawing.Size(54, 17);
this.lnkMoveToBegin.TabIndex = 1;
this.lnkMoveToBegin.TabStop = true;
this.lnkMoveToBegin.Text = "移到开头";
this.lnkMoveToBegin.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkMoveToBegin_LinkClicked);
//
// lnkInsertImage
//
this.lnkInsertImage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.lnkInsertImage.AutoSize = true;
this.lnkInsertImage.BackColor = System.Drawing.Color.Transparent;
this.lnkInsertImage.Location = new System.Drawing.Point(154, 248);
this.lnkInsertImage.Name = "lnkInsertImage";
this.lnkInsertImage.Size = new System.Drawing.Size(54, 17);
this.lnkInsertImage.TabIndex = 1;
this.lnkInsertImage.TabStop = true;
this.lnkInsertImage.Text = "插入图片";
this.lnkInsertImage.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkInsertImage_LinkClicked);
//
// lnkInsertLineNum
//
this.lnkInsertLineNum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.lnkInsertLineNum.AutoSize = true;
this.lnkInsertLineNum.BackColor = System.Drawing.Color.Transparent;
this.lnkInsertLineNum.Location = new System.Drawing.Point(85, 248);
this.lnkInsertLineNum.Name = "lnkInsertLineNum";
this.lnkInsertLineNum.Size = new System.Drawing.Size(54, 17);
this.lnkInsertLineNum.TabIndex = 1;
this.lnkInsertLineNum.TabStop = true;
this.lnkInsertLineNum.Text = "插入行号";
this.lnkInsertLineNum.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkInsertLineNum_LinkClicked);
//
// lnkSave
//
this.lnkSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.lnkSave.AutoSize = true;
this.lnkSave.BackColor = System.Drawing.Color.Transparent;
this.lnkSave.Location = new System.Drawing.Point(462, 248);
this.lnkSave.Name = "lnkSave";
this.lnkSave.Size = new System.Drawing.Size(29, 17);
this.lnkSave.TabIndex = 1;
this.lnkSave.TabStop = true;
this.lnkSave.Text = "保存";
this.lnkSave.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkSave_LinkClicked);
//
// lnkMoveToEnd
//
this.lnkMoveToEnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.lnkMoveToEnd.AutoSize = true;
this.lnkMoveToEnd.BackColor = System.Drawing.Color.Transparent;
this.lnkMoveToEnd.Location = new System.Drawing.Point(292, 248);
this.lnkMoveToEnd.Name = "lnkMoveToEnd";
this.lnkMoveToEnd.Size = new System.Drawing.Size(54, 17);
this.lnkMoveToEnd.TabIndex = 1;
this.lnkMoveToEnd.TabStop = true;
this.lnkMoveToEnd.Text = "移到结尾";
this.lnkMoveToEnd.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkMoveToEnd_LinkClicked);
//
// lnkClearFormat
//
this.lnkClearFormat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.lnkClearFormat.AutoSize = true;
this.lnkClearFormat.BackColor = System.Drawing.Color.Transparent;
this.lnkClearFormat.Location = new System.Drawing.Point(16, 248);
this.lnkClearFormat.Name = "lnkClearFormat";
this.lnkClearFormat.Size = new System.Drawing.Size(54, 17);
this.lnkClearFormat.TabIndex = 1;
this.lnkClearFormat.TabStop = true;
this.lnkClearFormat.Text = "清除格式";
this.lnkClearFormat.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkClearFormat_LinkClicked);
//
// lnkSelectAll
//
this.lnkSelectAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lnkSelectAll.AutoSize = true;
this.lnkSelectAll.BackColor = System.Drawing.Color.Transparent;
this.lnkSelectAll.Location = new System.Drawing.Point(320, 32);
this.lnkSelectAll.Name = "lnkSelectAll";
this.lnkSelectAll.Size = new System.Drawing.Size(29, 17);
this.lnkSelectAll.TabIndex = 1;
this.lnkSelectAll.TabStop = true;
this.lnkSelectAll.Text = "全选";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -