System.Windows.Forms.Clipboard.SetText(string, System.Windows.Forms.TextDataFormat)

Here are the examples of the csharp api class System.Windows.Forms.Clipboard.SetText(string, System.Windows.Forms.TextDataFormat) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

200 Examples 7

1. Example

Project: sharpneat
Source File: MainForm.cs
View license
private void btnCopyLogToClipboard_Click(object sender, EventArgs e)
        {
            StringBuilder sb = new StringBuilder();
            foreach(Logger.LogItem item in lbxLog.Items) {
                sb.AppendLine(item.Message);
            }

            if(sb.Length > 0) {
                Clipboard.SetText(sb.ToString());
            }
        }

2. Example

Project: RNGReporter
Source File: Adjacents.cs
View license
private void copySeedToClipboardToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (dataGridViewCapValues.SelectedRows[0] != null)
            {
                var frame = (IFrameCapture) dataGridViewCapValues.SelectedRows[0].DataBoundItem;

                Clipboard.SetText(frame.Seed.ToString("X8"));
            }
        }

3. Example

Project: RNGReporter
Source File: EntralinkSeedSearch.cs
View license
private void copySeedToClipboardToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (dataGridViewCapValues.SelectedRows[0] != null)
            {
                var frame = (IFrameCapture) dataGridViewCapValues.SelectedRows[0].DataBoundItem;

                Clipboard.SetText(frame.Seed.ToString("X8"));
            }
        }

4. Example

Project: RNGReporter
Source File: GameCube.cs
View license
private void copySeedToClipboard_Click(object sender, EventArgs e)
        {
            if (dataGridViewResult.SelectedRows[0] != null)
            {
                var frame = (DisplayList)dataGridViewResult.SelectedRows[0].DataBoundItem;
                Clipboard.SetText(frame.Seed.ToString());
            }
        }

5. Example

Project: RNGReporter
Source File: IVtoPID_SID_SEED.cs
View license
private void copyPIDToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //  Get currently selected item
            if (dataGridViewValues.SelectedRows.Count > 0)
            {
                var seed = (Seed)dataGridViewValues.SelectedRows[0].DataBoundItem;
                Clipboard.SetText(seed.Pid.ToString("X"));
            }
        }

6. Example

Project: RNGReporter
Source File: Pandora.cs
View license
private void copySeedToClipboardToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (dgvResults.SelectedRows[0] != null)
            {
                var frame = (IDList)dgvResults.SelectedRows[0].DataBoundItem;

                Clipboard.SetText(frame.Seed.ToString("X8"));
            }
        }

7. Example

Project: RNGReporter
Source File: PIDToIVs.cs
View license
private void copySeedToClipboard_Click(object sender, EventArgs e)
        {
            if (dataGridViewValues.SelectedRows[0] != null)
            {
                var frame = (PIDIVS)dataGridViewValues.SelectedRows[0].DataBoundItem;
                Clipboard.SetText(frame.Seed.ToString());
            }
        }

8. Example

Project: RNGReporter
Source File: SeedToTime.cs
View license
private void copySeedToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dataGridViewAdjacents.SelectedRows[0] != null)
            {
                var adjacent = (Adjacent) dataGridViewAdjacents.SelectedRows[0].DataBoundItem;

                Clipboard.SetText(adjacent.Seed.ToString("X8"));
            }
        }

9. Example

Project: RNGReporter
Source File: TimeFinder3rd.cs
View license
private void copySeedToClipboard_Click(object sender, EventArgs e)
        {
            if (dataGridViewResult.SelectedRows[0] != null)
            {
                var frame = (WildSlots)dataGridViewResult.SelectedRows[0].DataBoundItem;
                Clipboard.SetText(frame.Seed.ToString());
            }
        }

10. Example

