93 references to Copy
System.Windows.Forms (4)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (2)
160e.Effect = keyState.HasFlag(MODIFIERKEYS_FLAGS.MK_CONTROL) ? DragDropEffects.Copy : DragDropEffects.Move; 251? DragDropEffects.Copy
System\Windows\Forms\OLE\DragDropEffects.cs (1)
38All = Copy | Move | Scroll,
System\Windows\Forms\OLE\DropImageType.cs (1)
24Copy = DragDropEffects.Copy,
System.Windows.Forms.Design (45)
System\Windows\Forms\Design\Behavior\Behavior.cs (1)
330e.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move;
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (6)
108_allowedEffects = DragDropEffects.Copy | DragDropEffects.None | DragDropEffects.Move; 232if (_lastEffect == DragDropEffects.Copy || (_srcHost != _destHost && _destHost is not null)) 337bool performCopy = (_lastEffect == DragDropEffects.Copy); 627if (_data.Target.Equals(_data.Source) && _lastEffect != DragDropEffects.Copy) 724if (ShowHideDragControls(_lastEffect == DragDropEffects.Copy) && !createNewDragAssistance) 735_dragAssistanceManager = new DragAssistanceManager(_serviceProviderTarget, _graphicsTarget, _dragObjects, null, _lastEffect == DragDropEffects.Copy);
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (2)
252ReParentControls(components, e.Effect == DragDropEffects.Copy); 312? DragDropEffects.Copy
System\Windows\Forms\Design\ComponentTray.cs (5)
1098de.Effect = DragDropEffects.Copy; 1129Debug.Assert((de.AllowedEffect & (DragDropEffects.Move | DragDropEffects.Copy)) != 0, "DragDropEffect.Move | .Copy isn't allowed?"); 1136de.Effect = DragDropEffects.Copy; 1163Debug.Assert((de.AllowedEffect & DragDropEffects.Copy) != 0, "DragDropEffect.Move isn't allowed?"); 1164de.Effect = DragDropEffects.Copy;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
564bool performCopy = de.Effect == DragDropEffects.Copy;
System\Windows\Forms\Design\OleDragDropHandler.cs (16)
467DragDropEffects allowedEffects = DragDropEffects.Copy | DragDropEffects.None | DragDropEffects.Move; 619bool copyAllowed = (de.AllowedEffect & DragDropEffects.Copy) != DragDropEffects.None; 624de.Effect = DragDropEffects.Copy; 628if ((de.Effect & DragDropEffects.Copy) != 0 && !copyAllowed) 640else if ((de.Effect & DragDropEffects.Copy) != 0) 642de.Effect = DragDropEffects.Copy; 664if (_dragOk || (_localDragInside && de.Effect == DragDropEffects.Copy)) 684if (de.Effect == DragDropEffects.Copy || newContainer) 688cdo.Deserialize(_serviceProvider, (de.Effect & DragDropEffects.Copy) == 0); 880if ((de.KeyState & (int)MODIFIERKEYS_FLAGS.MK_CONTROL) != 0 && (de.AllowedEffect & DragDropEffects.Copy) != 0) 882de.Effect = DragDropEffects.Copy; 898&& (de.AllowedEffect & DragDropEffects.Copy) != 0 901de.Effect = DragDropEffects.Copy; 955&& (de.AllowedEffect & DragDropEffects.Copy) != 0 988de.Effect = DragDropEffects.Copy; 1012e.UseDefaultCursors = ((!_localDragInside && !_forceDrawFrames) || ((e.Effect & (DragDropEffects.Copy)) != 0)) || e.Effect == DragDropEffects.None;
System\Windows\Forms\Design\ParentControlDesigner.cs (6)
1459de.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move; 1614Debug.Assert((de.AllowedEffect & (DragDropEffects.Move | DragDropEffects.Copy)) != 0, "DragDropEffect.Move | .Copy isn't allowed?"); 1621de.Effect = DragDropEffects.Copy; 1659de.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move; 1687Debug.Assert((de.AllowedEffect & DragDropEffects.Copy) != 0, "DragDropEffect.Move isn't allowed?"); 1688de.Effect = DragDropEffects.Copy;
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
495bool localCopy = ((de is not null) && (de.Effect == DragDropEffects.Copy) && localReposition);
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
1836bool copy = (de.Effect == DragDropEffects.Copy); 2286de.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move;
System\Windows\Forms\Design\ToolStripItemBehavior.cs (2)
660bool copy = (e.Effect == DragDropEffects.Copy); 886e.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move;
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (3)
2651e.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move; 2666e.Effect = (Control.ModifierKeys == Keys.Control) ? DragDropEffects.Copy : DragDropEffects.Move; 2696bool copy = (e.Effect == DragDropEffects.Copy);
System.Windows.Forms.Tests (25)
System\Windows\Forms\ControlTests.Handlers.cs (1)
1302yield return new object[] { new DragEventArgs(null, 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move) };
System\Windows\Forms\DragDropHelperTests.cs (16)
32yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Invalid, string.Empty, string.Empty) }; 33yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.None, string.Empty, string.Empty) }; 34yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Copy, "Copy to %1", "Documents") }; 35yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Move, "Move to %1", "Documents") }; 36yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Link, "Create link in %1", "Documents") }; 37yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Label, "Update metadata in %1", "Document") }; 38yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.Warning, "A problem has been encountered", string.Empty) }; 39yield return new object[] { new DragEventArgs(new DataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Copy, DropImageType.NoImage, "Copy to %1", "Documents") };
System\Windows\Forms\DragEventArgsTests.cs (7)
12yield return new object[] { new CustomDataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move }; 18yield return new object[] { new CustomDataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move, DropImageType.Copy, "Move to %1", "Documents" }; 52[InlineData(DragDropEffects.Copy)] 56DragEventArgs e = new(new CustomDataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move) 68DragEventArgs e = new(new CustomDataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move, DropImageType.Copy, "Copy to %1", "Documents") 80DragEventArgs e = new(new CustomDataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move, DropImageType.Copy, "Move to %1", "Documents") 92DragEventArgs e = new(new CustomDataObject(), 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move, DropImageType.Copy, "Move to %1", "Desktop")
System\Windows\Forms\ToolStripControlHostTests.cs (1)
3345yield return new object[] { new DragEventArgs(null, 1, 2, 3, DragDropEffects.Copy, DragDropEffects.Move) };
System.Windows.Forms.UI.IntegrationTests (12)
DesignBehaviorsTests.cs (1)
118var effects = node.TreeView!.DoDragDrop(dataObject!, DragDropEffects.Copy);
DragDropTests.cs (11)
72e.Effect = DragDropEffects.Copy; 81e.Effect = DragDropEffects.Copy; 96form.DoDragDrop(data, DragDropEffects.Copy); 286e.Effect = DragDropEffects.Copy; 295e.Effect = DragDropEffects.Copy; 309form.DoDragDrop(data, DragDropEffects.Copy); 357e.Effect = DragDropEffects.Copy; 787(e.AllowedEffect & DragDropEffects.Copy) == DragDropEffects.Copy) 790e.Effect = DragDropEffects.Copy; 831if (item is not null && (e.Effect == DragDropEffects.Copy || e.Effect == DragDropEffects.Move))
TrimTest (2)
Form1.cs (2)
21e.Effect = DragDropEffects.Copy; 29e.Effect = DragDropEffects.Copy;
WinFormsControlsTest (5)
DragDrop.cs (5)
126e.Effect = DragDropEffects.Copy; 151e.Effect = DragDropEffects.Copy; 189if (e.Effect.Equals(DragDropEffects.Copy)) 243e.Effect = DragDropEffects.Copy; 285e.Effect = DragDropEffects.Copy;