LINQPadDialogs 0.5.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package LINQPadDialogs --version 0.5.1                
NuGet\Install-Package LINQPadDialogs -Version 0.5.1                
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="LINQPadDialogs" Version="0.5.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LINQPadDialogs --version 0.5.1                
#r "nuget: LINQPadDialogs, 0.5.1"                
#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.
// Install LINQPadDialogs as a Cake Addin
#addin nuget:?package=LINQPadDialogs&version=0.5.1

// Install LINQPadDialogs as a Cake Tool
#tool nuget:?package=LINQPadDialogs&version=0.5.1                

LINQPadDialogs

NuGet Version GitHub Sponsors

A helper library that provides the ability to implement interactive user interfaces using LINQPad's built-in Controls.

Please read before continuing

  • This NuGet package is supported by the generosity of community members. A small donation through GitHub Sponsorship will go a long way toward keeping the project running. (Donate Now)
  • This library is intended to be used with LINQPad. It is not recommended for use in production development code.
  • This package also requires a license of at least the Developer Edition of LINQPad to use it.
  • If you write a script using the features provided by this package, it may not be possible to run it with the lprun CLI tool.

Features

I will be gradually developing and supplementing this library.

Interactivity Features (Button Array)

It provides a simple async/await method to display multiple buttons, and to see what button the user has selected in the console.

If needed, you can customize the ButtonArray types that are added to the LINQPad.Controls namespace.

Here is an example of the code:

using LINQPad.Controls;

switch (await Dialog.YesNo<string>("Are you happy now?", "yes", "no"))
{
	case "yes":
		"Answer: Yes".Dump();
		break;
	case "no":
		"Answer: No".Dump();
		break;
	default:
		"Answer: ?".Dump();
		break;
}

Interactivity Features (Prompt)

Draw a UI that allows you to type whatever you want into the text box. Unlike Console.In.ReadLine methods, this feature shows a text box and OK and Cancel buttons on the screen.

Here is an example of the code:

using LINQPad.Controls;

var answer = await OkCancelPrompt("What's your name?");

if (answer == default) $"You didn't enter a name.".Dump();
else $"Your name is: {answer}.".Dump();

License

This project is licensed under the Apache License 2.0.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.0 is compatible.  netcoreapp3.1 is compatible. 
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.5.5 164 4/25/2024
0.5.4 137 4/25/2024
0.5.3 123 4/25/2024
0.5.2 131 4/24/2024
0.5.1 121 4/24/2024
0.5.0 126 4/24/2024