Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetClipboard()

override string ReLogic.OS.Linux.Clipboard.GetClipboard ( )
inlineprotected

Definition at line 9 of file Clipboard.cs.

10 {
11 try
12 {
13 string result;
14 using (Process process = new Process())
15 {
16 process.StartInfo = new ProcessStartInfo("xsel", "-o")
17 {
18 UseShellExecute = false,
19 RedirectStandardOutput = true
20 };
21 process.Start();
22 result = process.StandardOutput.ReadToEnd();
23 process.WaitForExit();
24 }
25 return result;
26 }
27 catch (Exception)
28 {
29 return "";
30 }
31 }
StreamReader StandardOutput
Definition Process.cs:673

References System.Process, System.Diagnostics.Process.StandardOutput, System.Diagnostics.Process.Start(), and System.Diagnostics.Process.WaitForExit().