Exemplo n.º 1
0
 public void Add(PushPanelItem item)
 {
     if (item == null)
     {
         throw new ArgumentNullException("item");
     }
     _owner.AddItem(item);
 }
Exemplo n.º 2
0
            void IList.Insert(int index, object value)
            {
                PushPanelItem item = value as PushPanelItem;

                if (value != null)
                {
                    ((IList)_owner.Controls).Insert(index, value);
                }
            }
Exemplo n.º 3
0
            void IList.Remove(object value)
            {
                PushPanelItem item = value as PushPanelItem;

                if (value != null)
                {
                    Remove(item);
                }
            }
Exemplo n.º 4
0
            bool IList.Contains(object value)
            {
                PushPanelItem item = value as PushPanelItem;

                if (value != null)
                {
                    return(Contains(item));
                }
                return(false);
            }
Exemplo n.º 5
0
            int IList.IndexOf(object value)
            {
                PushPanelItem item = value as PushPanelItem;

                if (value != null)
                {
                    return(IndexOf(item));
                }
                return(-1);
            }
Exemplo n.º 6
0
            int IList.Add(object value)
            {
                PushPanelItem item = value as PushPanelItem;

                if (item != null)
                {
                    Add(item);
                    return(IndexOf(item));
                }
                return(-1);
            }
Exemplo n.º 7
0
        internal void CollapseItem(PushPanelItem item)
        {
            if (item == null || !item.IsExpanded)
            {
                return;
            }

            ChangeItemHeight(item, false);
            ReLayout();
            item.IsExpanded = false;
            _expandItem     = null;
        }
Exemplo n.º 8
0
        protected override void OnControlRemoved(ControlEventArgs e)
        {
            PushPanelItem item = e.Control as PushPanelItem;

            if (item != null)
            {
                item.Owner              = null;
                item.CaptionMouseClick -= ItemCaptionMouseClick;
            }

            base.OnControlRemoved(e);

            ReLayout();
        }
Exemplo n.º 9
0
 public void ExpandItem(int index)
 {
     try
     {
         PushPanelItem item = _items[index];
         if (item != null)
         {
             ExpandItem(item);
         }
     }
     catch
     {
     }
 }
Exemplo n.º 10
0
 public void ExpandItem(string name)
 {
     try
     {
         PushPanelItem item = _items[name];
         if (item != null)
         {
             ExpandItem(item);
         }
     }
     catch
     {
     }
 }
Exemplo n.º 11
0
        private void AddItem(PushPanelItem item)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }

            item.Height             = item.CaptionHeight;
            item.Owner              = this;
            item.CaptionMouseClick += ItemCaptionMouseClick;

            base.Controls.Add(item);

            ReLayout();
        }
Exemplo n.º 12
0
        internal void ChangeItemHeight(PushPanelItem item, bool expand)
        {
            if (item == null)
            {
                return;
            }

            if (expand)
            {
                item.Height = item.CaptionHeight + CalcuExpandItemHeight();
            }
            else
            {
                if (item.IsExpanded)
                {
                    item.Height = item.CaptionHeight;
                }
            }
        }
Exemplo n.º 13
0
        internal void ExpandItem(PushPanelItem item)
        {
            if (item == null || _expandItem == item)
            {
                return;
            }

            if (_expandItem != null)
            {
                ChangeItemHeight(_expandItem, false);
            }

            ChangeItemHeight(item, true);

            ReLayout();
            if (_expandItem != null)
            {
                _expandItem.IsExpanded = false;
            }
            item.IsExpanded = true;
            _expandItem     = item;
        }
Exemplo n.º 14
0
 public int IndexOf(PushPanelItem item)
 {
     return _owner.Controls.IndexOf(item);
 }
Exemplo n.º 15
0
 public bool Contains(PushPanelItem item)
 {
     return _owner.Controls.Contains(item);
 }
Exemplo n.º 16
0
 public void AddRange(PushPanelItem[] values)
 {
     foreach (PushPanelItem item in values)
     {
         Add(item);
     }
 }
Exemplo n.º 17
0
 public void Add(PushPanelItem item)
 {
     if (item == null)
     {
         throw new ArgumentNullException("item");
     }
     _owner.AddItem(item);
 }
Exemplo n.º 18
0
        private void AddItem(PushPanelItem item)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }

            item.Height = item.CaptionHeight;
            item.Owner = this;
            item.CaptionMouseClick += ItemCaptionMouseClick;

            base.Controls.Add(item);

            ReLayout();
        }
Exemplo n.º 19
0
        internal void ChangeItemHeight(PushPanelItem item, bool expand)
        {
            if (item == null)
            {
                return;
            }

            if (expand)
            {
                item.Height = item.CaptionHeight + CalcuExpandItemHeight();
            }
            else
            {
                if (item.IsExpanded)
                {
                    item.Height = item.CaptionHeight;
                }
            }
        }
Exemplo n.º 20
0
 public void Remove(PushPanelItem item)
 {
     _owner.Controls.Remove(item);
 }
Exemplo n.º 21
0
        internal void ExpandItem(PushPanelItem item)
        {
            if (item == null || _expandItem == item)
            {
                return;
            }

            if (_expandItem != null)
            {
                ChangeItemHeight(_expandItem, false);
            }

            ChangeItemHeight(item, true);

            ReLayout();
            if (_expandItem != null)
            {
                _expandItem.IsExpanded = false;
            }
            item.IsExpanded = true;
            _expandItem = item;
        }
 public PushPanelItemCaptionClickEventArgs(PushPanelItem item)
     : this()
 {
     _item = item;
 }
Exemplo n.º 23
0
 public bool Contains(PushPanelItem item)
 {
     return(_owner.Controls.Contains(item));
 }
Exemplo n.º 24
0
 public void Remove(PushPanelItem item)
 {
     _owner.Controls.Remove(item);
 }
Exemplo n.º 25
0
        internal void CollapseItem(PushPanelItem item)
        {
            if (item == null || !item.IsExpanded)
            {
                return;
            }

            ChangeItemHeight(item, false);
            ReLayout();
            item.IsExpanded = false;
            _expandItem = null;
        }
Exemplo n.º 26
0
 public PushPanelItemCaptionClickEventArgs(PushPanelItem item)
     : this()
 {
     _item = item;
 }
Exemplo n.º 27
0
 public int IndexOf(PushPanelItem item)
 {
     return(_owner.Controls.IndexOf(item));
 }