Exemplo n.º 1
0
 public void Remove( GuiObject obj )
 {
     if( !obj.selected )
         throw new ArgumentException( "item is not from the collection" );
     obj.selected = false;
     obj.SelectionChanged();
     obj.Invalidate();
     objs.Remove( obj );
 }
Exemplo n.º 2
0
 public void Remove(GuiObject obj)
 {
     if (!obj.selected)
     {
         throw new ArgumentException("item is not from the collection");
     }
     obj.selected = false;
     obj.SelectionChanged();
     obj.Invalidate();
     objs.Remove(obj);
 }
Exemplo n.º 3
0
 public int Add( GuiObject value )
 {
     if( objs.Contains( value ) )
         return 0;
     if( value == null || value.selected )
         throw new ArgumentException( "wrong item for collection" );
     value.selected = true;
     value.SelectionChanged();
     value.Invalidate();
     return objs.Add( value );
 }
Exemplo n.º 4
0
 public int Add(GuiObject value)
 {
     if (objs.Contains(value))
     {
         return(0);
     }
     if (value == null || value.selected)
     {
         throw new ArgumentException("wrong item for collection");
     }
     value.selected = true;
     value.SelectionChanged();
     value.Invalidate();
     return(objs.Add(value));
 }