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