예제 #1
0
        private void trans_btn_Click(object sender, RoutedEventArgs e)
        {
            if (textBeforeTrans.Text == "" || textBeforeTrans.Text == null)
            {
                return;
            }

            List <string> result = TranslateService.GetResult(textBeforeTrans.Text, languageBeforeTrans.Text, languageAfterTrans.Text);

            if (result == null)
            {
                return;
            }
            BaiduResult.Text   = result[0];
            YoudaoResult.Text  = result[1];
            TengxunResult.Text = result[2];
        }