mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #848 from Garulf/clipboard-api-function
Add Clipboard copy to jsonRPC API
This commit is contained in:
commit
b134e0e200
2 changed files with 12 additions and 1 deletions
|
|
@ -37,6 +37,12 @@ namespace Flow.Launcher.Plugin
|
|||
/// <exception cref="FileNotFoundException">Thrown when unable to find the file specified in the command </exception>
|
||||
/// <exception cref="Win32Exception">Thrown when error occurs during the execution of the command </exception>
|
||||
void ShellRun(string cmd, string filename = "cmd.exe");
|
||||
|
||||
/// <summary>
|
||||
/// Copy Text to clipboard
|
||||
/// </summary>
|
||||
/// <param name="Text">Text to save on clipboard</param>
|
||||
public void CopyToClipboard(string text);
|
||||
|
||||
/// <summary>
|
||||
/// Save everything, all of Flow Launcher and plugins' data and settings
|
||||
|
|
|
|||
|
|
@ -114,6 +114,11 @@ namespace Flow.Launcher
|
|||
var startInfo = ShellCommand.SetProcessStartInfo(filename, arguments: args, createNoWindow: true);
|
||||
ShellCommand.Execute(startInfo);
|
||||
}
|
||||
|
||||
public void CopyToClipboard(string text)
|
||||
{
|
||||
Clipboard.SetDataObject(text);
|
||||
}
|
||||
|
||||
public void StartLoadingBar() => _mainVM.ProgressBarVisibility = Visibility.Visible;
|
||||
|
||||
|
|
@ -222,4 +227,4 @@ namespace Flow.Launcher
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue