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