private void UpdateTextBoxWs(ComboBox wsComboBox, FwTextBox textBox)
{
var ws = wsComboBox.SelectedItem as IWritingSystem;
if (ws == null)
{
Debug.Assert(wsComboBox.SelectedIndex == -1);
return;
}
textBox.WritingSystemCode = ws.Handle;
ITsStrFactory tsf = TsStrFactoryClass.Create();
textBox.Tss = tsf.MakeString(textBox.Text.Trim(), ws.Handle);
}