@@ -63,7 +63,7 @@ public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
63
63
. AsParallel ( )
64
64
. WithCancellation ( token )
65
65
. Where ( p => p . Enabled )
66
- . Select ( p => p . Result ( query . Search , _context . API ) )
66
+ . Select ( p => p . Result ( query . Search , Context . API ) )
67
67
. Where ( r => r ? . Score > 0 )
68
68
. ToList ( ) ) ;
69
69
@@ -80,7 +80,7 @@ public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
80
80
81
81
public async Task InitAsync ( PluginInitContext context )
82
82
{
83
- _context = context ;
83
+ Context = context ;
84
84
85
85
_settings = context . API . LoadSettingJsonStorage < Settings > ( ) ;
86
86
@@ -155,17 +155,17 @@ public static async Task IndexPrograms()
155
155
156
156
public Control CreateSettingPanel ( )
157
157
{
158
- return new ProgramSetting ( _context , _settings , _win32s , _uwps ) ;
158
+ return new ProgramSetting ( Context , _settings , _win32s , _uwps ) ;
159
159
}
160
160
161
161
public string GetTranslatedPluginTitle ( )
162
162
{
163
- return _context . API . GetTranslation ( "flowlauncher_plugin_program_plugin_name" ) ;
163
+ return Context . API . GetTranslation ( "flowlauncher_plugin_program_plugin_name" ) ;
164
164
}
165
165
166
166
public string GetTranslatedPluginDescription ( )
167
167
{
168
- return _context . API . GetTranslation ( "flowlauncher_plugin_program_plugin_description" ) ;
168
+ return Context . API . GetTranslation ( "flowlauncher_plugin_program_plugin_description" ) ;
169
169
}
170
170
171
171
public List < Result > LoadContextMenus ( Result selectedResult )
@@ -174,19 +174,19 @@ public List<Result> LoadContextMenus(Result selectedResult)
174
174
var program = selectedResult . ContextData as IProgram ;
175
175
if ( program != null )
176
176
{
177
- menuOptions = program . ContextMenus ( _context . API ) ;
177
+ menuOptions = program . ContextMenus ( Context . API ) ;
178
178
}
179
179
180
180
menuOptions . Add (
181
181
new Result
182
182
{
183
- Title = _context . API . GetTranslation ( "flowlauncher_plugin_program_disable_program" ) ,
183
+ Title = Context . API . GetTranslation ( "flowlauncher_plugin_program_disable_program" ) ,
184
184
Action = c =>
185
185
{
186
186
DisableProgram ( program ) ;
187
- _context . API . ShowMsg (
188
- _context . API . GetTranslation ( "flowlauncher_plugin_program_disable_dlgtitle_success" ) ,
189
- _context . API . GetTranslation (
187
+ Context . API . ShowMsg (
188
+ Context . API . GetTranslation ( "flowlauncher_plugin_program_disable_dlgtitle_success" ) ,
189
+ Context . API . GetTranslation (
190
190
"flowlauncher_plugin_program_disable_dlgtitle_success_message" ) ) ;
191
191
return false ;
192
192
} ,
@@ -235,7 +235,7 @@ public static void StartProcess(Func<ProcessStartInfo, Process> runProcess, Proc
235
235
{
236
236
var name = "Plugin: Program" ;
237
237
var message = $ "Unable to start: { info . FileName } ";
238
- _context . API . ShowMsg ( name , message , string . Empty ) ;
238
+ Context . API . ShowMsg ( name , message , string . Empty ) ;
239
239
}
240
240
}
241
241
0 commit comments