//简繁转换演示
import win.ui;
/*DSG{{*/
var winform = win.form(parent=...; text="AAuto Form";right=653;bottom=473 )
winform.add( 
richedit={ bottom=374;text="";left=14;multiline=1;top=14;z=1;right=628;edge=1;cls="richedit" };
btnF2j={ bottom=440;text="GBK繁转简";left=172;top=397;z=3;right=301;cls="button" };
btnJ2f={ bottom=440;text="GBK简转繁";left=22;top=397;z=2;right=151;cls="button" };
btnBig52Gbk={ bottom=440;text="BIG5繁转GBK简";left=473;top=397;z=5;right=602;cls="button" };
btnGbk2Big5={ bottom=440;text="GBK转BIG5繁";left=322;top=397;z=4;right=451;cls="button" }
)
/*}}*/

import string.conv;

winform.btnBig52Gbk.oncommand = function(id,event){
	winform.richedit.text = string.conv.big5ToGbk(winform.richedit.text) 
}


winform.btnGbk2Big5.oncommand = function(id,event){
	winform.richedit.text = string.conv.gbkToBig5(winform.richedit.text)
}


winform.btnF2j.oncommand = function(id,event){
	winform.richedit.text = string.conv.simplized(winform.richedit.text,true)
	
}


winform.btnJ2f.oncommand = function(id,event){
	winform.richedit.text = string.conv.traditionalized(winform.richedit.text,true)
}


winform.show() 
win.loopMessage();
