1 write to _dragComponents
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
109
_dragComponents
= new DragComponent[dragComponents.Count];
67 references to _dragComponents
System.Windows.Forms.Design (67)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (67)
231
Control currentControl =
_dragComponents
[dragComponentIndex].dragComponent as Control;
264
PropertyDescriptor propLoc = TypeDescriptor.GetProperties(
_dragComponents
[dragComponentIndex].dragComponent)["Location"];
265
if ((propLoc is not null) && (
_dragComponents
[dragComponentIndex].dragComponent is Control currentControl))
358
if (
_dragComponents
is not null &&
_dragComponents
.Length > 0)
363
if (
_dragComponents
.Length == 1)
365
string name = TypeDescriptor.GetComponentName(
_dragComponents
[0].dragComponent);
368
name =
_dragComponents
[0].dragComponent.GetType().Name;
375
transDesc = string.Format(performCopy ? SR.BehaviorServiceCopyControls : SR.BehaviorServiceMoveControls,
_dragComponents
.Length);
406
for (int i = 0; i <
_dragComponents
.Length; i++)
408
temp.Add(
_dragComponents
[i].dragComponent);
424
originalControls.Add(
_dragComponents
[j].dragComponent);
425
_dragComponents
[j].dragComponent = temp[j];
442
Point initialDropPoint = _behaviorServiceSource.AdornerWindowPointToScreen(
_dragComponents
[_primaryComponentIndex].draggedLocation);
448
initialDropPoint = ((Control)
_dragComponents
[_primaryComponentIndex].dragComponent).Parent.PointToClient(initialDropPoint);
453
if (((Control)(
_dragComponents
[_primaryComponentIndex].dragComponent)).Parent.IsMirrored)
455
initialDropPoint.Offset(-((Control)(
_dragComponents
[_primaryComponentIndex].dragComponent)).Width, 0);
459
Control primaryComponent =
_dragComponents
[_primaryComponentIndex].dragComponent as Control;
481
_shareParent ?
_dragComponents
[_primaryComponentIndex].zorderIndex : 0, allowSetChildIndexOnDrop);
482
selSvc?.SetSelectedComponents(new object[] {
_dragComponents
[_primaryComponentIndex].dragComponent }, SelectionTypes.Primary | SelectionTypes.Replace);
484
for (int i = 0; i <
_dragComponents
.Length; i++)
493
Point dropPoint = new(initialDropPoint.X +
_dragComponents
[i].positionOffset.X,
494
initialDropPoint.Y +
_dragComponents
[i].positionOffset.Y);
496
_shareParent ?
_dragComponents
[i].zorderIndex : 0, allowSetChildIndexOnDrop);
497
selSvc?.SetSelectedComponents(new object[] {
_dragComponents
[i].dragComponent }, SelectionTypes.Add);
514
_dragComponents
[i].dragComponent = originalControls[i];
576
_dragComponents
[i].dragComponent = originalControls[i];
583
_statusCommandUITarget?.SetStatusInformation(selSvc is null ?
_dragComponents
[_primaryComponentIndex].dragComponent as Component :
739
Point newPosition = new(mouseLoc.X - _initialMouseLoc.X +
_dragComponents
[_primaryComponentIndex].originalControlLocation.X,
740
mouseLoc.Y - _initialMouseLoc.Y +
_dragComponents
[_primaryComponentIndex].originalControlLocation.Y);
745
_dragComponents
[_primaryComponentIndex].dragImage.Width,
746
_dragComponents
[_primaryComponentIndex].dragImage.Height);
781
_dragComponents
[_primaryComponentIndex].draggedLocation = MapPointFromTargetToSource(newPosition);
820
if (
_dragComponents
[_primaryComponentIndex].dragComponent is Control c)
823
Point dropPoint = _behaviorServiceSource.AdornerWindowPointToScreen(
_dragComponents
[_primaryComponentIndex].draggedLocation);
884
if (
_dragComponents
[_primaryComponentIndex].dragComponent is Control)
947
_dragComponents
[i].dragComponent = _dragObjects[i];
948
_dragComponents
[i].positionOffset = new Point(dragControl.Location.X - primaryControl.Location.X,
963
_dragComponents
[i].draggedLocation = controlRect.Location;
964
_dragComponents
[i].originalControlLocation =
_dragComponents
[i].draggedLocation;
966
DesignerUtils.GenerateSnapShot(dragControl, out
_dragComponents
[i].dragImage, i == 0 ? 2 : 1, 1, backColor);
972
_dragComponents
[i].zorderIndex = primaryParent.Controls.GetChildIndex(dragControl, false /*throwException*/);
973
if (
_dragComponents
[i].zorderIndex == -1)
982
Array.Sort(
_dragComponents
, this);
986
for (int i = 0; i <
_dragComponents
.Length; i++)
988
if (primaryControl.Equals(
_dragComponents
[i].dragComponent as Control))
1031
for (int i = 0; i <
_dragComponents
.Length; i++)
1033
Rectangle controlRect = new(
_dragComponents
[i].draggedLocation.X - _dragImageRect.X,
1034
_dragComponents
[i].draggedLocation.Y - _dragImageRect.Y,
1035
_dragComponents
[i].dragImage.Width,
_dragComponents
[i].dragImage.Height);
1039
g.DrawImage(
_dragComponents
[i].dragImage, controlRect,
1040
new Rectangle(0, 0,
_dragComponents
[i].dragImage.Width,
_dragComponents
[i].dragImage.Height),
1056
if ((
_dragComponents
is not null) && (
_dragComponents
.Length > 0))
1059
for (int i = 0; i <
_dragComponents
.Length; i++)
1061
dragControls.Add(
_dragComponents
[i].dragComponent);
1112
if (
_dragComponents
is not null)
1114
for (int i = 0; i <
_dragComponents
.Length; i++)
1116
if (
_dragComponents
[i].dragComponent is Control c)
1172
if (
_dragComponents
is not null)
1174
for (int i = 0; i <
_dragComponents
.Length; i++)
1176
if (
_dragComponents
[i].dragImage is not null)
1178
_dragComponents
[i].dragImage.Dispose();
1179
_dragComponents
[i].dragImage = null;