Esempio n. 1
0
 private static IEnumerable <Control> GetNamedElements(global::MvvmFx.CaliburnMicro.WisejWeb.Toolable.PanelEx control)
 {
     foreach (ComponentTool tool in control.Tools)
     {
         ComponentToolEx toolEx = tool as ComponentToolEx;
         if (toolEx != null)
         {
             yield return(new ComponentToolExProxy(toolEx, control.Parent, true));
         }
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ComponentToolExProxy" /> class, for the specified <see cref="ComponentToolExProxy" />.
        /// </summary>
        /// <param name="item">The tool strip item.</param>
        /// <param name="parent">The parent Control.</param>
        /// <param name="wireEvents">if set to <c>true</c>, the constructor will wire the item events.</param>
        public ComponentToolExProxy(ComponentToolEx item, Control parent, bool wireEvents)
        {
            Parent  = parent;
            Item    = item;
            Name    = item.Name;
            Enabled = item.Enabled;
            Visible = item.Visible;

            if (wireEvents)
            {
                WireEvents();
            }
        }