From f16804c0f8a0f86126c99cae9a7420fd687ecab4 Mon Sep 17 00:00:00 2001 From: Colin Liu Date: Thu, 18 Feb 2016 19:32:48 +0800 Subject: [PATCH] Comment out code for later update --- Wox/CommandArgs/CommandArgsFactory.cs | 2 +- Wox/CommandArgs/QueryCommandArg.cs | 4 ++-- Wox/CommandArgs/ReloadPluginCommandArg.cs | 2 +- Wox/CommandArgs/ToggleCommandArg.cs | 3 ++- Wox/CustomQueryHotkeySetting.xaml.cs | 26 ++++++++++----------- Wox/SettingWindow.xaml.cs | 28 +++++++++++------------ 6 files changed, 33 insertions(+), 32 deletions(-) diff --git a/Wox/CommandArgs/CommandArgsFactory.cs b/Wox/CommandArgs/CommandArgsFactory.cs index e6e4a91b74..14a3f99a72 100644 --- a/Wox/CommandArgs/CommandArgsFactory.cs +++ b/Wox/CommandArgs/CommandArgsFactory.cs @@ -34,7 +34,7 @@ namespace Wox.CommandArgs } else { - App.Window.ShowApp(); + App.API.ShowApp(); } } } diff --git a/Wox/CommandArgs/QueryCommandArg.cs b/Wox/CommandArgs/QueryCommandArg.cs index 22f0443528..d1df8e0a5b 100644 --- a/Wox/CommandArgs/QueryCommandArg.cs +++ b/Wox/CommandArgs/QueryCommandArg.cs @@ -16,9 +16,9 @@ namespace Wox.CommandArgs if (args.Count > 0) { string query = args[0]; - App.Window.ChangeQuery(query); + App.API.ChangeQuery(query); } - App.Window.ShowApp(); + App.API.ShowApp(); } } } diff --git a/Wox/CommandArgs/ReloadPluginCommandArg.cs b/Wox/CommandArgs/ReloadPluginCommandArg.cs index aec5724c11..a866446d2d 100644 --- a/Wox/CommandArgs/ReloadPluginCommandArg.cs +++ b/Wox/CommandArgs/ReloadPluginCommandArg.cs @@ -12,7 +12,7 @@ namespace Wox.CommandArgs public void Execute(IList args) { - PluginManager.Init(App.Window); + PluginManager.Init(App.API); } } } diff --git a/Wox/CommandArgs/ToggleCommandArg.cs b/Wox/CommandArgs/ToggleCommandArg.cs index 623648e311..7c2cbefb12 100644 --- a/Wox/CommandArgs/ToggleCommandArg.cs +++ b/Wox/CommandArgs/ToggleCommandArg.cs @@ -11,7 +11,8 @@ namespace Wox.CommandArgs public void Execute(IList args) { - App.Window.ToggleWox(); + //TODO: Add ToggleWox Method + //App.API.ToggleWox(); } } } diff --git a/Wox/CustomQueryHotkeySetting.xaml.cs b/Wox/CustomQueryHotkeySetting.xaml.cs index 7c58babe1c..d7136398fd 100644 --- a/Wox/CustomQueryHotkeySetting.xaml.cs +++ b/Wox/CustomQueryHotkeySetting.xaml.cs @@ -44,11 +44,11 @@ namespace Wox ActionKeyword = tbAction.Text }; UserSettingStorage.Instance.CustomPluginHotkeys.Add(pluginHotkey); - settingWidow.MainWindow.SetHotkey(ctlHotkey.CurrentHotkey, delegate - { - settingWidow.MainWindow.ChangeQuery(pluginHotkey.ActionKeyword); - settingWidow.MainWindow.ShowApp(); - }); + //settingWidow.MainWindow.SetHotkey(ctlHotkey.CurrentHotkey, delegate + //{ + // settingWidow.MainWindow.ChangeQuery(pluginHotkey.ActionKeyword); + // settingWidow.MainWindow.ShowApp(); + //}); MessageBox.Show(InternationalizationManager.Instance.GetTranslation("succeed")); } else @@ -62,12 +62,12 @@ namespace Wox updateCustomHotkey.ActionKeyword = tbAction.Text; updateCustomHotkey.Hotkey = ctlHotkey.CurrentHotkey.ToString(); //remove origin hotkey - settingWidow.MainWindow.RemoveHotkey(oldHotkey); - settingWidow.MainWindow.SetHotkey(updateCustomHotkey.Hotkey, delegate - { - settingWidow.MainWindow.ShowApp(); - settingWidow.MainWindow.ChangeQuery(updateCustomHotkey.ActionKeyword); - }); + //settingWidow.MainWindow.RemoveHotkey(oldHotkey); + //settingWidow.MainWindow.SetHotkey(updateCustomHotkey.Hotkey, delegate + //{ + // settingWidow.MainWindow.ShowApp(); + // settingWidow.MainWindow.ChangeQuery(updateCustomHotkey.ActionKeyword); + //}); MessageBox.Show(InternationalizationManager.Instance.GetTranslation("succeed")); } @@ -94,8 +94,8 @@ namespace Wox private void BtnTestActionKeyword_OnClick(object sender, RoutedEventArgs e) { - settingWidow.MainWindow.ShowApp(); - settingWidow.MainWindow.ChangeQuery(tbAction.Text); + //settingWidow.MainWindow.ShowApp(); + //settingWidow.MainWindow.ChangeQuery(tbAction.Text); } } } diff --git a/Wox/SettingWindow.xaml.cs b/Wox/SettingWindow.xaml.cs index effdddb618..bd181ed0c6 100644 --- a/Wox/SettingWindow.xaml.cs +++ b/Wox/SettingWindow.xaml.cs @@ -94,7 +94,7 @@ namespace Wox { UserSettingStorage.Instance.MaxResultsToShow = (int)comboMaxResultsToShow.SelectedItem; UserSettingStorage.Instance.Save(); - MainWindow.pnlResult.lbResults.GetBindingExpression(MaxHeightProperty).UpdateTarget(); + //MainWindow.pnlResult.lbResults.GetBindingExpression(MaxHeightProperty).UpdateTarget(); }; cbHideWhenDeactive.IsChecked = UserSettingStorage.Instance.HideWhenDeactive; @@ -250,18 +250,18 @@ namespace Wox { if (ctlHotkey.CurrentHotkeyAvailable) { - MainWindow.SetHotkey(ctlHotkey.CurrentHotkey, delegate - { - if (!MainWindow.IsVisible) - { - MainWindow.ShowApp(); - } - else - { - MainWindow.HideApp(); - } - }); - MainWindow.RemoveHotkey(UserSettingStorage.Instance.Hotkey); + //MainWindow.SetHotkey(ctlHotkey.CurrentHotkey, delegate + //{ + // if (!MainWindow.IsVisible) + // { + // MainWindow.ShowApp(); + // } + // else + // { + // MainWindow.HideApp(); + // } + //}); + //MainWindow.RemoveHotkey(UserSettingStorage.Instance.Hotkey); UserSettingStorage.Instance.Hotkey = ctlHotkey.CurrentHotkey.ToString(); UserSettingStorage.Instance.Save(); } @@ -289,7 +289,7 @@ namespace Wox UserSettingStorage.Instance.CustomPluginHotkeys.Remove(item); lvCustomHotkey.Items.Refresh(); UserSettingStorage.Instance.Save(); - MainWindow.RemoveHotkey(item.Hotkey); + //MainWindow.RemoveHotkey(item.Hotkey); } }