📄 frmfolder.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using DataAccessLayer;
namespace PersonalInfo
{
/// <summary>
/// frmFolder 的摘要说明。
/// </summary>
public class frmFolder : System.Windows.Forms.Form
{
#region Windows 窗体设计器生成的代码
private PublicUIComponent.SuperRichTextBox txtComment;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnAddFile;
private System.Windows.Forms.Button btnDeleteFile;
private System.Windows.Forms.Button btnExportFile;
private System.Windows.Forms.Label label2;
private PublicUIComponent.SuperListBox lstFiles;
private System.Windows.Forms.LinkLabel lnkSetBold;
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 lnkCut;
private System.Windows.Forms.LinkLabel lnkCopy;
private System.Windows.Forms.LinkLabel lnkPaste;
private System.Windows.Forms.LinkLabel lnkSelectAll;
private System.Windows.Forms.LinkLabel lnkFind;
private System.Windows.Forms.LinkLabel lnkClearFormat;
private System.Windows.Forms.LinkLabel lnkMoveToBegin;
private System.Windows.Forms.LinkLabel lnkMoveToEnd;
private System.Windows.Forms.LinkLabel lnkZoomIn;
private System.Windows.Forms.LinkLabel lnkPrint;
private System.Windows.Forms.LinkLabel lnkSave;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.SaveFileDialog saveFileDialog1;
public System.Windows.Forms.Panel pnlFolder;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public frmFolder()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <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(frmFolder));
this.txtComment = new PublicUIComponent.SuperRichTextBox();
this.pnlFolder = new System.Windows.Forms.Panel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lnkClearFormat = new System.Windows.Forms.LinkLabel();
this.lnkMoveToBegin = new System.Windows.Forms.LinkLabel();
this.lnkMoveToEnd = new System.Windows.Forms.LinkLabel();
this.lnkZoomIn = new System.Windows.Forms.LinkLabel();
this.lnkPrint = new System.Windows.Forms.LinkLabel();
this.lnkSave = new System.Windows.Forms.LinkLabel();
this.lnkSetBold = 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.lnkSelectFont = new System.Windows.Forms.LinkLabel();
this.lnkCut = new System.Windows.Forms.LinkLabel();
this.lnkCopy = new System.Windows.Forms.LinkLabel();
this.lnkPaste = new System.Windows.Forms.LinkLabel();
this.lnkSelectAll = new System.Windows.Forms.LinkLabel();
this.lnkFind = new System.Windows.Forms.LinkLabel();
this.btnAddFile = new System.Windows.Forms.Button();
this.lstFiles = new PublicUIComponent.SuperListBox();
this.label1 = new System.Windows.Forms.Label();
this.btnDeleteFile = new System.Windows.Forms.Button();
this.btnExportFile = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.pnlFolder.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// txtComment
//
this.txtComment.AcceptsTab = true;
this.txtComment.AllowDrop = true;
this.txtComment.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.txtComment.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtComment.HideSelection = false;
this.txtComment.Location = new System.Drawing.Point(24, 72);
this.txtComment.Name = "txtComment";
this.txtComment.ShowContextMenu = false;
this.txtComment.Size = new System.Drawing.Size(544, 72);
this.txtComment.TabIndex = 0;
this.txtComment.Text = "";
this.txtComment.TextChanged += new System.EventHandler(this.txtComment_TextChanged);
this.txtComment.Leave += new System.EventHandler(this.txtComment_Leave);
//
// pnlFolder
//
this.pnlFolder.Controls.Add(this.groupBox1);
this.pnlFolder.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlFolder.Location = new System.Drawing.Point(0, 0);
this.pnlFolder.Name = "pnlFolder";
this.pnlFolder.Size = new System.Drawing.Size(632, 358);
this.pnlFolder.TabIndex = 1;
//
// groupBox1
//
this.groupBox1.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.groupBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("groupBox1.BackgroundImage")));
this.groupBox1.Controls.Add(this.lnkClearFormat);
this.groupBox1.Controls.Add(this.lnkMoveToBegin);
this.groupBox1.Controls.Add(this.lnkMoveToEnd);
this.groupBox1.Controls.Add(this.lnkZoomIn);
this.groupBox1.Controls.Add(this.lnkPrint);
this.groupBox1.Controls.Add(this.lnkSave);
this.groupBox1.Controls.Add(this.lnkSetBold);
this.groupBox1.Controls.Add(this.lnkItalic);
this.groupBox1.Controls.Add(this.lnkFontSizeUp);
this.groupBox1.Controls.Add(this.lnkFontSizeDown);
this.groupBox1.Controls.Add(this.lnkSelectFont);
this.groupBox1.Controls.Add(this.lnkCut);
this.groupBox1.Controls.Add(this.lnkCopy);
this.groupBox1.Controls.Add(this.lnkPaste);
this.groupBox1.Controls.Add(this.lnkSelectAll);
this.groupBox1.Controls.Add(this.lnkFind);
this.groupBox1.Controls.Add(this.btnAddFile);
this.groupBox1.Controls.Add(this.lstFiles);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.txtComment);
this.groupBox1.Controls.Add(this.btnDeleteFile);
this.groupBox1.Controls.Add(this.btnExportFile);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.groupBox1.Location = new System.Drawing.Point(16, 1);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(600, 342);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.VisibleChanged += new System.EventHandler(this.groupBox1_VisibleChanged);
//
// 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(264, 163);
this.lnkClearFormat.Name = "lnkClearFormat";
this.lnkClearFormat.Size = new System.Drawing.Size(54, 17);
this.lnkClearFormat.TabIndex = 17;
this.lnkClearFormat.TabStop = true;
this.lnkClearFormat.Text = "清除格式";
this.lnkClearFormat.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkClearFormat_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(320, 163);
this.lnkMoveToBegin.Name = "lnkMoveToBegin";
this.lnkMoveToBegin.Size = new System.Drawing.Size(54, 17);
this.lnkMoveToBegin.TabIndex = 18;
this.lnkMoveToBegin.TabStop = true;
this.lnkMoveToBegin.Text = "移到开头";
this.lnkMoveToBegin.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkMoveToBegin_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(384, 163);
this.lnkMoveToEnd.Name = "lnkMoveToEnd";
this.lnkMoveToEnd.Size = new System.Drawing.Size(54, 17);
this.lnkMoveToEnd.TabIndex = 19;
this.lnkMoveToEnd.TabStop = true;
this.lnkMoveToEnd.Text = "移到结尾";
this.lnkMoveToEnd.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkMoveToEnd_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(448, 163);
this.lnkZoomIn.Name = "lnkZoomIn";
this.lnkZoomIn.Size = new System.Drawing.Size(42, 17);
this.lnkZoomIn.TabIndex = 14;
this.lnkZoomIn.TabStop = true;
this.lnkZoomIn.Text = "放大镜";
this.lnkZoomIn.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkZoomIn_LinkClicked);
//
// lnkPrint
//
this.lnkPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.lnkPrint.AutoSize = true;
this.lnkPrint.BackColor = System.Drawing.Color.Transparent;
this.lnkPrint.Location = new System.Drawing.Point(496, 163);
this.lnkPrint.Name = "lnkPrint";
this.lnkPrint.Size = new System.Drawing.Size(29, 17);
this.lnkPrint.TabIndex = 15;
this.lnkPrint.TabStop = true;
this.lnkPrint.Text = "打印";
this.lnkPrint.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkPrint_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(536, 163);
this.lnkSave.Name = "lnkSave";
this.lnkSave.Size = new System.Drawing.Size(29, 17);
this.lnkSave.TabIndex = 16;
this.lnkSave.TabStop = true;
this.lnkSave.Text = "保存";
this.lnkSave.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkSave_LinkClicked);
//
// lnkSetBold
//
this.lnkSetBold.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lnkSetBold.AutoSize = true;
this.lnkSetBold.BackColor = System.Drawing.Color.Transparent;
this.lnkSetBold.Location = new System.Drawing.Point(304, 16);
this.lnkSetBold.Name = "lnkSetBold";
this.lnkSetBold.Size = new System.Drawing.Size(29, 17);
this.lnkSetBold.TabIndex = 10;
this.lnkSetBold.TabStop = true;
this.lnkSetBold.Text = "粗体";
this.lnkSetBold.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkSetBold_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(344, 16);
this.lnkItalic.Name = "lnkItalic";
this.lnkItalic.Size = new System.Drawing.Size(29, 17);
this.lnkItalic.TabIndex = 9;
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(384, 16);
this.lnkFontSizeUp.Name = "lnkFontSizeUp";
this.lnkFontSizeUp.Size = new System.Drawing.Size(54, 17);
this.lnkFontSizeUp.TabIndex = 11;
this.lnkFontSizeUp.TabStop = true;
this.lnkFontSizeUp.Text = "增大字体";
this.lnkFontSizeUp.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkFontSizeUp_LinkClicked);
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -