private void TransTestBtn_Click(object sender, RoutedEventArgs e)
 {
     ITranslator Trans = new CaiyunTranslator();
     Trans.TranslatorInit(Common.appSettings.CaiyunToken,"");
     string res = Trans.Translate(TestSrcText.Text, TestDstLang.Text, TestSrcLang.Text);
     if (res != null)
     {
         HandyControl.Controls.MessageBox.Show(res, App.Current.Resources["MessageBox_Result"].ToString());
     }
     else
     {
         HandyControl.Controls.Growl.Error("彩云小译" + App.Current.Resources["APITest_Error_Hint"].ToString() + "\n" + Trans.GetLastError());
     }
 }
 private void AuthTestBtn_Click(object sender, RoutedEventArgs e)
 {
     Common.appSettings.CaiyunToken = TransTokenBox.Text;
     ITranslator Trans = new CaiyunTranslator();
     Trans.TranslatorInit(TransTokenBox.Text,"");
     if (Trans.Translate("apple", "zh", "en") != null)
     {
         HandyControl.Controls.Growl.Success("彩云小译" + App.Current.Resources["APITest_Success_Hint"].ToString());
     }
     else
     {
         HandyControl.Controls.Growl.Error("彩云小译" + App.Current.Resources["APITest_Error_Hint"].ToString() + "\n" + Trans.GetLastError());
     }
 }
        private void AuthTestBtn_Click(object sender, RoutedEventArgs e)
        {
            Common.appSettings.CaiyunToken = TransTokenBox.Text;
            ITranslator Trans = new CaiyunTranslator();

            Trans.TranslatorInit(TransTokenBox.Text, "");
            if (Trans.Translate("apple", "zh", "en") != null)
            {
                HandyControl.Controls.Growl.Success("彩云小译API工作正常!");
            }
            else
            {
                HandyControl.Controls.Growl.Error("彩云小译API工作异常\n" + Trans.GetLastError());
            }
        }
        private void TransTestBtn_Click(object sender, RoutedEventArgs e)
        {
            ITranslator Trans = new CaiyunTranslator();

            Trans.TranslatorInit(Common.appSettings.CaiyunToken, "");
            string res = Trans.Translate(TestSrcText.Text, TestDstLang.Text, TestSrcLang.Text);

            if (res != null)
            {
                HandyControl.Controls.MessageBox.Show(res, "翻译结果");
            }
            else
            {
                HandyControl.Controls.Growl.Error("彩云小译API工作异常\n" + Trans.GetLastError());
            }
        }