From a911cc702404b6e1f282c5aa15e02de7ab636f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Tue, 13 Oct 2020 14:01:26 +0800 Subject: [PATCH] Fix Copy Fail Error (don't understand why) --- Plugins/Flow.Launcher.Plugin.Calculator/Main.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs index 1235a18e7..949911229 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs @@ -34,7 +34,7 @@ namespace Flow.Launcher.Plugin.Caculator { MagesEngine = new Engine(); } - + public void Init(PluginInitContext context) { Context = context; @@ -78,16 +78,16 @@ namespace Flow.Launcher.Plugin.Caculator { 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 @@ namespace Flow.Launcher.Plugin.Caculator { return false; } - + if (!IsBracketComplete(query.Search)) { return false; @@ -164,7 +164,7 @@ namespace Flow.Launcher.Plugin.Caculator return leftBracketCount == 0; } - + public string GetTranslatedPluginTitle() { return Context.API.GetTranslation("flowlauncher_plugin_caculator_plugin_name");