Example #1
0
        public Target Add(Target value)
        {
            // Use base class to process actual collection operation
            base.List.Add(value as object);

            return value;
        }
Example #2
0
	    public TargetManager(TabbedGroups host, TabGroupLeaf leaf, Controls.TabControl source)
	    {
	        // Define state
	        _host = host;
	        _leaf = leaf;
	        _source = source;
	        _lastTarget = null;
	    
	        // Create collection to hold generated targets
	        _targets = new TargetCollection();
	        
	        // Process each potential leaf in turn
	        TabGroupLeaf tgl = host.FirstLeaf();
	        
	        while(tgl != null)
	        {
	            // Create all possible targets for this leaf
	            CreateTargets(tgl);
	        
	            // Enumerate all leafs
	            tgl = host.NextLeaf(tgl);
	        }
	    }
Example #3
0
	    public void MouseMove(Point mousePos)
	    {
	        // Find the Target the mouse is currently over (if any)
	        Target t = _targets.Contains(mousePos);
	    
	        // Set appropriate cursor
	        if (t != null)
                _source.Cursor = _validCursor;
            else
                _source.Cursor = _invalidCursor;
                
            if (t != _lastTarget)
            {
                // Remove the old indicator
                if (_lastTarget != null)
                    DrawHelper.DrawDragRectangle(_lastTarget.DrawRect, _rectWidth);
                
                // Draw the new indicator
                if (t != null)
                    DrawHelper.DrawDragRectangle(t.DrawRect, _rectWidth);
                
                // Remember for next time around
                _lastTarget = t;
            }
        }
Example #4
0
 public int IndexOf(Target value)
 {
     // Find the 0 based index of the requested entry
     return base.List.IndexOf(value);
 }
Example #5
0
 public bool Contains(Target value)
 {
     // Use base class to process actual collection operation
     return base.List.Contains(value as object);
 }
Example #6
0
 public void Insert(int index, Target value)
 {
     // Use base class to process actual collection operation
     base.List.Insert(index, value as object);
 }
Example #7
0
 public void Remove(Target value)
 {
     // Use base class to process actual collection operation
     base.List.Remove(value as object);
 }
Example #8
0
 public void AddRange(Target[] values)
 {
     // Use existing method to add each array entry
     foreach(Target page in values)
         Add(page);
 }