diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs index 1235a18e7f1..949911229e6 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs @@ -34,7 +34,7 @@ static Main() { MagesEngine = new Engine(); } - + public void Init(PluginInitContext context) { Context = context; @@ -78,16 +78,16 @@ public List Query(Query query) { try { - Clipboard.SetText(newResult); + Clipboard.SetDataObject(newResult); return true; } - catch (ExternalException) + catch (ExternalException e) { MessageBox.Show("Copy failed, please try later"); return false; } } - } + } }; } } @@ -111,7 +111,7 @@ private bool CanCalculate(Query query) { return false; } - + if (!IsBracketComplete(query.Search)) { return false; @@ -164,7 +164,7 @@ private bool IsBracketComplete(string query) return leftBracketCount == 0; } - + public string GetTranslatedPluginTitle() { return Context.API.GetTranslation("flowlauncher_plugin_caculator_plugin_name");