private void TransTestBtn_Click(object sender, RoutedEventArgs e) { ITranslator Trans = new JBeijingTranslator(); Trans.TranslatorInit(Common.appSettings.JBJCTDllPath, ""); string res = Trans.Translate(TestSrcText.Text, "", ""); if (res != null) { HandyControl.Controls.MessageBox.Show(res, "翻译结果"); } else { HandyControl.Controls.Growl.Error("JBeijing翻译API工作异常\n" + Trans.GetLastError()); } }
private void TransTestBtn_Click(object sender, RoutedEventArgs e) { ITranslator Trans = new JBeijingTranslator(); Trans.TranslatorInit(Common.appSettings.JBJCTDllPath, ""); string res = Trans.Translate(TestSrcText.Text, "", ""); if (res != null) { HandyControl.Controls.MessageBox.Show(res, App.Current.Resources["MessageBox_Result"].ToString()); } else { HandyControl.Controls.Growl.Error("JBeijing翻译" + App.Current.Resources["APITest_Error_Hint"].ToString() + "\n" + Trans.GetLastError()); } }