From 409ccae7f20ddeceaaedad65c5110460c72b7ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Thu, 18 Mar 2021 11:39:13 +0800 Subject: [PATCH] Move initialization of Calculator to Init() --- Plugins/Flow.Launcher.Plugin.Calculator/Main.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs index ab8ce892a..7ee69494a 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs @@ -32,13 +32,7 @@ namespace Flow.Launcher.Plugin.Caculator static Main() { - MagesEngine = new Engine(new Configuration - { - Scope = new Dictionary - { - { "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 + { + { "e", Math.E }, // e is not contained in the default mages engine + } + }); } public List Query(Query query)