public Garage() { m_menueOfGarag.AddMethod("clos garag", CloseGarage); m_menueOfGarag.AddMethod("insert car", InsertCar); m_menueOfGarag.AddMethod("print car", PrintAllCar); SubMenue subMenue = new SubMenue("sub Menue"); subMenue.AddMethod("clos garag from subMenue", CloseGarage); SubMenue subsubMenue = new SubMenue("subsub Menue"); subsubMenue.AddMethod("print car from sub sub", PrintAllCar); subMenue.AddSubMenue(subsubMenue); m_menueOfGarag.AddSubMenue(subMenue); }
public void AddSubMenue(SubMenue i_SubMenueToAdd) { i_SubMenueToAdd.SerialNumber = r_ListOfMenue.Count + 1; r_ListOfMenue.Add(i_SubMenueToAdd); }