42 lines
825 B
C#
42 lines
825 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Pannenkoekenhuis.Composite
|
|
{
|
|
public class MenuComponent
|
|
{
|
|
public MenuComponent component;
|
|
|
|
public MenuComponent()
|
|
{
|
|
|
|
}
|
|
|
|
public virtual string DrukAf()
|
|
{
|
|
if (component != null)
|
|
return component.DrukAf();
|
|
else
|
|
return "";
|
|
}
|
|
|
|
public virtual void VoegToe(MenuComponent m)
|
|
{
|
|
this.component = m;
|
|
}
|
|
|
|
public virtual void Verwijder(MenuComponent m)
|
|
{
|
|
this.component = null;
|
|
}
|
|
|
|
public MenuComponent Child()
|
|
{
|
|
return component;
|
|
}
|
|
}
|
|
}
|