예제 #1
0
        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);
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
 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);
 }
예제 #5
0
 internal void OnTextCopied(TextEventArgs e)
 {
     TextCopied?.Invoke(this, e);
 }