Project: RNGReporter
Source File: TimeFinder4th.cs
View license
private void copySeedToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dataGridViewEggIVValues.SelectedRows[0] != null)
            {
                var frame = (IFrameBreeding) dataGridViewEggIVValues.SelectedRows[0].DataBoundItem;

                Clipboard.SetText(frame.Seed.ToString("X8"));
            }
        }

11. Example

Project: RNGReporter
Source File: TimeFinder4th.cs
View license
private void copySeedToClipboardToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (dataGridViewCapValues.SelectedRows[0] != null)
            {
                var frame = (IFrameCapture) dataGridViewCapValues.SelectedRows[0].DataBoundItem;

                Clipboard.SetText(frame.Seed.ToString("X8"));
            }
        }

12. Example

Project: RNGReporter
Source File: TimeFinder4th.cs
View license
private void copySeedToClipboardToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            if (dataGridViewShinyResults.SelectedRows[0] != null)
            {
                try
                {
                    var frame = (IFrameEggPID) dataGridViewShinyResults.SelectedRows[0].DataBoundItem;
                    Clipboard.SetText(frame.Seed.ToString("X8"));
                }
                catch
                {
                    var frame = (IFrameCapture) dataGridViewShinyResults.SelectedRows[0].DataBoundItem;
                    Clipboard.SetText(frame.Seed.ToString("X16"));
                }
            }
        }

13. Example

Project: RNGReporter
Source File: TimeFinder5th.cs
View license
private void copySeedToClipboardToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (dataGridViewCapValues.SelectedRows[0] != null)
            {
                var frame = (IFrameCapture) dataGridViewCapValues.SelectedRows[0].DataBoundItem;

                Clipboard.SetText(frame.Seed.ToString("X8"));
            }
        }

14. Example

Project: RNGReporter
Source File: TimeFinder5th.cs
View license
private void copySeedToClipboardToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            if (dataGridViewShinyResults.SelectedRows[0] != null)
            {
                try
                {
                    var frame = (IFrameEggPID) dataGridViewShinyResults.SelectedRows[0].DataBoundItem;
                    Clipboard.SetText(frame.Seed.ToString("X8"));
                }
                catch
                {
                    var frame = (IFrameCapture) dataGridViewShinyResults.SelectedRows[0].DataBoundItem;
                    Clipboard.SetText(frame.Seed.ToString("X16"));
                }
            }
        }

15. Example

Project: RNGReporter
Source File: TimeFinder5th.cs
View license
private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (dgvHiddenGrottos.SelectedRows[0] != null)
            {
                // this should always be a size 16 string
                // catch is only to prevent crashes in stupid cases
                try
                {
                    var frame = (Hollow) dgvHiddenGrottos.SelectedRows[0].DataBoundItem;
                    Clipboard.SetText(frame.Seed.ToString("X16"));
                }
                catch
                {
                }
            }
        }

16. Example

Project: RNGReporter
Source File: TogamiCalc.cs
View license
private void copySeedToClipboard_Click(object sender, EventArgs e)
        {
            if (dataGridViewValues.SelectedRows[0] != null)
            {
                var frame = (RTCTime)dataGridViewValues.SelectedRows[0].DataBoundItem;
                Clipboard.SetText(frame.Seed);
            }
        }

17. Example

Project: ImageGlass
Source File: frmMain.cs
View license
private void mnuMainCopyImagePath_Click(object sender, EventArgs e)
        {
            try
            {
                Clipboard.SetText(GlobalSetting.ImageList.GetFileName(GlobalSetting.CurrentIndex));
            }
            catch { }
        }

18. Example

Project: ImageGlass
Source File: ImageComparator.cs
View license
private void lnkCopy_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Clipboard.SetText(lblResult.Text);
        }

19. Example

Project: storybrew
Source File: ClipboardHelper.cs
View license
public static void SetText(string text, TextDataFormat format = TextDataFormat.Text)
            => Misc.WithRetries(() => Clipboard.SetText(text, format), 500, false);

20. Example

