internal DropSourceBehavior(ICollection dragComponents, Control source, Point initialMouseLocation) { this.serviceProviderSource = source.Site; if (this.serviceProviderSource != null) { this.behaviorServiceSource = (BehaviorService) this.serviceProviderSource.GetService(typeof(BehaviorService)); if ((this.behaviorServiceSource != null) && ((dragComponents != null) && (dragComponents.Count > 0))) { this.srcHost = (IDesignerHost) this.serviceProviderSource.GetService(typeof(IDesignerHost)); if (this.srcHost != null) { this.data = new BehaviorDataObject(dragComponents, source, this); this.allowedEffects = DragDropEffects.Move | DragDropEffects.Copy; this.dragComponents = new DragComponent[dragComponents.Count]; this.parentGridSize = Size.Empty; this.lastEffect = DragDropEffects.None; this.lastFeedbackLocation = new Point(-1, -1); this.lastSnapOffset = Point.Empty; this.dragImageRect = Rectangle.Empty; this.clearDragImageRect = Rectangle.Empty; this.InitiateDrag(initialMouseLocation, dragComponents); } } } }
internal DropSourceBehavior(ICollection dragComponents, Control source, Point initialMouseLocation) { this.serviceProviderSource = source.Site; if (this.serviceProviderSource != null) { this.behaviorServiceSource = (BehaviorService)this.serviceProviderSource.GetService(typeof(BehaviorService)); if ((this.behaviorServiceSource != null) && ((dragComponents != null) && (dragComponents.Count > 0))) { this.srcHost = (IDesignerHost)this.serviceProviderSource.GetService(typeof(IDesignerHost)); if (this.srcHost != null) { this.data = new BehaviorDataObject(dragComponents, source, this); this.allowedEffects = DragDropEffects.Move | DragDropEffects.Copy; this.dragComponents = new DragComponent[dragComponents.Count]; this.parentGridSize = Size.Empty; this.lastEffect = DragDropEffects.None; this.lastFeedbackLocation = new Point(-1, -1); this.lastSnapOffset = Point.Empty; this.dragImageRect = Rectangle.Empty; this.clearDragImageRect = Rectangle.Empty; this.InitiateDrag(initialMouseLocation, dragComponents); } } } }