From b08b5de6ffafe91fac9c2041adfeb2740cd3346d Mon Sep 17 00:00:00 2001 From: "DESKTOP-3BO4HSG\\ksat" Date: Tue, 10 Jan 2023 11:17:34 +0800 Subject: [PATCH] chore: update view codes in vm --- STranslate/View/MainWindow.xaml | 1 - STranslate/ViewModel/MainVM.cs | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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(); }