Ejemplo n.º 1
0
 /// <summary>
 /// Removes a filling child reference from this aFrame object
 /// </summary>
 /// <param name="filling"></param>
 internal void RemoveFilling(Filling filling)
 {
     if (fillings.Contains(filling))
     {
         fillings.Remove(filling);
         ChildrenManager.UpdateFillingsCode(this);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Add a filling child reference to this aFrame object
 /// </summary>
 /// <param name="filling"></param>
 internal void AddFilling(Filling filling)
 {
     if (!fillings.Contains(filling))
     {
         fillings.Add(filling);
         ChildrenManager.UpdateFillingsCode(this);
     }
 }
Ejemplo n.º 3
0
        public override void OnClick(object sender, PInputEventArgs e)
        {
            if (e.Button != System.Windows.Forms.MouseButtons.Left)
            {
                return;
            }
            e.Handled = true;

            base.OnClick(sender, e);

            if (e.PickedNode is Surface && e.PickedNode.ChildrenCount == 0 && FillingType != null)
            {
                Surface fillingParent = (Surface)e.PickedNode;
                Filling filling       = new Filling(fillingParent, FillingType, ProfileType);
                fillingParent.Frame.AddFilling(filling);
            }
        }
Ejemplo n.º 4
0
        public static void RemoveItem(PNode item)
        {
            if (item == null || item.Parent == null)
            {
                throw new ArgumentNullException("Null item provided.");
            }


            item.Parent.RemoveChild(item.Parent.IndexOfChild(item));

            if (item is Sash)
            {
                Sash sash = (Sash)item;
                sash.SurfaceParent().Frame.RemoveSash(sash);
            }
            else if (item is Filling)
            {
                Filling filling = (Filling)item;
                filling.SurfaceParent().Frame.RemoveFilling(filling);
            }
        }