Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 public ControllableComponentAttribute(ControllableComponent owner) : base(owner)
 {
     Owner = owner;
 }
Exemplo n.º 3
0
        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);
        }