ECMPackage 1.0.0

dotnet add package ECMPackage --version 1.0.0
                    
NuGet\Install-Package ECMPackage -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ECMPackage" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ECMPackage" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ECMPackage" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ECMPackage --version 1.0.0
                    
#r "nuget: ECMPackage, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ECMPackage@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ECMPackage&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ECMPackage&version=1.0.0
                    
Install as a Cake Tool

ECM - EasyConsoleMenu

This is the sourcecode for the ECM - Easy Menu System NuGet Package, which helps with creating an easy Menu in your console application. Also included is an Example.cs that showcases how to use the package in a project.

Usage

To use ECM install the NuGet-Package and make sure their is a using ECMPackage; added in your using-directives. To start make a new instance of ECM in your class, like this: static ECM ecm = new ECM(); The menu is running in a while-loop, so it will always show once a function is finished and the program is still running. Color and other formatting are applied from the overarching console (your code).

Adding Options

To add options to the menu, define the input needed from the user and the function to be called by it use ecm.Items.Add(new ECMItem(1, "First Option", Option1));

ecm is the name of you gave the instance of ECM you defined in your class (see above).

.Items is the list that stores every option and its corresponding information.

.Add() keyword to add a new entry to a list

(new ECMItem()) defines a new instance of an ECMItem, an option and its corresponding information

(1, *, *) is the number the user needs to input in order to invoke the option. It should be corresponding to its position in the list, so the firs item should be 1, because its going to be titled as 1. by the menu, second as 2, since its going to be 2. and so on.

(*,"First Option",*) is any string you want as a name to be displayed in the menu.

(*,*, Option1) is the name of the function you want to call when the option is invoked.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 204 1/14/2024

Initial Release