🐛 控制主面板热键调用频率
This commit is contained in:
@@ -70,5 +70,13 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static int EVERYTHING_SEARCH_DELAY_TIME = 300;
|
public static int EVERYTHING_SEARCH_DELAY_TIME = 300;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 控制主界面热键按下规定时间内只执行一次show hide
|
||||||
|
/// </summary>
|
||||||
|
public static bool MAIN_HOT_KEY_DOWN = false;
|
||||||
|
/// <summary>
|
||||||
|
/// 控制主界面热键按下规定时间内只执行一次show hide
|
||||||
|
/// </summary>
|
||||||
|
public static int MAIN_HOT_KEY_TIME = 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,10 +82,15 @@
|
|||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type DataGridRow}">
|
<ControlTemplate TargetType="{x:Type DataGridRow}">
|
||||||
<Border CornerRadius="8" MouseRightButtonDown="DataGridRow_MouseRightButtonDown" Margin="0,0,0,5" BorderBrush="Black" BorderThickness="0" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
<Border CornerRadius="8" MouseRightButtonDown="DataGridRow_MouseRightButtonDown" Margin="0,0,0,5" BorderBrush="Black" BorderThickness="0" SnapsToDevicePixels="True">
|
||||||
<Border.Style>
|
<Border.Style>
|
||||||
<Style TargetType="Border">
|
<Style TargetType="Border">
|
||||||
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||||||
|
<Setter Property="Background">
|
||||||
|
<Setter.Value>
|
||||||
|
<SolidColorBrush Color="White" Opacity="0.6"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</Border.Style>
|
</Border.Style>
|
||||||
<SelectiveScrollingGrid>
|
<SelectiveScrollingGrid>
|
||||||
|
|||||||
@@ -374,6 +374,14 @@ namespace GeekDesk
|
|||||||
{
|
{
|
||||||
hotKeyId = GlobalHotKey.RegisterHotKey(appData.AppConfig.HotkeyModifiers, appData.AppConfig.Hotkey, () =>
|
hotKeyId = GlobalHotKey.RegisterHotKey(appData.AppConfig.HotkeyModifiers, appData.AppConfig.Hotkey, () =>
|
||||||
{
|
{
|
||||||
|
if (RunTimeStatus.MAIN_HOT_KEY_DOWN) return;
|
||||||
|
RunTimeStatus.MAIN_HOT_KEY_DOWN = true;
|
||||||
|
new Thread(() =>
|
||||||
|
{
|
||||||
|
Thread.Sleep(RunTimeStatus.MAIN_HOT_KEY_TIME);
|
||||||
|
RunTimeStatus.MAIN_HOT_KEY_DOWN = false;
|
||||||
|
}).Start();
|
||||||
|
|
||||||
if (MotionControl.hotkeyFinished)
|
if (MotionControl.hotkeyFinished)
|
||||||
{
|
{
|
||||||
if (CheckSholeShowApp())
|
if (CheckSholeShowApp())
|
||||||
|
|||||||
Reference in New Issue
Block a user