/// <summary> /// Constructor that sets the dropdownbox size, creates a our hottrack brush and invalidates the glyph (to configure location). /// </summary> private DesignerActionGlyph(DesignerActionBehavior behavior, Adorner adorner, Rectangle alternativeBounds, Control alternativeParent) : base(behavior) { _adorner = adorner; _alternativeBounds = alternativeBounds; _alternativeParent = alternativeParent; Invalidate(); }
private DesignerActionGlyph(DesignerActionBehavior behavior, Adorner adorner, Rectangle alternativeBounds, Control alternativeParent) : base(behavior) { this.alternativeBounds = Rectangle.Empty; this.adorner = adorner; this.alternativeBounds = alternativeBounds; this.alternativeParent = alternativeParent; this.Invalidate(); }
private DesignerActionGlyph(DesignerActionBehavior behavior, Adorner adorner, Rectangle alternativeBounds, Control alternativeParent) : base(behavior) { this.alternativeBounds = Rectangle.Empty; this.adorner = adorner; this.alternativeBounds = alternativeBounds; this.alternativeParent = alternativeParent; this.Invalidate(); }
public DesignerActionGlyph(DesignerActionBehavior behavior, Rectangle alternativeBounds, Control alternativeParent) : this(behavior, null, alternativeBounds, alternativeParent) { }
/// <summary> /// Constructor that passes empty alternative bounds and parents. Typically this is done for control on the designer's surface since component tray glyphs will have these alternative values. /// </summary> public DesignerActionGlyph(DesignerActionBehavior behavior, Adorner adorner) : this(behavior, adorner, Rectangle.Empty, null) { }
internal DesignerActionGlyph GetDesignerActionGlyph(IComponent comp, DesignerActionListCollection dalColl) { InheritanceAttribute attribute = (InheritanceAttribute) TypeDescriptor.GetAttributes(comp)[typeof(InheritanceAttribute)]; if (attribute != InheritanceAttribute.InheritedReadOnly) { if (dalColl == null) { dalColl = this.designerActionService.GetComponentActions(comp); } if ((dalColl != null) && (dalColl.Count > 0)) { DesignerActionGlyph glyph = null; if (this.componentToGlyph[comp] == null) { DesignerActionBehavior behavior = new DesignerActionBehavior(this.serviceProvider, comp, dalColl, this); if (!(comp is Control) || (comp is ToolStripDropDown)) { ComponentTray service = this.serviceProvider.GetService(typeof(ComponentTray)) as ComponentTray; if (service != null) { ComponentTray.TrayControl trayControlFromComponent = service.GetTrayControlFromComponent(comp); if (trayControlFromComponent != null) { Rectangle bounds = trayControlFromComponent.Bounds; glyph = new DesignerActionGlyph(behavior, bounds, service); } } } if (glyph == null) { glyph = new DesignerActionGlyph(behavior, this.designerActionAdorner); } if (glyph != null) { this.componentToGlyph.Add(comp, glyph); } return glyph; } glyph = this.componentToGlyph[comp] as DesignerActionGlyph; if (glyph != null) { DesignerActionBehavior behavior2 = glyph.Behavior as DesignerActionBehavior; if (behavior2 != null) { behavior2.ActionLists = dalColl; } glyph.Invalidate(); } return glyph; } this.RemoveActionGlyph(comp); } return null; }
public DesignerActionGlyph(DesignerActionBehavior behavior, Rectangle alternativeBounds, Control alternativeParent) : this(behavior, null, alternativeBounds, alternativeParent) { }
public DesignerActionGlyph(DesignerActionBehavior behavior, Adorner adorner) : this(behavior, adorner, Rectangle.Empty, null) { }