From 48c4164dfe45a7546db7fb5a3f677a7fe859ef5b Mon Sep 17 00:00:00 2001 From: nl <3210346136@qq.com> Date: Wed, 23 Oct 2019 17:05:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=BB=E5=86=99=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E7=9A=84bug=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ASRT_SpeechClient_WPF/MainWindow.xaml.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ASRT_SpeechClient_WPF/MainWindow.xaml.cs b/ASRT_SpeechClient_WPF/MainWindow.xaml.cs index b45828a..bcf6a0a 100644 --- a/ASRT_SpeechClient_WPF/MainWindow.xaml.cs +++ b/ASRT_SpeechClient_WPF/MainWindow.xaml.cs @@ -41,6 +41,7 @@ public MainWindow() string[] conf_lines = System.IO.File.ReadAllLines(filename_conf); url = conf_lines[0]; token = conf_lines[1]; + textbox_url.Text = url; } asr = new SpeechRecognizer(url, token); asr.OnReceiveText += SpeechRecognizer_OnReceiveText; @@ -68,10 +69,8 @@ private async void btn_change_url_Click(object sender, RoutedEventArgs e) asr = new SpeechRecognizer(url_new, token); asr.OnReceiveText += SpeechRecognizer_OnReceiveText; - if (!System.IO.File.Exists(filename_conf)) - { - System.IO.File.WriteAllText(filename_conf, url_new + "\n" + token); - } + System.IO.File.WriteAllText(filename_conf, url_new + "\n" + token); + } }