Exemplo n.º 1
0
        private void cmnuCopy_Click(object sender, EventArgs e)
        {
            List <ApplicationJob> jobs = new List <ApplicationJob>();

            foreach (ApplicationJob job in olvJobs.SelectedObjects)
            {
                jobs.Add(job);
            }

            SafeClipboard.SetData(ApplicationJob.GetXml(jobs, false, Encoding.UTF8), false);
        }
Exemplo n.º 2
0
        private void bCopyToClipboard_Click(object sender, EventArgs e)
        {
            StringBuilder sb = new StringBuilder();

            // Copy all errors to clipboard (separated with tabs and newlines)
            foreach (ApplicationJobError error in m_Errors)
            {
                sb.Append(error.ApplicationJob.Name);
                sb.Append("\t");
                sb.AppendLine(error.Message);
            }

            SafeClipboard.SetData(sb.ToString(), true);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Double clicking a .NET label copies its content to the clipboard.
 /// Try to avoid this behaviour.
 /// </summary>
 protected override void WndProc(ref Message m)
 {
     if (m.Msg == WM_LBUTTONDBLCLK)
     {
         doubleclickflag = true;
     }
     if (m.Msg == WM_GETTEXT && doubleclickflag)
     {
         object currentClipboardContent = SafeClipboard.GetData(DataFormats.Text);
         if (currentClipboardContent != null)
         {
             this.BeginInvoke((MethodInvoker) delegate()
             {
                 SafeClipboard.SetData(currentClipboardContent, true);
             });
         }
         doubleclickflag = false;
         return;
     }
     base.WndProc(ref m);
 }
Exemplo n.º 4
0
 private void cmnuCopyMatch_Click(object sender, EventArgs e)
 {
     SafeClipboard.SetData(MatchSelection, true);
 }
Exemplo n.º 5
0
 private void cmnuCopy_Click(object sender, EventArgs e)
 {
     SafeClipboard.SetData(rtfContent.SelectedText, true);
 }
Exemplo n.º 6
0
        private void cmnuCopy_Click(object sender, EventArgs e)
        {
            List <ApplicationJob> jobs = this.olvJobs.SelectedObjects.OfType <ApplicationJob>().ToList();

            SafeClipboard.SetData(ApplicationJob.GetXml(jobs, false, Encoding.UTF8), false);
        }