Settings4Net

Aug 4, 2011   //   by Ramas   //   Other, Project, Software  //  No Comments

Settings4Net

The Ultimate Settings/Configurations Library for .NET

Settings4Net – is the last Settings/Configurations management library you will ever need for your .NET applications. Think of it as a standard .NET Properties.Settings “on steroids”.

Features

Beyond the basic functionality of storing/retrieving your program or/and custom user settings, Settings4Net in addition allows you:

  • Load and save your settings to as many XML files files as you wish (allows an easy manual modifications).
  • Reset all as well as individual setting value to default one.
  • Prevent manual modifications of settings files.
  • Generate fully functional PropertyGrid object allowing easy and powerful way for user to change your program’s settings.
  • Mark properties as read only, hide them from users and track their last modification date/time.
  • Group your settings in categories, add description, custom tags, default value. Set allowed minimum and/or maximum values.
  • Extends Collections.Hashtable class, allowing you to quickly manipulate your settings and use it as a native .NET Settings extension. (Simply type Settings["New Settings"] = MyValue;” and it’s done)
  • Extended native supportfor the following object types:
    • Integer
    • Boolean
    • Double
    • String
    • Color
    • DateTime
    • Font
      • Therefore, for example, you can simply set minimum/maximum values of allowed dates, store your custom Fonts or Colors without any need to serialize or cast them.
    • Easy (includes usage examples, full documentation, and help files). Powerful (additional functions helps you achieve your goals in the most intuitive ways). Open Source (released under MIT license).

    Quick Start Guide

    Add reference to “Settings4Net.dll” file and include it in your solution.
    Settings4Net is part of RamGecTools suite and uses this namespace.
    Basic usage example:

    // create your settings object
    RamGecTools.Settings4Net MySettings = new RamGecTools.Settings4Net();
    
    // add your settings
    MySettings["My String"] = "I'm using Settings4Net!";
    MySettings["My Favorite Color"] = Color.FromArgb(128, 64, 198);
    
    // retrieve your settings
    string str = (string)MySettings["My String"];
    Color color = (Color)MySettings.GetItemOrDefaultValue("My Favorite Color", Color.Thistle);
    
    // display your settings in PropertyGrid
    PropertyGrid propertyGrid = new PropertyGrid();
    propertyGrid.SelectedObject = MySettings.GeneratePropertyGridObject();
    
    // save
    MySettings.Save("filename.xml");
    

    Get It

    Check codeplex page for more information | Download

    Leave a comment

Hey There!

Ramunas Geciauskas

  Hey, I'm Ramas. I'm a Software Engineer, focusing on converting complex and unusual ideas into reality. I mainly work as a freelance developer, creating various web start-ups or unique software applications.

  On my spare time, I enjoy photography, admire art, and read all kinds of scientific papers.