public Task SetClipboard(List <ClipboardItem> list) { RpcInvokeProxy.DispatchInvoke(() => { Clipboards.SetClipboard(list); }); return(Task.CompletedTask); }
public Task SetClipboard(ClipboardItem clipboardItem) { RpcInvokeProxy.DispatchInvoke(() => { Clipboards.SetClipboard(clipboardItem); }); return(Task.CompletedTask); }
public bool TryGetClipboard(ulong id, out List <Clipboard2> clipboards) { clipboards = null; if (Clipboards.ContainsAuthor(id)) { clipboards = Clipboards.FromAuthor(id); return(true); } return(false); }
/* Private members */ /// <summary>Initializes the base program structure.</summary> /// <remarks>Nothing is done if initialization has already occured. The core value is checked for this, /// if it's null then initialization hasn't occured yet.</remarks> private static void Init (ExecutionContext newExecutionContext) { if ((executionContext != null) && (executionContext.Initialized)) throw new Exception("The Base environment was already initialized."); executionContext = newExecutionContext; executionContext.InitApplication(); /* Initialize Command manager */ commandManager = new CommandManager(); /* Initialize handlers */ handlers = new EventHandlers(); /* Initialize misc */ clipboards = new Clipboards(); globalAccelerators = new GlobalAccelerators(); dragDrop = new DragDrop(); config = new Config(); dialogs = new Dialogs(); spellLanguages = new SpellLanguages(); backup = new Backup(); /* Initialize the GUI */ ui = new MainUi(handlers, out glade); clipboards.WatchPrimaryChanges = true; Catalog.Init(ExecutionContext.TranslationDomain, ExecutionContext.LocaleDir); EmitInitFinishedEvent(); }
public Task <bool> ClearClipboardList() { Clipboards.Clear(); return(Task.FromResult(true)); }