Exemplo n.º 1
0
 /// <summary>
 /// Add menuItem by instanciating one and adding it.
 /// </summary>
 public void Add(ConzapMenuItem menuItem)
 {
     if (menuItem != null)
     {
         MenuItems.Add(menuItem);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Add menuItem by providing header name and a parameter less method action delegate to call when item is selected. You can point to the method directly using lambda.
        /// </summary>
        public ConzapMenu Add(string heading, Action callback)
        {
            var menuItem = new ConzapMenuItem(heading, callback);

            if (menuItem != null)
            {
                MenuItems.Add(menuItem);
            }

            return(this);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Use to add one last MenuItem and then call Run()
 /// </summary>
 public ConzapMenu AddAndRun(ConzapMenuItem menuItem = null)
 {
     Add(menuItem);
     Run();
     return(this);
 }