/// <summary> /// Raises the <see cref="RemoteClipboardChanged"/> event. /// </summary> /// <param name="e"> /// A <see cref="RemoteClipboardChangedEventArgs"/> that contains information on the /// clipboard changes. /// </param> protected virtual void OnRemoteClipboardChanged(RemoteClipboardChangedEventArgs e) { var ev = this.RemoteClipboardChanged; if (ev != null) { ev(this, e); } }
protected void RaiseRemoteClipboardChanged(RemoteClipboardChangedEventArgs e) { var ev = RemoteClipboardChanged; if (ev != null) { ev(this, e); } }
/// <summary> /// Raises the <see cref="RemoteClipboardChanged"/> event. /// </summary> /// <param name="e"> /// A <see cref="RemoteClipboardChangedEventArgs"/> that contains information on the /// clipboard changes. /// </param> protected virtual void OnRemoteClipboardChanged(RemoteClipboardChangedEventArgs e) { this.RemoteClipboardChanged?.Invoke(this, e); }
protected virtual void OnRemoteClipboardChanged(RemoteClipboardChangedEventArgs e) { RaiseRemoteClipboardChanged(e); }
void HandleRemoteClipboardChanged(object sender, RemoteClipboardChangedEventArgs e) { if (AllowClipboardSharingFromServer) { if (e.Contents.Length != 0 && _expectedClipboard != e.Contents) { try { Clipboard.SetText(e.Contents); _expectedClipboard = e.Contents; } catch (ExternalException) { } } } }