📄 packer.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using System.Text.RegularExpressions;
namespace Dean.Edwards
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Packer : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox tbSource;
private System.Windows.Forms.TextBox tbResult;
private System.Windows.Forms.Button pack;
private System.Windows.Forms.ComboBox Encoding;
private System.Windows.Forms.CheckBox fastDecode;
private System.Windows.Forms.CheckBox specialChars;
private System.Windows.Forms.LinkLabel llPaste;
private System.Windows.Forms.LinkLabel llCopy;
private System.Windows.Forms.Button bLoad;
private System.Windows.Forms.Button bSave;
private System.Windows.Forms.Button bClear;
private System.Windows.Forms.OpenFileDialog ofdSource;
private System.Windows.Forms.SaveFileDialog sfdResult;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Packer()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// 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()
{
this.tbSource = new System.Windows.Forms.TextBox();
this.tbResult = new System.Windows.Forms.TextBox();
this.pack = new System.Windows.Forms.Button();
this.Encoding = new System.Windows.Forms.ComboBox();
this.fastDecode = new System.Windows.Forms.CheckBox();
this.specialChars = new System.Windows.Forms.CheckBox();
this.llPaste = new System.Windows.Forms.LinkLabel();
this.llCopy = new System.Windows.Forms.LinkLabel();
this.bLoad = new System.Windows.Forms.Button();
this.bSave = new System.Windows.Forms.Button();
this.bClear = new System.Windows.Forms.Button();
this.ofdSource = new System.Windows.Forms.OpenFileDialog();
this.sfdResult = new System.Windows.Forms.SaveFileDialog();
this.SuspendLayout();
//
// tbSource
//
this.tbSource.AcceptsReturn = true;
this.tbSource.AcceptsTab = true;
this.tbSource.AllowDrop = true;
this.tbSource.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbSource.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbSource.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tbSource.Location = new System.Drawing.Point(10, 26);
this.tbSource.Multiline = true;
this.tbSource.Name = "tbSource";
this.tbSource.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.tbSource.Size = new System.Drawing.Size(696, 241);
this.tbSource.TabIndex = 0;
//
// tbResult
//
this.tbResult.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbResult.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbResult.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tbResult.Location = new System.Drawing.Point(10, 224);
this.tbResult.Multiline = true;
this.tbResult.Name = "tbResult";
this.tbResult.ReadOnly = true;
this.tbResult.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.tbResult.Size = new System.Drawing.Size(696, 224);
this.tbResult.TabIndex = 0;
//
// pack
//
this.pack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.pack.BackColor = System.Drawing.Color.LightSkyBlue;
this.pack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.pack.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.pack.Location = new System.Drawing.Point(10, 459);
this.pack.Name = "pack";
this.pack.Size = new System.Drawing.Size(90, 24);
this.pack.TabIndex = 1;
this.pack.Text = "&Pack";
this.pack.UseVisualStyleBackColor = false;
this.pack.Click += new System.EventHandler(this.pack_Click);
//
// Encoding
//
this.Encoding.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Encoding.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.Encoding.Location = new System.Drawing.Point(562, 459);
this.Encoding.Name = "Encoding";
this.Encoding.Size = new System.Drawing.Size(145, 20);
this.Encoding.TabIndex = 2;
this.Encoding.SelectedIndexChanged += new System.EventHandler(this.Encoding_SelectedIndexChanged);
//
// fastDecode
//
this.fastDecode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.fastDecode.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.fastDecode.Checked = true;
this.fastDecode.CheckState = System.Windows.Forms.CheckState.Checked;
this.fastDecode.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.fastDecode.Location = new System.Drawing.Point(581, 485);
this.fastDecode.Name = "fastDecode";
this.fastDecode.Size = new System.Drawing.Size(125, 25);
this.fastDecode.TabIndex = 3;
this.fastDecode.Text = "Fast Decode:";
this.fastDecode.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// specialChars
//
this.specialChars.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.specialChars.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.specialChars.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.specialChars.Location = new System.Drawing.Point(543, 510);
this.specialChars.Name = "specialChars";
this.specialChars.Size = new System.Drawing.Size(163, 26);
this.specialChars.TabIndex = 3;
this.specialChars.Text = "Special Characters:";
this.specialChars.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// llPaste
//
this.llPaste.Location = new System.Drawing.Point(10, 9);
this.llPaste.Name = "llPaste";
this.llPaste.Size = new System.Drawing.Size(67, 17);
this.llPaste.TabIndex = 4;
this.llPaste.TabStop = true;
this.llPaste.Text = "Paste:";
this.llPaste.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llPaste_LinkClicked);
//
// llCopy
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -