Fix Copy Fail Error (don't understand why)

This commit is contained in:
弘韬 张 2020-10-13 14:01:26 +08:00 committed by Jeremy Wu
parent 7dc3ac1383
commit a911cc7024

View file

@ -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");