Ejemplo n.º 1
0
 public override bool Add(AbstractCommandable item)
 {
     if (item.GetType().IsAssignableFrom(typeof(AbstractMenuItem)))
     {
         throw new ArgumentException("Expected a AbstractMenuItem as the argument. Only Menu's can be added within a Menu.");
     }
     return(base.Add(item));
 }
Ejemplo n.º 2
0
 public override bool Add(AbstractCommandable item)
 {
     if (item.GetType().IsAssignableFrom(typeof (AbstractMenuItem)))
     {
         throw new ArgumentException(
             "Expected a AbstractMenuItem as the argument. Only Menu's can be added within a Menu.");
     }
     return base.Add(item);
 }