diff --git a/STranslate/MainWindow.xaml b/STranslate/MainWindow.xaml index 5b37bb9..74b2265 100644 --- a/STranslate/MainWindow.xaml +++ b/STranslate/MainWindow.xaml @@ -1,11 +1,10 @@  - + - + - + diff --git a/STranslate/MainWindow.xaml.cs b/STranslate/MainWindow.xaml.cs index 5ccaab2..3ff77c9 100644 --- a/STranslate/MainWindow.xaml.cs +++ b/STranslate/MainWindow.xaml.cs @@ -13,6 +13,7 @@ namespace STranslate public partial class MainWindow : Window { private MainVM vm; + public MainWindow() { InitializeComponent(); @@ -110,6 +111,7 @@ namespace STranslate HwndSource source = HwndSource.FromHwnd(handle); source.AddHook(WndProc); } + /// /// 热键的功能 /// @@ -154,7 +156,6 @@ namespace STranslate { vm.InputTxt = string.Empty; vm.OutputTxt = string.Empty; - } /// diff --git a/STranslate/Utils/GetWordsUtil.cs b/STranslate/Utils/GetWordsUtil.cs index f417f57..cadf9dd 100644 --- a/STranslate/Utils/GetWordsUtil.cs +++ b/STranslate/Utils/GetWordsUtil.cs @@ -1,9 +1,5 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading; -using System.Threading.Tasks; using System.Windows; namespace STranslate.Utils @@ -48,6 +44,5 @@ namespace STranslate.Utils } return null; } - } -} +} \ No newline at end of file diff --git a/STranslate/Utils/HotKeysUtil.cs b/STranslate/Utils/HotKeysUtil.cs index 2ff2823..c953200 100644 --- a/STranslate/Utils/HotKeysUtil.cs +++ b/STranslate/Utils/HotKeysUtil.cs @@ -1,5 +1,4 @@ -using STranslate.Model; -using System; +using System; using static STranslate.Utils.NativeMethod; namespace STranslate.Utils @@ -13,6 +12,7 @@ namespace STranslate.Utils public static String Text = "A"; public static bool Conflict = false; } + public static class CrosswordTranslate { public static byte Modifiers = (byte)KeyModifiers.MOD_CTRL; @@ -20,6 +20,7 @@ namespace STranslate.Utils public static String Text = "D"; public static bool Conflict = false; } + public static class ScreenShotTranslate { public static byte Modifiers = (byte)KeyModifiers.MOD_CTRL; @@ -29,7 +30,6 @@ namespace STranslate.Utils } } - internal class HotKeysUtil { public static IntPtr mainFormHandle; @@ -129,4 +129,4 @@ namespace STranslate.Utils ScreenShotTranslateKey = HotKeys.ScreenShotTranslate.Key; } } -} +} \ No newline at end of file