CoreTools 1.1.0

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

// Install CoreTools as a Cake Tool
#tool nuget:?package=CoreTools&version=1.1.0

icon

CoreTools

Lightweight package with some utilities for .NET Core.

release nuget release_date downloads license

Dependencies

net5 net6 drawing_common

Overview

GraphicUtils

This static class contains the following functions:

  • Point GetCursorPos()
    Returns the current cursor position on display.

GDIUtils

This static class contains the following functions:

  • Color GetPixelColor(Point pos, [bool takeScreenshotWhenPossible = false])
    Returns the color of the pixel at a specified position.

    • pos: Position of the pixel from to get the color.
    • takeScreenshotWhenPossible: Take a screenshot when possible to get the pixel color (this may be slower and is supported only in Windows).
  • Color GetPixelColorAtCursorPos([bool takeScreenshotWhenPossible = false])
    Returns the color of the pixel at the current cursor position on display.

    • takeScreenshotWhenPossible: Take a screenshot when possible to get the pixel color (this may be slower and is supported only in Windows).
  • Bitmap CaptureScreenshot(Point pos, Size size)
    Captures a screenshot from a specified position, with a specified size.

    • pos: Top-left corner of the screenshot.
    • size: Size of the screenshot.
  • Bitmap CaptureScreenshotAtCursorPos(Size size, Size offset)
    Captures a screenshot from the current cursor position on display, with a specified size, and offset.

    • size: Size of the screenshot.
    • offset: Offset of the screenshot.
  • Bitmap CaptureScreenshotAtCursorPos(Size size)
    Captures a screenshot from the current cursor position on display, with a specified size.

    • size: Size of the screenshot.

SystemUtils

This static class contains the following functions:

  • FileInfo GetExecutingFile()
    Returns the current application executing file.

  • DirectoryInfo GetExecutingDirectory()
    Returns the current application executing directory.

ColorExtensions

This static class provides a set of Color extensions:

  • Color Invert()
    Inverts the Color by subtracting every value R, G, B from 255.

SizeExtensions

This static class provides a set of Size extensions:

  • Size Invert()
    Inverts the Size by replacing every value with its negative.

  • Size UniformSize(int dim)
    Initializes a new Size with uniform dimensions.

    • dim: Dimensions.

StringExtensions

This static class provides a set of string extensions:

  • bool IsDouble()
    Checks if the string is a double.

  • bool IsInt()
    Checks if the string is an int.

  • bool IsNumeric()
    Checks if the string contains only numeric chars.

  • string NormalizeForDouble([bool ignoreFractionalZeros = true])
    Normalizes the string for the type double.

    • ignoreFractionalZeros: Ignore if there are only zeros as the fractional part to speed up the algorithm.
  • string NormalizeForInt()
    Normalizes the string for the type int.

  • string Append(char c)
    Appends a char at the end of the string.

    • c: char to append.
  • string Append(string str)
    Appends a string at the end of the string.

    • str: string to append.
  • string Reduce(int count)
    Cuts the string by removing a specified number of chars from the end of the string.

    • count: Number of chars to remove from the end of the string.

License

Copyright (C) 2021-2022 devpelux (Salvatore Peluso)
Licensed under MIT license.

mit

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  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. 
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
1.3.0 224 2/16/2023
1.2.0 773 5/20/2022
1.1.1.1 433 4/28/2022
1.1.0 531 12/29/2021
1.0.1 258 12/25/2021
1.0.0 488 12/23/2021

Added GDIUtils, ColorExtensions, SizeExtensions, StringExtensions.