LoadingIcon 1.0.0

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

LoadingIcon

A simple C# console loading icon animation utility.

Features

  • Display a variety of loading animations in the console.
  • Customizable duration, delay, icon set, and accompanying text.

Installation

Install via NuGet Package Manager:

Install-Package LoadingIcon

Or via .NET CLI:

dotnet add package LoadingIcon

Usage

First, include the namespace:

using LoadingIcon;

Then call the static method:

// Display a loading icon for 5 seconds, with a delay of 200ms between frames,
// using icon set 0 (the default), with optional text.
Class1.LoadingIcon(5, 200, 0, "Loading", "Please wait...");

Parameters

  • int durationSeconds: Duration to display the loading icon (in seconds).
  • int delay: Delay between frames (in milliseconds).
  • byte selectedIconSet: Index of the icon set to use (see Available Icon Sets below).
  • string textLeft (optional): Text to display to the left of the icon.
  • string textRight (optional): Text to display to the right of the icon.

Available Icon Sets

Index Icon Set
0 -, \, |, /
1 _, =, #
2 |, /, -, \
3 +, x
4 |, /, -, \
5 <, ^, >, v
6 (), )<, (>, ><
7 ., o, O, o
8 (), {}, [], <>
9 __, oo, ^^
10 . , .. , ... , ....

Example

using LoadingIcon;

class Program
{
    static void Main(string[] args)
    {
        // Display loading icon for 3 seconds, delay 100ms, using icon set 0.
        Class1.LoadingIcon(3, 100, 0, "Processing", "Please wait");
    }
}

License

This project is licensed under the MIT License - see the LICENSE file for details.


Feel free to contribute or report issues!

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.1 157 9/16/2024
1.0.0 143 9/16/2024