mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Move initialization of Calculator to Init()
This commit is contained in:
parent
541e91df60
commit
409ccae7f2
1 changed files with 9 additions and 7 deletions
|
|
@ -32,13 +32,7 @@ namespace Flow.Launcher.Plugin.Caculator
|
|||
|
||||
static Main()
|
||||
{
|
||||
MagesEngine = new Engine(new Configuration
|
||||
{
|
||||
Scope = new Dictionary<string, object>
|
||||
{
|
||||
{ "e", Math.E }, // e is not contained in the default mages engine
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void Init(PluginInitContext context)
|
||||
|
|
@ -47,6 +41,14 @@ namespace Flow.Launcher.Plugin.Caculator
|
|||
|
||||
_viewModel = new SettingsViewModel();
|
||||
_settings = _viewModel.Settings;
|
||||
|
||||
MagesEngine = new Engine(new Configuration
|
||||
{
|
||||
Scope = new Dictionary<string, object>
|
||||
{
|
||||
{ "e", Math.E }, // e is not contained in the default mages engine
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public List<Result> Query(Query query)
|
||||
|
|
|
|||
Loading…
Reference in a new issue