|
|
|
@ -14,19 +14,18 @@ using System.Windows.Forms;
@@ -14,19 +14,18 @@ using System.Windows.Forms;
|
|
|
|
|
using System.Windows.Forms.Design; |
|
|
|
|
using ICSharpCode.Reporting.Addin.TypeProvider; |
|
|
|
|
|
|
|
|
|
namespace ICSharpCode.Reporting.Addin.Designer |
|
|
|
|
{ |
|
|
|
|
namespace ICSharpCode.Reporting.Addin.Designer{ |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Description of RectangleDesigner.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class ContainerDesigner:ParentControlDesigner |
|
|
|
|
{ |
|
|
|
|
public class ContainerDesigner:ParentControlDesigner{ |
|
|
|
|
|
|
|
|
|
ISelectionService selectionService; |
|
|
|
|
IComponentChangeService componentChangeService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override void Initialize(IComponent component) |
|
|
|
|
{ |
|
|
|
|
public override void Initialize(IComponent component){ |
|
|
|
|
if (component == null) { |
|
|
|
|
throw new ArgumentNullException("component"); |
|
|
|
|
} |
|
|
|
@ -35,24 +34,34 @@ namespace ICSharpCode.Reporting.Addin.Designer
@@ -35,24 +34,34 @@ namespace ICSharpCode.Reporting.Addin.Designer
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected override void PostFilterProperties(System.Collections.IDictionary properties) |
|
|
|
|
{ |
|
|
|
|
protected override void PostFilterProperties(System.Collections.IDictionary properties){ |
|
|
|
|
TypeProviderHelper.RemoveProperties(properties); |
|
|
|
|
base.PostFilterProperties(properties); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected override void OnDragDrop(DragEventArgs de) |
|
|
|
|
{ |
|
|
|
|
protected override void OnDragDrop(DragEventArgs de){ |
|
|
|
|
base.OnDragDrop(de); |
|
|
|
|
var toolboxService = (IToolboxService)this.GetService(typeof(IToolboxService)); |
|
|
|
|
toolboxService.SetSelectedToolboxItem(null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// public override bool CanBeParentedTo(IDesigner parentDesigner)
|
|
|
|
|
// {
|
|
|
|
|
// base.CanBeParentedTo(parentDesigner);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
public override bool CanParent(Control control) |
|
|
|
|
{ |
|
|
|
|
return base.CanParent(control); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void OnSelectionChanged(object sender, EventArgs e) |
|
|
|
|
public override bool CanParent(ControlDesigner controlDesigner) |
|
|
|
|
{ |
|
|
|
|
return base.CanParent(controlDesigner); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void OnSelectionChanged(object sender, EventArgs e){ |
|
|
|
|
Control.Invalidate( ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -65,8 +74,7 @@ namespace ICSharpCode.Reporting.Addin.Designer
@@ -65,8 +74,7 @@ namespace ICSharpCode.Reporting.Addin.Designer
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void GetService () |
|
|
|
|
{ |
|
|
|
|
void GetService (){ |
|
|
|
|
selectionService = GetService(typeof(ISelectionService)) as ISelectionService; |
|
|
|
|
if (selectionService != null) |
|
|
|
|
{ |
|
|
|
@ -74,16 +82,17 @@ namespace ICSharpCode.Reporting.Addin.Designer
@@ -74,16 +82,17 @@ namespace ICSharpCode.Reporting.Addin.Designer
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
componentChangeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); |
|
|
|
|
if (componentChangeService != null) |
|
|
|
|
{ |
|
|
|
|
if (componentChangeService != null) { |
|
|
|
|
componentChangeService.ComponentRename += OnComponentRename; |
|
|
|
|
componentChangeService.ComponentAdding += (sender, e) => { |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region Dispose
|
|
|
|
|
protected override void Dispose(bool disposing) |
|
|
|
|
{ |
|
|
|
|
protected override void Dispose(bool disposing){ |
|
|
|
|
if (selectionService != null) { |
|
|
|
|
selectionService.SelectionChanged -= OnSelectionChanged; |
|
|
|
|
} |
|
|
|
|