Remove autohotkey and add toggle command args

This commit is contained in:
qianlifeng
2015-01-29 22:35:01 +08:00
parent 2b1e343186
commit a112c6d9ee
9 changed files with 29 additions and 92 deletions

View File

@@ -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));