asp.net simplified to traditional implementation code

  • 2020-05-09 18:25:24
  • OfStack

I would like to directly post the following examples in illustration 1:
 
//Form1.cs 
using System; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Data; 
using System.Drawing; 
using System.Text; 
using System.Windows.Forms; 
using EncodeMy; 
namespace TestEnCode 
{ 
public partial class Form1 : Form 
{ 
public Form1() 
{ 
InitializeComponent(); 
} 
private void button1_Click(object sender, EventArgs e) 
{ 
EncodeRobert edControl = new EncodeRobert();// create 1 A simple transformation object  
txtResult.Text= edControl.SCTCConvert(ConvertType.Simplified, ConvertType.Traditional,txtSource.Text);// Do a simple transformation  
} 
} 
} 

Note: using EncodeMy; Not a built-in class library for.net, in Encode.dll. I'm going to quote 1.
Please go to the http: / / download. csdn. net/source / 617532
http: / / download. csdn. net user/farawayplace613 download (don't need resources) the instance of the code. Encode.dll is in the Debug folder.
 
//Form1.Designer.cs 
namespace TestEnCode 
{ 
partial class Form1 
{ 
/// <summary> 
///  Required designer variables.  
/// </summary> 
private System.ComponentModel.IContainer components = null; 
/// <summary> 
///  Clean up all resources in use.  
/// </summary> 
/// <param name="disposing"> If the managed resource should be released, is  true ; Otherwise, for  false . </param> 
protected override void Dispose(bool disposing) 
{ 
if (disposing && (components != null)) 
{ 
components.Dispose(); 
} 
base.Dispose(disposing); 
} 
#region Windows  Form designer generated code  
/// <summary> 
///  The designer supports the required methods  -  Don't  
///  Use the code editor to modify the contents of this method.  
/// </summary> 
private void InitializeComponent() 
{ 
this.txtSource = new System.Windows.Forms.TextBox(); 
this.txtResult = new System.Windows.Forms.TextBox(); 
this.button1 = new System.Windows.Forms.Button(); 
this.label1 = new System.Windows.Forms.Label(); 
this.label2 = new System.Windows.Forms.Label(); 
this.SuspendLayout(); 
// 
// txtSource 
// 
this.txtSource.Location = new System.Drawing.Point(75, 26); 
this.txtSource.Name = "txtSource"; 
this.txtSource.Size = new System.Drawing.Size(100, 22); 
this.txtSource.TabIndex = 0; 
// 
// txtResult 
// 
this.txtResult.Location = new System.Drawing.Point(75, 126); 
this.txtResult.Name = "txtResult"; 
this.txtResult.Size = new System.Drawing.Size(100, 22); 
this.txtResult.TabIndex = 1; 
// 
// button1 
// 
this.button1.Location = new System.Drawing.Point(75, 78); 
this.button1.Name = "button1"; 
this.button1.Size = new System.Drawing.Size(75, 23); 
this.button1.TabIndex = 2; 
this.button1.Text = " In conversion "; 
this.button1.UseVisualStyleBackColor = true; 
this.button1.Click += new System.EventHandler(this.button1_Click); 
// 
// label1 
// 
this.label1.AutoSize = true; 
this.label1.Location = new System.Drawing.Point(23, 29); 
this.label1.Name = "label1"; 
this.label1.Size = new System.Drawing.Size(41, 12); 
this.label1.TabIndex = 3; 
this.label1.Text = " Convert the source "; 
// 
// label2 
// 
this.label2.AutoSize = true; 
this.label2.Location = new System.Drawing.Point(12, 136); 
this.label2.Name = "label2"; 
this.label2.Size = new System.Drawing.Size(53, 12); 
this.label2.TabIndex = 4; 
this.label2.Text = " Conversion results "; 
// 
// Form1 
// 
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 
this.ClientSize = new System.Drawing.Size(320, 277); 
this.Controls.Add(this.label2); 
this.Controls.Add(this.label1); 
this.Controls.Add(this.button1); 
this.Controls.Add(this.txtResult); 
this.Controls.Add(this.txtSource); 
this.Name = "Form1"; 
this.Text = " Simple traditional conversion test "; 
this.ResumeLayout(false); 
this.PerformLayout(); 
} 
#endregion 
private System.Windows.Forms.TextBox txtSource; 
private System.Windows.Forms.TextBox txtResult; 
private System.Windows.Forms.Button button1; 
private System.Windows.Forms.Label label1; 
private System.Windows.Forms.Label label2; 
} 
} 

Note that the project you downloaded above is a project created by VS2008.
You may need to copy the code into your own environment. The important thing in the download is Encode.dll.
Haha, simple, just two sentences to complete the transformation of simplified traditional Chinese.
Author: cheng cheng
From the original: http: / / blog csdn. net farawayplace613 / archive 2008/09/10/2910527. aspx

Related articles: