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

📄 packer.cs

📁 JavaScript 压缩工具 使用 C# 开发
💻 CS
📖 第 1 页 / 共 2 页
字号:
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, ((System.Byte)(0)));
            this.tbSource.Location = new System.Drawing.Point(8, 24);
            this.tbSource.Multiline = true;
            this.tbSource.Name = "tbSource";
            this.tbSource.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.tbSource.Size = new System.Drawing.Size(778, 224);
            this.tbSource.TabIndex = 0;
            this.tbSource.Text = "";
            // 
            // 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, ((System.Byte)(0)));
            this.tbResult.Location = new System.Drawing.Point(8, 272);
            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(778, 208);
            this.tbResult.TabIndex = 0;
            this.tbResult.Text = "";
            // 
            // 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, ((System.Byte)(0)));
            this.pack.Location = new System.Drawing.Point(8, 490);
            this.pack.Name = "pack";
            this.pack.TabIndex = 1;
            this.pack.Text = "&Pack";
            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(666, 490);
            this.Encoding.Name = "Encoding";
            this.Encoding.Size = new System.Drawing.Size(121, 21);
            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(682, 514);
            this.fastDecode.Name = "fastDecode";
            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(650, 538);
            this.specialChars.Name = "specialChars";
            this.specialChars.Size = new System.Drawing.Size(136, 24);
            this.specialChars.TabIndex = 3;
            this.specialChars.Text = "Special Characters:";
            this.specialChars.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // llPaste
            // 
            this.llPaste.Location = new System.Drawing.Point(8, 8);
            this.llPaste.Name = "llPaste";
            this.llPaste.Size = new System.Drawing.Size(56, 16);
            this.llPaste.TabIndex = 4;
            this.llPaste.TabStop = true;
            this.llPaste.Text = "Paste:";

⌨️ 快捷键说明

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