public bool Contains(TabGroupBaseCollection values)
        {
            foreach(TabGroupBase c in values)
            {
                // Use base class to process actual collection operation
                if (Contains(c))
                    return true;
            }

            return false;
        }
Exemplo n.º 2
0
        public bool Contains(TabGroupBaseCollection values)
        {
            foreach (TabGroupBase c in values)
            {
                // Use base class to process actual collection operation
                if (Contains(c))
                {
                    return(true);
                }
            }

            return(false);
        }
Exemplo n.º 3
0
 protected void InternalConstruct(Control control, Direction direction)
 {
     // Do we need to create our own window?
     if (control == null) 
     {
         // Yes, use a simple panel for organizing children onto
         _control = new Panel();
     }
     else
     {
         // No, use the constructor provided one
         _control = control;
     }
     
     // Hook into control events
     _control.Resize += new EventHandler(OnControlResize);
     
     // Assign initial values
     _direction = direction;
     
     // Create collection to remember our child objects
     _children = new TabGroupBaseCollection();
 }
Exemplo n.º 4
0
        public void Clear()
        {
			// Do we contain the active leaf?
			if (_children.IndexOf(_tabbedGroups.ActiveLeaf) != 0)
			{
				// Then request movement of the active leaf to different group
				_tabbedGroups.MoveActiveToNearestFromSequence(this);
			}
        
			TabGroupBaseCollection copyChildren = new TabGroupBaseCollection();

			// Inform control about all removed children for leaf counting
			foreach(TabGroupBase tgb in _children)
			{
				// Make temporary copy of the child
				copyChildren.Add(tgb);

				// Remove processing
				_tabbedGroups.GroupRemoved(tgb);
			}

			// Remove all child controls
			ControlHelper.RemoveAll(_control);

			// Remove children from collection
			_children.Clear();

			// Must repaint to reflect changes
			_control.Invalidate();

			// All pages removed, do we need to compact?
			if (_tabbedGroups.AutoCompact)
				_tabbedGroups.Compact();
            
			// Give control chance to enfore leaf policy
			_tabbedGroups.EnforceAtLeastOneLeaf();
            
			// Mark layout as dirty
			if (_tabbedGroups.AutoCalculateDirty)
				_tabbedGroups.Dirty = true;
		
			// Inform control about all removed children for leaf counting
			foreach(TabGroupBase tgb in copyChildren)
				tgb.Dispose();
		}