mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
Remove autohotkey and add toggle command args
This commit is contained in:
@@ -243,9 +243,6 @@ namespace Wox
|
||||
|
||||
public void SetHotkey(string hotkeyStr, EventHandler<HotkeyEventArgs> action)
|
||||
{
|
||||
AHKHotkey ahk = new AHKHotkey();
|
||||
ahk.RegisterHotkey("#R",null);
|
||||
return;
|
||||
var hotkey = new HotkeyModel(hotkeyStr);
|
||||
try
|
||||
{
|
||||
@@ -281,17 +278,21 @@ namespace Wox
|
||||
}
|
||||
|
||||
private void OnHotkey(object sender, HotkeyEventArgs e)
|
||||
{
|
||||
ToggleWox();
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
public void ToggleWox()
|
||||
{
|
||||
if (!IsVisible)
|
||||
{
|
||||
ShowWox();
|
||||
UserSettingStorage.Instance.IncreaseActivateTimes();
|
||||
}
|
||||
else
|
||||
{
|
||||
HideWox();
|
||||
}
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void InitProgressbarAnimation()
|
||||
@@ -430,6 +431,7 @@ namespace Wox
|
||||
|
||||
private void ShowWox(bool selectAll = true)
|
||||
{
|
||||
UserSettingStorage.Instance.IncreaseActivateTimes();
|
||||
if (!double.IsNaN(Left) && !double.IsNaN(Top))
|
||||
{
|
||||
var origScreen = Screen.FromRectangle(new Rectangle((int)Left, (int)Top, (int)ActualWidth, (int)ActualHeight));
|
||||
|
||||
Reference in New Issue
Block a user