diff --git a/STranslate/View/MainWindow.xaml b/STranslate/View/MainWindow.xaml index 6f678bd..49ffaad 100644 --- a/STranslate/View/MainWindow.xaml +++ b/STranslate/View/MainWindow.xaml @@ -101,7 +101,6 @@ @@ -209,8 +211,7 @@ namespace STranslate.ViewModel ClearAll(); var sentence = GetWordsHelper.Get(); OpenMainWin(); - (Mainwin.FindName("TextBoxInput") as System.Windows.Controls.TextBox) - .Text = sentence.Trim(); + InputTxt = sentence.Trim(); _ = Translate(); } /// @@ -228,7 +229,7 @@ namespace STranslate.ViewModel public void ScreenShotTranslateEx(string text) { InputTranslate(); - (Mainwin.FindName("TextBoxInput") as System.Windows.Controls.TextBox).Text = text; + InputTxt = text; _ = Translate(); }