private void ButtonCopyClick(object sender, EventArgs e) { StringBuilder versionInfo = new StringBuilder(); foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies()) { AssemblyName name = a.GetName(); versionInfo.Append(name.Name); versionInfo.Append(","); versionInfo.Append(name.Version.ToString()); versionInfo.Append(","); try { versionInfo.Append(a.Location); } catch (NotSupportedException) { versionInfo.Append("dynamic"); } versionInfo.Append(Environment.NewLine); } ClipboardWrapper.SetDataObject(versionInfo.ToString()); }
public void Copy() { if (resourceEditor.ResourceList.SelectedItems.Count < 1) { return; } Hashtable tmphash = new Hashtable(); foreach (ListViewItem item in resourceEditor.ResourceList.SelectedItems) { object resourceValue = GetClonedResource(resourceEditor.ResourceList.Resources[item.Text].ResourceValue); tmphash.Add(item.Text, resourceValue); // copy a clone to clipboard } ClipboardWrapper.SetDataObject(tmphash); }
public void Cut() { if (resourceEditor.ResourceList.WriteProtected || resourceEditor.ResourceList.SelectedItems.Count < 1) { return; } Hashtable tmphash = new Hashtable(); foreach (ListViewItem item in resourceEditor.ResourceList.SelectedItems) { tmphash.Add(item.Text, resourceEditor.ResourceList.Resources[item.Text].ResourceValue); resourceEditor.ResourceList.Resources.Remove(item.Text); resourceEditor.ResourceList.Items.Remove(item); } resourceEditor.ResourceList.OnChanged(); ClipboardWrapper.SetDataObject(tmphash); }
public override void Cut() { DoPerformCut = true; ClipboardWrapper.SetDataObject(new DataObject(typeof(ISolutionFolder).ToString(), folder.IdGuid)); }
public override void Cut() { DoPerformCut = true; ClipboardWrapper.SetDataObject(FileOperationClipboardObject.CreateDataObject(this, true)); }
public override void Copy() { ClipboardWrapper.SetDataObject(FileOperationClipboardObject.CreateDataObject(this, false)); }