private void cutToolStripMenuItem_Click(object sender, EventArgs e) { SchemaDialogCutCommand cmd = new SchemaDialogCutCommand(this.dataGridView1, this.items); Push(cmd); if (!string.IsNullOrEmpty(cmd.Clip)) { Clipboard.SetText(cmd.Clip); } }
private void copyToolStripMenuItem_Click(object sender, EventArgs e) { SchemaDialogCutCommand cmd = new SchemaDialogCutCommand(this.dataGridView1, this.items); StringBuilder clip = new StringBuilder(); cmd.ProcessSelectedRows(delegate(DataGridViewRow row, SchemaItem item) { cmd.AddEscapedUri(clip, row.Cells[2].Value as string); }); if (clip.Length > 0) { Clipboard.SetText(clip.ToString()); } }