OptionBox 1.0.0

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

OptionBox

Description

AutoDataGridViews is a custom winform Form inherited from the class Systme.Windows.Forms.Form

Example: This project is a C# library that provides [functionality].

Features

  • Strong code dependencies using Reflections and Attributes
  • Safe Code style using type-based datagridview
  • Auto Save and load to/from a local storage with Json

Installation

Visit to https://github.com/Churnba/OptionBox.git

NuGet Installation

To install the package via NuGet, use the following command: PM> NuGet\Install-Package OptionBox -Version 1.1.0

Dependencies

This project has the following dependencies:

  • System.Windows

Usage

Once the project is installed, you can use it as follows:

Basic Usage

using OptionBox;
using System.IO.Ports; //if needed

[STAThread]
static void Main()
{
    ApplicationConfiguration.Initialize();

    OptionManager.Path = "Option.json";
    OptionManager.AddCategory<CommonOption>();

    OptionBox.OptionBox.LoadOption();
    Application.Run(new Form1());
}
//Windows Form Designer generated code
private void InitializeComponent()
{
   ToolStripMenuItem OptionOToolStripMenuItem = new ToolStripMenuItem();

    //...

    OptionOToolStripMenuItem.Click += (_, _) =>
    {
        var optionForm = new OptionBox();
        optionForm.ShowDialog(this);
    };
}

[OptionCategory("Common")]
internal class CommonOption : CategoryBase 
{
    [OptionContext("Retry Count")]
    public static int Rery_Count { get; set; } = 5;

    [OptionContext("Retry Period(ms)")]
    public static int RetryPerood { get; set; } = 1000;


    [OptionContext("Stop Bits")]
    public static StopBits StopBits { get; set; } = StopBits.One;


    [OptionCategory("Legacy")]
    public class UARTLagacyOption : CategoryBase
    {
        [OptionContext("Buadrates")]
        public static int[] Buadrates { get; set; } = new int[]
        { 4800, 9600, 19200, 38400, 76800, 115200, 153600, 312500 };
    }
}
Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed.  net9.0-windows 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.
  • net6.0-windows7.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.0 205 5/19/2025