robbiblubber.org
EN
Projects
Suite.NETMIT

Spellbook.NET.

Robbiblubber.Spellbook.NET

A few good building blocks for your code: configuration and data formats, encoding and encryption, WinForms interfaces and Windows integration. Four libraries that handle recurring tasks and leave room for ideas of your own.

.NET 8.NET 10

Libraries & extensions

4

The libraries are available as separate NuGet packages. Install the building blocks your project needs.

Library

Robbiblubber.Spellbook

The foundation for recurring development tasks: ddn configuration, encoding, hashing, encryption and helpers for files, strings, plug-ins and application instances.

Platform-independent codeTarget frameworks: net8.0 / net10.0

What’s inside

  • ddn (Diabolic Data Notation): hierarchical configuration, typed values and object serialization.
  • Base62, Base64, Hex and GZip with common encoder interfaces.
  • Hashing, PBKDF2, Argon2 and AES-GCM.
  • File and path operations, string helpers, plug-in loading and single-instance support.
A small starting point C#
using Robbiblubber.Spellbook;

DdnElement settings = Ddn.Create();
settings["window/size"] = new[] { 1024, 768 };
settings["theme"] = "dark";
settings.Save("settings.ddn");

int[] size = settings["window/size"];

Write settings and read typed values. Missing sections are created when a value is written.

Installation
dotnet add package Robbiblubber.Spellbook
Library

Robbiblubber.Spellbook.Backpack

Files can carry more. Backpack appends a payload to a carrier file and reads it back later – for example resources or a data archive attached to an executable.

Platform-independent codeTarget frameworks: net8.0 / net10.0

What’s inside

  • Append files, streams or byte arrays; one payload per carrier file.
  • Optional identifying tag; SHA-256 verification to detect damaged payload data.
  • Extract the payload or read it directly as a stream, including from a running executable.
A small starting point C#
using System.IO;
using Robbiblubber.Spellbook.Backpack;

Packer.Append("app.exe", "data.zip", "app-data");

using Stream payload =
    Packer.OpenPayload("app.exe", "app-data");

Pack the existing app.exe and data.zip files together and open the payload without a temporary file.

Installation
dotnet add package Robbiblubber.Spellbook.Backpack
Library

Robbiblubber.Spellbook.Controls

More possibilities for WinForms: extend existing controls and add themed components with useful details. Much of it can be connected directly in the designer. With sample projects in the repository.

Windows / WinFormsTarget frameworks: net8.0-windows / net10.0-windows

What’s inside

  • Runtime themes: System, Auto, Light, Dark and custom palettes with a theme editor.
  • Auto completion with fuzzy matching and signature help.
  • Edit commands for menus and toolbars, persistent window layouts and recent lists with pinning.
  • Themed controls and dialogs including combo boxes, text boxes, buttons and color selection; high-DPI support.
A small starting point C#
using System.Drawing;
using Robbiblubber.Spellbook.Controls.Themes;

Theme theme = new("Midnight", Theme.DARK);
theme.SetValue(ThemeColor.ACCENT, Color.CornflowerBlue);
ThemeManager.Add(theme);
ThemeManager.Theme = theme;

Register a custom theme. Set it before opening the first window; a ThemeProvider on the form applies it to the controls.

Installation
dotnet add package Robbiblubber.Spellbook.Controls
Library

Robbiblubber.Spellbook.Windows

The connection to the Windows desktop: create and read shortcuts, register file types and applications, and work with INI files.

WindowsTarget frameworks: net8.0-windows / net10.0-windows

What’s inside

  • Shortcuts with arguments, working directory, icon and window style.
  • File associations, Open with entries and registration in the installed apps list.
  • Read and write typed INI values, preserving comments and formatting of unchanged lines.
A small starting point C#
using Robbiblubber.Spellbook.Windows;

IniFile settings = new("settings.ini");
int width = settings.GetInt32("window", "width", 800);
settings.SetValue("window", "width", 1024);

Read a value with a fallback and save a change immediately.

Installation
dotnet add package Robbiblubber.Spellbook.Windows

The .NET libraries are distributed through NuGet. Tools and libraries remain grouped in their suites and collections.

View all projects