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

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

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

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

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

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

            ChangeItemHeight(item, false);
            ReLayout();
            item.IsExpanded = false;
            _expandItem     = null;
        }
Esempio 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();
        }
Esempio n. 9
0
 public void ExpandItem(int index)
 {
     try
     {
         PushPanelItem item = _items[index];
         if (item != null)
         {
             ExpandItem(item);
         }
     }
     catch
     {
     }
 }
Esempio n. 10
0
 public void ExpandItem(string name)
 {
     try
     {
         PushPanelItem item = _items[name];
         if (item != null)
         {
             ExpandItem(item);
         }
     }
     catch
     {
     }
 }
Esempio 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();
        }
Esempio 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;
                }
            }
        }
Esempio 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;
        }
Esempio n. 14
0
 public int IndexOf(PushPanelItem item)
 {
     return _owner.Controls.IndexOf(item);
 }
Esempio n. 15
0
 public bool Contains(PushPanelItem item)
 {
     return _owner.Controls.Contains(item);
 }
Esempio n. 16
0
 public void AddRange(PushPanelItem[] values)
 {
     foreach (PushPanelItem item in values)
     {
         Add(item);
     }
 }
Esempio n. 17
0
 public void Add(PushPanelItem item)
 {
     if (item == null)
     {
         throw new ArgumentNullException("item");
     }
     _owner.AddItem(item);
 }
Esempio 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();
        }
Esempio 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;
                }
            }
        }
Esempio n. 20
0
 public void Remove(PushPanelItem item)
 {
     _owner.Controls.Remove(item);
 }
Esempio 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;
 }
Esempio n. 23
0
 public bool Contains(PushPanelItem item)
 {
     return(_owner.Controls.Contains(item));
 }
Esempio n. 24
0
 public void Remove(PushPanelItem item)
 {
     _owner.Controls.Remove(item);
 }
Esempio n. 25
0
        internal void CollapseItem(PushPanelItem item)
        {
            if (item == null || !item.IsExpanded)
            {
                return;
            }

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