🚩 增加面板按钮点击运行时状态,此时不执行gotfocus
This commit is contained in:
@@ -30,6 +30,11 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool SHOW_RIGHT_BTN_MENU = false;
|
public static bool SHOW_RIGHT_BTN_MENU = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否点击了面板功能按钮
|
||||||
|
/// </summary>
|
||||||
|
public static bool APP_BTN_IS_DOWN = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否正在编辑菜单
|
/// 是否正在编辑菜单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
MouseEnter="MainWindow_MouseEnter"
|
MouseEnter="MainWindow_MouseEnter"
|
||||||
GotFocus="Window_GotFocus"
|
GotFocus="Window_GotFocus"
|
||||||
Loaded="Window_Loaded"
|
Loaded="Window_Loaded"
|
||||||
|
xf:Animations.Primary="{xf:Animate BasedOn={StaticResource FadeInAndGrowHorizontally}, Event=Visibility}"
|
||||||
>
|
>
|
||||||
|
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
@@ -95,6 +96,7 @@
|
|||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Click="ConfigButtonClick"
|
Click="ConfigButtonClick"
|
||||||
Initialized="SettingButton_Initialized"
|
Initialized="SettingButton_Initialized"
|
||||||
|
PreviewMouseLeftButtonDown="AppButton_PreviewMouseLeftButtonDown"
|
||||||
x:Name="SettingButton"
|
x:Name="SettingButton"
|
||||||
FocusVisualStyle="{x:Null}"
|
FocusVisualStyle="{x:Null}"
|
||||||
>
|
>
|
||||||
@@ -112,6 +114,7 @@
|
|||||||
hc:IconElement.Width="18"
|
hc:IconElement.Width="18"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Click="CloseButtonClick"
|
Click="CloseButtonClick"
|
||||||
|
PreviewMouseLeftButtonDown="AppButton_PreviewMouseLeftButtonDown"
|
||||||
FocusVisualStyle="{x:Null}"
|
FocusVisualStyle="{x:Null}"
|
||||||
/>
|
/>
|
||||||
</hc:UniformSpacingPanel>
|
</hc:UniformSpacingPanel>
|
||||||
|
|||||||
@@ -753,7 +753,8 @@ namespace GeekDesk
|
|||||||
{
|
{
|
||||||
// 如果没有在修改菜单 并且不是右键点击了面板
|
// 如果没有在修改菜单 并且不是右键点击了面板
|
||||||
if (!RunTimeStatus.IS_MENU_EDIT
|
if (!RunTimeStatus.IS_MENU_EDIT
|
||||||
&& !RunTimeStatus.SHOW_RIGHT_BTN_MENU)
|
&& !RunTimeStatus.SHOW_RIGHT_BTN_MENU
|
||||||
|
&& !RunTimeStatus.APP_BTN_IS_DOWN)
|
||||||
{
|
{
|
||||||
if (RunTimeStatus.SHOW_MENU_PASSWORDBOX)
|
if (RunTimeStatus.SHOW_MENU_PASSWORDBOX)
|
||||||
{
|
{
|
||||||
@@ -791,5 +792,15 @@ namespace GeekDesk
|
|||||||
t.Start();
|
t.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AppButton_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
//点击了面板
|
||||||
|
RunTimeStatus.APP_BTN_IS_DOWN = true;
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
Thread.Sleep(50);
|
||||||
|
RunTimeStatus.APP_BTN_IS_DOWN = false;
|
||||||
|
}).Start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user