View license
private void userButton_login_Click(object sender, EventArgs e)
        {
            Clipboard.SetText(textBox1.Text);
        }

21. Example

Project: CharacterEditor
Source File: ExceptionDialog.cs
View license
private void ButtonCopyToClipboardClick(object sender, EventArgs e)
		{
			Clipboard.SetText(textBoxExceptionInformation.Text);
		}

22. Example

Project: FreeLauncher
Source File: LauncherForm.cs
View license
private void SetToClipboardButton_Click(object sender, EventArgs e)
        {
            Clipboard.SetText(logBox.Text);
        }

23. Example

Project: DFAssist
Source File: MainForm.cs
View license
private void toolStripMenuItem_LogCopy_Click(object sender, EventArgs e)
        {
            Clipboard.SetText(richTextBox_Log.Text);
            LMessageBox.I("ui-clipboard-copied");
        }

24. Example

Project: ModBot
Source File: GiveawaysWindow.cs
View license
private void Giveaway_CopyWinnerButton_Click(object sender, EventArgs e)
        {
            System.Windows.Forms.Clipboard.SetText(Giveaway_WinnerLabel.Text);
        }

25. Example

Project: WsdlUI
Source File: dg_Error.cs
View license
void btn_Copy_Click(object sender, EventArgs e) {
            Clipboard.SetText(rtb_error.Text);
        }

26. Example

Project: sharpshell
Source File: AdvancedContextMenu.cs
View license
protected void DoCopyPath()
        {
            Clipboard.SetText(SelectedItemPaths.First());
        }

27. Example

Project: EvilFOCA
Source File: FormMain.cs
View license
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (treeView.SelectedNode != null)
                Clipboard.SetText(treeView.SelectedNode.Text);
        }

28. Example

Project: SeleniumBasic
Source File: ClipboardExt.cs
View license
public static void SetText(string value) {
            ThreadExt.RunSTA(() => {
                Clipboard.SetText(value, TextDataFormat.UnicodeText);
                return 0;
            }, 6000);
        }

29. Example

View license
private void copyButton_Click(object sender, EventArgs e)
        {
            Clipboard.SetText(this.stackFormatted.stackRichTextBox.Text);
        }

30. Example

Project: mbunit-v3
Source File: RuntimeLogWindow.cs
View license
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Clipboard.SetText(logBody.SelectedText);
        }

31. Example

View license
void copyGUID()
		{
			if (this.NavigatorTree.SelectedNode != null)
			{
				UML.Extended.UMLItem selectedElement = this.NavigatorTree.SelectedNode.Tag as UML.Extended.UMLItem;
				if (selectedElement.uniqueID != null)
				{
					Clipboard.SetText(selectedElement.uniqueID);
				}
			}
		}

32. Example

Project: gitextensions
Source File: RevisionGrid.cs
View license
private void MessageToolStripMenuItemClick(object sender, EventArgs e)
        {
            Clipboard.SetText(LatestSelectedRevision.Subject);
        }

33. Example

Project: gitextensions
Source File: RevisionGrid.cs
View license
private void AuthorToolStripMenuItemClick(object sender, EventArgs e)
        {
            Clipboard.SetText(LatestSelectedRevision.Author);
        }

34. Example

Project: gitextensions
Source File: RevisionGrid.cs
View license
private void DateToolStripMenuItemClick(object sender, EventArgs e)
        {
            Clipboard.SetText(LatestSelectedRevision.CommitDate.ToString());
        }

35. Example

Project: gitextensions
Source File: RevisionGrid.cs
View license
private void HashToolStripMenuItemClick(object sender, EventArgs e)
        {
            Clipboard.SetText(LatestSelectedRevision.Guid);
        }

36. Example

View license
private void buttonCopyOrigOutput_Click(object sender, EventArgs e)
        {
            Clipboard.SetText(textBoxResult.Text);
        }

37. Example

