private void CbMonitorWindow_ClipboardContentChanged(object sender, EventArgs e) { string text = WinClipboard.ReadText(); if (text == null) { ISLogger.Write("WindowsClipboardMonitor: Failed to read clipboard: win32 code {0}", Marshal.GetLastWin32Error().ToString("X")); return; } TextCopied?.Invoke(this, text); }
public void Execute(object parameter) { string content = parameter as string; if (content != null) { DataPackage clipContents = new DataPackage(); clipContents.SetText(content); Clipboard.SetContent(clipContents); TextCopied?.Invoke(this, content); } }
private void textEditor_TextArea_TextCopied(object sender, TextEventArgs e) { TextCopied?.Invoke(this, e); }
/// <summary> /// Raises the <see cref="E:TextCopied" /> event. /// </summary> /// <param name="e">The <see cref="ClipboardEventArgs"/> instance containing the event data.</param> protected virtual void OnTextCopied(ClipboardEventArgs e) { TextCopied?.Invoke(this, e); }
internal void OnTextCopied(TextEventArgs e) { TextCopied?.Invoke(this, e); }