Imported Upstream version 5.2.0.175

Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-06-07 13:16:24 +00:00
parent 4bdbaf4a88
commit 966bba02bb
8776 changed files with 346420 additions and 149650 deletions

View File

@@ -235,10 +235,10 @@ namespace System.Windows.Forms.Design
return false;
}
protected override object GetService (Type service)
protected override object GetService (Type serviceType)
{
if (_serviceProvider != null) {
return _serviceProvider.GetService (service);
return _serviceProvider.GetService (serviceType);
}
return null;
}

View File

@@ -554,19 +554,19 @@ namespace System.Windows.Forms.Design
#region Parenting
protected void HookChildControls (Control firstControl)
protected void HookChildControls (Control firstChild)
{
if (firstControl != null) {
foreach (Control control in firstControl.Controls) {
if (firstChild != null) {
foreach (Control control in firstChild.Controls) {
control.WindowTarget = (IWindowTarget) new WndProcRouter (control, (IMessageReceiver) this);
}
}
}
protected void UnhookChildControls (Control firstControl)
protected void UnhookChildControls (Control firstChild)
{
if (firstControl != null) {
foreach (Control control in firstControl.Controls) {
if (firstChild != null) {
foreach (Control control in firstChild.Controls) {
if (control.WindowTarget is WndProcRouter)
((WndProcRouter) control.WindowTarget).Dispose ();
}
@@ -662,11 +662,11 @@ namespace System.Windows.Forms.Design
e.UseDefaultCursors = false;
}
protected virtual void OnDragDrop (DragEventArgs e)
protected virtual void OnDragDrop (DragEventArgs de)
{
}
protected virtual void OnDragEnter (DragEventArgs e)
protected virtual void OnDragEnter (DragEventArgs de)
{
}
@@ -674,7 +674,7 @@ namespace System.Windows.Forms.Design
{
}
protected virtual void OnDragOver (DragEventArgs e)
protected virtual void OnDragOver (DragEventArgs de)
{
}
#endregion

View File

@@ -494,9 +494,9 @@ namespace System.Windows.Forms.Design
// component - The IComponent to ensure has a context menu service.
// XXX: Not sure exactly what this should do...
//
protected virtual void EnsureMenuEditorService (IComponent component)
protected virtual void EnsureMenuEditorService (IComponent c)
{
if (this.menuEditorService == null && component is ContextMenu)
if (this.menuEditorService == null && c is ContextMenu)
menuEditorService = (IMenuEditorService) GetService (typeof (IMenuEditorService));
}
#endregion

View File

@@ -210,23 +210,23 @@ namespace System.Windows.Forms.Design
return false;
}
public virtual bool CanParent (ControlDesigner designer)
public virtual bool CanParent (ControlDesigner controlDesigner)
{
return CanParent (designer.Control);
return CanParent (controlDesigner.Control);
}
protected override void OnDragDrop (DragEventArgs e)
protected override void OnDragDrop (DragEventArgs de)
{
IUISelectionService selectionServ = this.GetService (typeof (IUISelectionService)) as IUISelectionService;
if (selectionServ != null) {
// once this is fired the parent control (parentcontroldesigner) will start getting dragover events.
//
Point location = this.SnapPointToGrid (this.Control.PointToClient (new Point (e.X, e.Y)));
Point location = this.SnapPointToGrid (this.Control.PointToClient (new Point (de.X, de.Y)));
selectionServ.DragDrop (false, this.Control, location.X, location.Y);
}
}
protected override void OnDragEnter (DragEventArgs e)
protected override void OnDragEnter (DragEventArgs de)
{
this.Control.Refresh ();
}
@@ -236,16 +236,16 @@ namespace System.Windows.Forms.Design
this.Control.Refresh ();
}
protected override void OnDragOver (DragEventArgs e)
protected override void OnDragOver (DragEventArgs de)
{
IUISelectionService selectionServ = this.GetService (typeof (IUISelectionService)) as IUISelectionService;
if (selectionServ != null) {
// once ControlDesigner.MouseDragBegin is called this will start getting dragover events.
//
Point location = this.SnapPointToGrid (this.Control.PointToClient (new Point (e.X, e.Y)));
Point location = this.SnapPointToGrid (this.Control.PointToClient (new Point (de.X, de.Y)));
selectionServ.DragOver (this.Control, location.X, location.Y);
}
e.Effect = DragDropEffects.Move;
de.Effect = DragDropEffects.Move;
}
#endregion

View File

@@ -51,9 +51,9 @@ namespace System.Windows.Forms.Design
private const int HTHSCROLL = 6;
private const int HTVSCROLL = 7;
protected override bool GetHitTest (Point point)
protected override bool GetHitTest (Point pt)
{
if (base.GetHitTest (point)) {
if (base.GetHitTest (pt)) {
return true;
}
@@ -65,7 +65,7 @@ namespace System.Windows.Forms.Design
int hitTestResult = (int) Native.SendMessage (this.Control.Handle,
Native.Msg.WM_NCHITTEST,
IntPtr.Zero,
(IntPtr) Native.LParam (point.X, point.Y));
(IntPtr) Native.LParam (pt.X, pt.Y));
if (hitTestResult == HTHSCROLL || hitTestResult == HTVSCROLL)
return true;
}