using NStack; using System; namespace Terminal.Gui { /// /// Provides cut, copy, and paste support for the clipboard with OS interaction. /// public static class Clipboard { static ustring contents; /// /// Get or sets the operation system clipboard, otherwise the contents field. /// public static ustring Contents { get { try { return Application.Driver.Clipboard.GetClipboardData (); } catch (Exception) { return contents; } } set { try { Application.Driver.Clipboard.SetClipboardData (value.ToString ()); contents = value; } catch (Exception) { contents = value; } } } } }