Example #1
0
 public MenuItem(string name, ConsoleColor color, ConsoleColor errorColor, int spacing, bool showCursor, ErrorProfile errorProfile, SortingTypes sortingType)
 {
     this.name         = name;
     this.spacing      = spacing;
     this.showCursor   = showCursor;
     this.color        = color;
     this.errorColor   = errorColor;
     this.errorProfile = errorProfile;
     this.sortingType  = sortingType;
 }
Example #2
0
        public void AddMenuItem(string title, ConsoleColor color = ConsoleColor.White, ConsoleColor errorColor = ConsoleColor.Red, int spacing = 14, bool showCursor = true, ErrorProfile errorProfile = null, SortingTypes sortingType = default)
        {
            MenuItem newItem = new MenuItem(" " + title, color, errorColor, spacing, showCursor, errorProfile, sortingType);

            menuItems       = AddItemToArray(newItem, menuItems);
            menuItemsAmount = menuItems.Length;
        }