Skip to content
This repository has been archived by the owner on Aug 29, 2022. It is now read-only.
/ NTH.Framework Public archive

A small framework for solving common problems.

License

Notifications You must be signed in to change notification settings

nikeee/NTH.Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NTH.Framework

Archived as of 2022-08-29 due to lack of maintenance.

A small framework for solving common problems. Data Storage, Encryption and Stuff.

Not to confuse with nikeee/nth, wich is not a framework for common problems, instead it only provides small extensions.

Features

Data Storage

using (var storage = new FileDataStore<Human>(
    new JsonSerializer<Human>(), /* serializer (builtin: JSON and Binary) */
    "Humans", /* directory */
    ".human.gz", /* file extension */
    new GZipCompressor() /* compression (builtin: gzip) */))
{
    var human1 = new Human("Gill Bates", 21);
    await storage.StoreAsync("gill", human1); // TAP for non-blocking storage
    // ...
    var gill = await storage.RetrieveAsync("gill");
}

[Serializable]
class Human
{
    public string Name { get; set; }
    public int Age { get; set; }
    public Human(string name, int age)
    {
        Name = name;
        Age = age;
    }
}

Global Hotkey API

var hook = new KeyboardHook();
var someHotkey = new Hotkey(ModifierKeys.Win, Keys.F4);
someHotkey.KeyPressed += (s, e) => {
    MessageBox.Show("someHotkey pressed! Was: " + someHotkey);
};

hook.RegisterHotkey(someHotkey);
//... later:
hook.UnregisterHotkey(someHotkey);

Windows Mail API

var mail = new MapiMail();
mail.Subject = "Some Subject";
mail.MessageBody = "This is the message content";
mail.Recipients.Add("somebody@example.com");
mail.BccRecipients.Add("secretSomebody@example.com");
mail.SendPopup(); // Open default email with this preset email

About

A small framework for solving common problems.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages