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

◆ SetClipboard()

override void ReLogic.OS.Linux.Clipboard.SetClipboard ( string text)
inlineprotected

Definition at line 52 of file Clipboard.cs.

53 {
54 if (text == "")
55 {
57 return;
58 }
59 try
60 {
61 using Process process = new Process();
62 process.StartInfo = new ProcessStartInfo("xsel", "-i")
63 {
64 UseShellExecute = false,
65 RedirectStandardOutput = false,
66 RedirectStandardInput = true
67 };
68 process.Start();
69 process.StandardInput.Write(text);
70 process.StandardInput.Close();
71 process.WaitForExit();
72 }
73 catch (Exception)
74 {
75 }
76 }

References ReLogic.OS.Linux.Clipboard.ClearClipboard(), System.Process, and System.text.