中文繁体简体互换试验
来源:互联网 发布:beckii cruel 知乎 编辑:程序博客网 时间:2024/05/28 05:17
繁体简体互换的例子
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Threading;
using System.Globalization;
using Microsoft.VisualBasic;
namespace UI_Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
/*繁体转简体*/
private void button1_Click(object sender, EventArgs e)
{
string s = txtContent.Text;
s = Strings.StrConv(s, VbStrConv.SimplifiedChinese, 0); // 繁体转简体
txtContent.Text = s;
}
/*简体转繁体*/
private void button2_Click(object sender, EventArgs e)
{
string s = txtContent.Text;
s = Strings.StrConv(s, VbStrConv.TraditionalChinese, 0); // 简体转繁体
//s = Strings.StrConv(s, VbStrConv.ProperCase, 0); // 首字母大写
//s = Strings.StrConv(s, VbStrConv.Narrow, 0); // 全角转半角
//s = Strings.StrConv(s, VbStrConv.Wide, 0); // 半角转全角
txtContent.Text = s;
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Threading;
using System.Globalization;
using Microsoft.VisualBasic;
namespace UI_Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
/*繁体转简体*/
private void button1_Click(object sender, EventArgs e)
{
string s = txtContent.Text;
s = Strings.StrConv(s, VbStrConv.SimplifiedChinese, 0); // 繁体转简体
txtContent.Text = s;
}
/*简体转繁体*/
private void button2_Click(object sender, EventArgs e)
{
string s = txtContent.Text;
s = Strings.StrConv(s, VbStrConv.TraditionalChinese, 0); // 简体转繁体
//s = Strings.StrConv(s, VbStrConv.ProperCase, 0); // 首字母大写
//s = Strings.StrConv(s, VbStrConv.Narrow, 0); // 全角转半角
//s = Strings.StrConv(s, VbStrConv.Wide, 0); // 半角转全角
txtContent.Text = s;
}
}
}
界面如图:
转换后:
演示版下载: DEMO
- 中文繁体简体互换试验
- 中文繁体简体互换试验
- 中文简体繁体转换
- [转]用VB实现简体繁体互换
- 中文简体繁体转换js
- ubuntu 中文繁体简体转换
- Java中文简体繁体转换
- [原创软件]中文简体、繁体、BIG5互转
- 中文简体繁体之间的转换
- 中文简体与繁体的转换
- java中文简体和繁体互转
- PHP中文繁简转换-繁体-简体
- java 中文简体繁体互相转换
- 中文字符 简体繁体相互转换
- php 实现中文简体转换繁体程序
- 网页JS切换中文简体/繁体
- PHP 实现中文简体转换繁体程序
- JS调用VBA实现简体和繁体的互换
- 用Windows Writer写的日志
- Delphi中截取文件名
- mono asp.net 虚拟主机配置
- 忆龙2009:检测IDS攻击的技术
- woaimanyan
- 中文繁体简体互换试验
- 快速修复装ubuntu9.10后,系统引导菜单中XP丢失的问题
- 2009-12-29
- QT时钟
- 技术人员应该研发符合穷人利益的项目
- Memcached的一些特性
- jsp内置对象
- The Struts dispatcher cannot be found
- 免费开源软件专题(2): 10大图形图像编辑处理软件