protected virtual void OnClipboardContentChanged(ClipboardContentChangedEventArgs e) { if (isStarted) { ClipboardContentChanged?.Invoke(this, e); } }
public void SetText(string text) { Clear(); System.Windows.Clipboard.SetText(text); ClipboardContentChanged?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Handles wind32 interop messages. /// </summary> private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { if (msg == (int)NativeMethods.WM.CLIPBOARDUPDATE) { ClipboardContentChanged?.Invoke(this, EventArgs.Empty); handled = true; } return(IntPtr.Zero); }
public void SetFiles(IEnumerable <string> paths, ClipboardFilesState filesState) { Clear(); FilesState = filesState; var collection = new StringCollection(); foreach (var t in paths) { collection.Add(t); } System.Windows.Clipboard.SetFileDropList(collection); ClipboardContentChanged?.Invoke(this, EventArgs.Empty); }
public void NotifyClipboardContentChanged(bool fromView, string newContent) { ClipboardContentChanged?.Invoke(fromView, newContent); }
protected void OnClipboardDataChanged(ClipboardDataBase data) { ClipboardContentChanged?.Invoke(this, data); }