Exemple #1
0
 private void CopyToClipboard()
 {
     if (_listBox.SelectedItems.Count > 0)
     {
         var selectedItemsAsRTFText = new StringBuilder();
         foreach (LogEventArgs logEvent in _listBox.SelectedItems)
         {
             selectedItemsAsRTFText.Append(FormatALogEventMessage(logEvent, _messageFormat));
         }
         var worker = new ClipboardHelper(DataFormats.Text, selectedItemsAsRTFText.ToString());
         worker.Go();
     }
 }