GithubHelp home page GithubHelp logo

checkboxes's Introduction

C# Console Application Checkboxes

To use in own System

  1. Possibility

    • Copy Checkbox.cs class to the same directory like Program.cs is in (<Project directory>/<Project name>/Checkbox.cs)
    • Goto your <Project name>.csproj
    • Search for Compile and add in scope of this <ItemGroup> another tag like the others: <Compile Include="Checkbox.cs" />
  2. Possibility

Usage:

Code examples in Checkbox/Program.cs
// First create a Checkbox object

// First parameter is the headline shown above the select boxes
string checkboxHeadline = "Select one of the following options";
// Standarts are no multiple selection and selection is required
// As select option you either can give an array as parameter
string[] otps = {"1. option", "2. option", "3. option" /* ... */};
Checkbox c1 = new Checkbox(checkboxHeadline, opts);
// Or directly as function parameter
Checkbox c2 = new Checkbox(checkboxHeadline, /* options: */ "1. option", "2. option", "3. option" /* ... */);

// If you want to allow multiple selections
Checkbox c3 = new Checkbox(checkboxHeadline, /* multi-mode: */ true, opts);

// If you want to disable requirement of the checkboxes to be checked
// Please note that in this case you also have to give the multi-mode parameter
Checkbox c4 = new Checkbox(checkboxHeadline, /* multi-mode: */ false, /* required: */ false, opts);


// After creating the Checkbox object
// First call Show method
// Then call the Select method

c1.Show();
c1.Select();

// And get the output which is a list of object arrays where one object array contains the index and the name of the selected option
List<object[]> result = c1.GetStatus();

Example display would be something like this

image

Example output would be something like this

if using the method like in Checkbox/Program.cs

The integer refers to the index of the option The string refers to the text of the option

2
third option

If multiple options are selected all indices and texts will be outputted

checkboxes's People

Contributors

larsvommars avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.