From d8cda510a7b91b5cadbed190ae912b136db9820f Mon Sep 17 00:00:00 2001 From: "DESKTOP-3BO4HSG\\ksat" Date: Thu, 29 Dec 2022 09:25:01 +0800 Subject: [PATCH] perf: update left mouse double click --- STranslate/MainWindow.xaml | 4 +++- STranslate/MainWindow.xaml.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/STranslate/MainWindow.xaml b/STranslate/MainWindow.xaml index 7a268d4..8879597 100644 --- a/STranslate/MainWindow.xaml +++ b/STranslate/MainWindow.xaml @@ -5,6 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:vm="clr-namespace:STranslate.ViewModel" mc:Ignorable="d" + Name="Mwin" Background="Transparent" WindowStartupLocation="CenterScreen" MouseLeftButtonDown="Window_MouseLeftButtonDown" @@ -42,7 +43,8 @@ HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,100,0" - Command="{Binding ThemeConvertCmd}"/> + Command="{Binding ThemeConvertCmd}" + CommandParameter="{Binding ElementName=Mwin}"/> private void NotifyIcon_MouseDoubleClick(object sender, System.Windows.Forms.MouseEventArgs e) { - OpenMainWin_Click(null, null); + InputTranslateMenuItem_Click(null, null); } ///