CL_quick_menu 0.1.0

Package Description

Install-Package CL_quick_menu -Version 0.1.0
dotnet add package CL_quick_menu --version 0.1.0
<PackageReference Include="CL_quick_menu" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CL_quick_menu --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Command line quick menu

This library enables creation of a very basic command line menu.
A menu constists of an intro and several entries. Each entry has a number, description, optional accessor and a reference to a function.
Entries are sorted by numbers. Access of an entry is possible by its number except an alternative accessor is given. Accessor do not influence the menu structure.

Quick sample:

using System;
using CL_quick_menu;

namespace nettest
{
    class Program
    {
        static void Main(string[] args)
        {
            // Creates a menu
            Menu m = new Menu("this is  a test menu", new Entry[]
            {
                new Entry(1, "1st topic", cool),
                new Entry(2, "2nd topic", medium_cool),
                new Entry(3, "3rd topic", super_cool, "test"),
                new Entry(4, "4th topic", not_cool, "b")
            });

            // prints the menu and requests user feedback
            m.Print_IO();
        }

        static void cool()
        {
            Console.WriteLine("really cool");
        }

        static void medium_cool()
        {
            Console.WriteLine("medium cool");
        }

        static void super_cool()
        {
            Console.WriteLine("super cool");
        }

        static void not_cool()
        {
            Console.WriteLine("not cool");
        }
    }
}

Command line quick menu

This library enables creation of a very basic command line menu.
A menu constists of an intro and several entries. Each entry has a number, description, optional accessor and a reference to a function.
Entries are sorted by numbers. Access of an entry is possible by its number except an alternative accessor is given. Accessor do not influence the menu structure.

Quick sample:

using System;
using CL_quick_menu;

namespace nettest
{
    class Program
    {
        static void Main(string[] args)
        {
            // Creates a menu
            Menu m = new Menu("this is  a test menu", new Entry[]
            {
                new Entry(1, "1st topic", cool),
                new Entry(2, "2nd topic", medium_cool),
                new Entry(3, "3rd topic", super_cool, "test"),
                new Entry(4, "4th topic", not_cool, "b")
            });

            // prints the menu and requests user feedback
            m.Print_IO();
        }

        static void cool()
        {
            Console.WriteLine("really cool");
        }

        static void medium_cool()
        {
            Console.WriteLine("medium cool");
        }

        static void super_cool()
        {
            Console.WriteLine("super cool");
        }

        static void not_cool()
        {
            Console.WriteLine("not cool");
        }
    }
}

  • .NETStandard 2.0

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.1.0 91 4/30/2019