public static RectangleF LayoutBoundsControl(ControllableComponent owner, RectangleF bounds) { bounds.Inflate(-2f, -2f); foreach (Renderable control in owner.Controls) { bounds = RectangleF.Union(bounds, control.Bounds); } bounds.Inflate(2f, 2f); return(bounds); }
public ControllableComponentAttribute(ControllableComponent owner) : base(owner) { Owner = owner; }
public static void AddCheckBoxItem(ToolStripDropDown menu, string itemName, string itemTip, Image itemIcon, ControllableComponent owner, string valueName, bool @default, bool enable = true) { void Item_Click(object sender, EventArgs e) { owner.SetValuePub(valueName, !owner.GetValuePub(valueName, @default)); owner.ExpireSolution(true); } AddClickItem(menu, itemName, itemTip, itemIcon, Item_Click, owner.GetValuePub(valueName, @default), enable); }