Project: Baka-MPlayer-old
Source File: InfoForm.cs
View license
private void menuItem1_Click(object sender, EventArgs e)
        {
            // Copy Info Type
            Clipboard.SetText(infoList.Items[InfoListSelectedIndex].Text, TextDataFormat.UnicodeText);
        }

38. Example

Project: Baka-MPlayer-old
Source File: InfoForm.cs
View license
private void menuItem2_Click(object sender, EventArgs e)
        {
            // Copy Info Value
            Clipboard.SetText(infoList.Items[InfoListSelectedIndex].SubItems[1].Text, TextDataFormat.UnicodeText);
        }

39. Example

Project: Baka-MPlayer-old
Source File: InfoForm.cs
View license
private void menuItem4_Click(object sender, EventArgs e)
        {
            // Copy Tag Value
            Clipboard.SetText(tagList.Items[TagListSelectedIndex].SubItems[1].Text, TextDataFormat.UnicodeText);
        }

40. Example

Project: Baka-MPlayer-old
Source File: InfoForm.cs
View license
private void nameLabel_Click(object sender, EventArgs e)
        {
            Clipboard.SetText(nameLabel.Text);
        }

41. Example

View license
private static void CopyToClipboard(string builder)
        {
            try
            {
                Clipboard.SetText(builder.ToString());
            }
            catch (ExternalException)
            {
            }
        }

42. Example

Project: openHistorian
Source File: FrmMain.cs
View license
private void button1_Click(object sender, EventArgs e)
        {
            Clipboard.SetText(StepTimer.GetResultsPercent());
            StepTimer.Reset();
        }

43. Example

Project: IceChat
Source File: FormChannelInfo.cs
View license
private void copyToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //copy to clipboard
            if (listViewBans.SelectedItems.Count == 1)
            {
                Clipboard.SetText(listViewBans.SelectedItems[0].Text);
            }
        }

44. Example

Project: Histacom2
Source File: WinClassicTerminal.cs
View license
private void btnCopy_Click(object sender, EventArgs e)
        {
            if (cmdPrompt.SelectedText.Length > 0)
                Clipboard.SetText(cmdPrompt.SelectedText); // Set the clipboard text to the selection of the RichTextBox
            else
                wm.StartInfobox95("ERROR", "You need to select something to copy.", Engine.Template.InfoboxType.Error, Engine.Template.InfoboxButtons.OK); // Display an error message if the length is 0 
        }

45. Example

Project: trizbort
Source File: MainForm.cs
View license
private void exportCode<T>() where T: CodeExporter, new()
    {
      using (var exporter = new T())
      {
        string s = exporter.Export();
        Clipboard.SetText(s,TextDataFormat.Text);
      }
    }

46. Example

View license
private void trayCopySteamGuard_Click(object sender, EventArgs e)
        {
            if (txtLoginToken.Text != "")
            {
                Clipboard.SetText(txtLoginToken.Text);
            }
        }

47. Example

Project: lua-tilde
Source File: DocumentView.cs
View license
private void copyFullPathToolStripMenuItem_Click(object sender, EventArgs e)
		{
			Clipboard.SetText(mDocument.FileName);
		}

48. Example

Project: logwizard
Source File: select_color_form.cs
View license
private void ok_Click(object sender, EventArgs e) {
            if ( copy_to_clipboard)
                Clipboard.SetText( util.color_to_str(SelectedColor) );
            DialogResult = DialogResult.OK;
        }

49. Example

Project: BeanfunLogin
Source File: Form1.cs
View license
private void textBox3_OnClick(object sender, EventArgs e)
        {
            if (textBox3.Text == "" || textBox3.Text == "????") return;
            Clipboard.SetText(textBox3.Text);
        }

50. Example

Project: BeanfunLogin
Source File: Form1.cs
View license
private void listView1_DoubleClick(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count == 1)
            {
                Clipboard.SetText(this.bfClient.accountList[this.listView1.SelectedItems[0].Index].sacc);
            }
        }