@@ -13,14 +13,14 @@ namespace Flow.Launcher
13
13
public partial class CustomQueryHotkeySetting : Window
14
14
{
15
15
private SettingWindow _settingWidow ;
16
+ private readonly Settings _settings ;
16
17
private bool update ;
17
18
private CustomPluginHotkey updateCustomHotkey ;
18
- public Settings Settings { get ; }
19
19
20
20
public CustomQueryHotkeySetting ( SettingWindow settingWidow , Settings settings )
21
21
{
22
22
_settingWidow = settingWidow ;
23
- Settings = settings ;
23
+ _settings = settings ;
24
24
InitializeComponent ( ) ;
25
25
}
26
26
@@ -33,13 +33,13 @@ private void btnAdd_OnClick(object sender, RoutedEventArgs e)
33
33
{
34
34
if ( ! update )
35
35
{
36
- Settings . CustomPluginHotkeys ??= new ObservableCollection < CustomPluginHotkey > ( ) ;
36
+ _settings . CustomPluginHotkeys ??= new ObservableCollection < CustomPluginHotkey > ( ) ;
37
37
38
38
var pluginHotkey = new CustomPluginHotkey
39
39
{
40
40
Hotkey = HotkeyControl . CurrentHotkey . ToString ( ) , ActionKeyword = tbAction . Text
41
41
} ;
42
- Settings . CustomPluginHotkeys . Add ( pluginHotkey ) ;
42
+ _settings . CustomPluginHotkeys . Add ( pluginHotkey ) ;
43
43
44
44
HotKeyMapper . SetCustomQueryHotkey ( pluginHotkey ) ;
45
45
}
@@ -59,7 +59,7 @@ private void btnAdd_OnClick(object sender, RoutedEventArgs e)
59
59
60
60
public void UpdateItem ( CustomPluginHotkey item )
61
61
{
62
- updateCustomHotkey = Settings . CustomPluginHotkeys . FirstOrDefault ( o =>
62
+ updateCustomHotkey = _settings . CustomPluginHotkeys . FirstOrDefault ( o =>
63
63
o . ActionKeyword == item . ActionKeyword && o . Hotkey == item . Hotkey ) ;
64
64
if ( updateCustomHotkey == null )
65
65
{
@@ -77,8 +77,7 @@ public void UpdateItem(CustomPluginHotkey item)
77
77
private void BtnTestActionKeyword_OnClick ( object sender , RoutedEventArgs e )
78
78
{
79
79
App . API . ChangeQuery ( tbAction . Text ) ;
80
- Application . Current . MainWindow . Show ( ) ;
81
- Application . Current . MainWindow . Opacity = 1 ;
80
+ App . API . ShowMainWindow ( ) ;
82
81
Application . Current . MainWindow . Focus ( ) ;
83
82
}
84
83
0 commit comments