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

📄 form1.cs

📁 可批量将资源中词汇进行语言转换
💻 CS
📖 第 1 页 / 共 3 页
字号:
// Maintenance Man:: TonyLiu (mailto:IKnowUKnow2@hotmal.com)
// LastChange:: 20070718162140 
// resource abstract and change
// NOTE:  目录末要用"\" 符号
// "英文名" "中文名"  "文件名"(绝对路径) 列标题不能变
// 已知BUG. 不支持带2个点的文件比如test.old.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;
using System.Data;
using System.Data.OleDb;

namespace Convert
{
	/// <summary>
	/// Form1 的摘要说明。
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		protected System.Data.DataTable dtGlobal = new DataTable();
        private string strOut = "";
        private System.Windows.Forms.Button btnBegin;
        private System.Windows.Forms.TextBox txtSourPath;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.TextBox txtExt;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.TextBox txtOutPath;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Button btnWrite;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.TextBox txtResxSourcePath;
        private System.Windows.Forms.TextBox txtResxDestPath;
        private System.Windows.Forms.Label label7;
        private System.Windows.Forms.Label label8;
        private System.Windows.Forms.ProgressBar progressBar1;
        private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Label labelMSG;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.CheckBox checkBox1;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

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

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

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

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.btnBegin = new System.Windows.Forms.Button();
			this.txtSourPath = new System.Windows.Forms.TextBox();
			this.label3 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.txtExt = new System.Windows.Forms.TextBox();
			this.label5 = new System.Windows.Forms.Label();
			this.txtOutPath = new System.Windows.Forms.TextBox();
			this.label1 = new System.Windows.Forms.Label();
			this.btnWrite = new System.Windows.Forms.Button();
			this.label2 = new System.Windows.Forms.Label();
			this.txtResxSourcePath = new System.Windows.Forms.TextBox();
			this.txtResxDestPath = new System.Windows.Forms.TextBox();
			this.label7 = new System.Windows.Forms.Label();
			this.label8 = new System.Windows.Forms.Label();
			this.progressBar1 = new System.Windows.Forms.ProgressBar();
			this.label9 = new System.Windows.Forms.Label();
			this.labelMSG = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.checkBox1 = new System.Windows.Forms.CheckBox();
			this.SuspendLayout();
			// 
			// btnBegin
			// 
			this.btnBegin.Location = new System.Drawing.Point(40, 112);
			this.btnBegin.Name = "btnBegin";
			this.btnBegin.Size = new System.Drawing.Size(208, 22);
			this.btnBegin.TabIndex = 0;
			this.btnBegin.Text = "*.cs(*.xml,etc) ---->  output.xls";
			this.btnBegin.Click += new System.EventHandler(this.button1_Click);
			// 
			// txtSourPath
			// 
			this.txtSourPath.Location = new System.Drawing.Point(200, 8);
			this.txtSourPath.Name = "txtSourPath";
			this.txtSourPath.Size = new System.Drawing.Size(320, 20);
			this.txtSourPath.TabIndex = 3;
			this.txtSourPath.Text = "C:\\TEMP1\\old\\";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(72, 8);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(112, 16);
			this.label3.TabIndex = 4;
			this.label3.Text = "source path(\\ need)";
			this.label3.TextAlign = System.Drawing.ContentAlignment.TopRight;
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(104, 32);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(80, 16);
			this.label4.TabIndex = 6;
			this.label4.Text = "fileExtension:";
			this.label4.TextAlign = System.Drawing.ContentAlignment.TopRight;
			// 
			// txtExt
			// 
			this.txtExt.Location = new System.Drawing.Point(200, 32);
			this.txtExt.Name = "txtExt";
			this.txtExt.Size = new System.Drawing.Size(184, 20);
			this.txtExt.TabIndex = 5;
			this.txtExt.Text = "*.cs";
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(32, 56);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(152, 16);
			this.label5.TabIndex = 8;
			this.label5.Text = "output.xls path(\\ needed)";
			this.label5.TextAlign = System.Drawing.ContentAlignment.TopRight;
			// 
			// txtOutPath
			// 
			this.txtOutPath.Location = new System.Drawing.Point(200, 56);
			this.txtOutPath.Name = "txtOutPath";
			this.txtOutPath.Size = new System.Drawing.Size(280, 20);
			this.txtOutPath.TabIndex = 7;
			this.txtOutPath.Text = "C:\\TEMP1\\new\\";
			// 
			// label1
			// 
			this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaption;
			this.label1.Location = new System.Drawing.Point(392, 32);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(120, 15);
			this.label1.TabIndex = 9;
			this.label1.Text = "*.cs or *.resx or *.js";
			// 
			// btnWrite
			// 
			this.btnWrite.Location = new System.Drawing.Point(280, 280);
			this.btnWrite.Name = "btnWrite";
			this.btnWrite.Size = new System.Drawing.Size(248, 21);
			this.btnWrite.TabIndex = 10;
			this.btnWrite.Text = "output.xls  ---->  *.cs(*.xml,*.config,etc)";
			this.btnWrite.Click += new System.EventHandler(this.btnWrite_Click);
			// 
			// label2
			// 
			this.label2.ImageAlign = System.Drawing.ContentAlignment.TopRight;
			this.label2.Location = new System.Drawing.Point(16, 216);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(192, 16);
			this.label2.TabIndex = 12;
			this.label2.Text = "sourcecode PATH(before convert)";
			this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// txtResxSourcePath
			// 
			this.txtResxSourcePath.Location = new System.Drawing.Point(216, 216);
			this.txtResxSourcePath.Name = "txtResxSourcePath";
			this.txtResxSourcePath.Size = new System.Drawing.Size(264, 20);
			this.txtResxSourcePath.TabIndex = 11;
			this.txtResxSourcePath.Text = "C:\\temp1\\old\\";
			// 
			// txtResxDestPath
			// 
			this.txtResxDestPath.Location = new System.Drawing.Point(216, 248);
			this.txtResxDestPath.Name = "txtResxDestPath";
			this.txtResxDestPath.Size = new System.Drawing.Size(264, 20);
			this.txtResxDestPath.TabIndex = 13;
			this.txtResxDestPath.Text = "C:\\temp1\\new\\";
			// 
			// label7
			// 
			this.label7.ImageAlign = System.Drawing.ContentAlignment.TopRight;
			this.label7.Location = new System.Drawing.Point(32, 248);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(176, 16);
			this.label7.TabIndex = 14;
			this.label7.Text = "sourcecode PATH(after convert)";
			this.label7.TextAlign = System.Drawing.ContentAlignment.TopRight;
			// 
			// label8
			// 
			this.label8.ForeColor = System.Drawing.SystemColors.ActiveCaption;
			this.label8.Location = new System.Drawing.Point(312, 192);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(216, 14);
			this.label8.TabIndex = 16;
			this.label8.Text = "output.xls MUST in PATH(before convert)";
			// 
			// progressBar1
			// 
			this.progressBar1.Location = new System.Drawing.Point(32, 144);
			this.progressBar1.Name = "progressBar1";
			this.progressBar1.Size = new System.Drawing.Size(473, 8);
			this.progressBar1.TabIndex = 17;
			this.progressBar1.Visible = false;
			// 
			// label9
			// 
			this.label9.BackColor = System.Drawing.SystemColors.Control;
			this.label9.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label9.ForeColor = System.Drawing.Color.Red;
			this.label9.Location = new System.Drawing.Point(8, 192);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(304, 15);
			this.label9.TabIndex = 18;
			this.label9.Text = "NOTE:sheet name=\"output.xls\"  ---->  *.cs";
			// 
			// labelMSG
			// 
			this.labelMSG.BackColor = System.Drawing.SystemColors.Control;
			this.labelMSG.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.labelMSG.ForeColor = System.Drawing.Color.Red;
			this.labelMSG.Location = new System.Drawing.Point(8, 168);
			this.labelMSG.Name = "labelMSG";
			this.labelMSG.Size = new System.Drawing.Size(520, 15);
			this.labelMSG.TabIndex = 19;
			this.labelMSG.Text = "filename only support 1 dot like a.b (not a.b.c)";
			this.labelMSG.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// label6
			// 
			this.label6.ImageAlign = System.Drawing.ContentAlignment.TopRight;
			this.label6.Location = new System.Drawing.Point(48, 88);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(272, 16);
			this.label6.TabIndex = 20;
			this.label6.Text = "R/W with gb2312(if base=utf8,choose no)?";
			this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// checkBox1
			// 
			this.checkBox1.Checked = true;
			this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
			this.checkBox1.Location = new System.Drawing.Point(264, 88);
			this.checkBox1.Name = "checkBox1";
			this.checkBox1.Size = new System.Drawing.Size(16, 24);
			this.checkBox1.TabIndex = 21;
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(539, 309);
			this.Controls.Add(this.checkBox1);
			this.Controls.Add(this.label6);
			this.Controls.Add(this.labelMSG);
			this.Controls.Add(this.label9);
			this.Controls.Add(this.progressBar1);
			this.Controls.Add(this.label8);
			this.Controls.Add(this.txtResxDestPath);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.txtResxSourcePath);
			this.Controls.Add(this.btnWrite);
			this.Controls.Add(this.label1);
			this.Controls.Add(this.label5);
			this.Controls.Add(this.txtOutPath);
			this.Controls.Add(this.label4);
			this.Controls.Add(this.txtExt);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.txtSourPath);
			this.Controls.Add(this.btnBegin);
			this.Controls.Add(this.label7);
			this.Name = "Form1";
			this.Text = "convert chinese In SourceCode to english(IKnowUKnow2@hotmail.com)";
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main()  //#region 
		{
			Application.Run(new Form1());
		} //#endregion 

⌨️ 快捷键说明

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