check point

This commit is contained in:
meelstorm
2025-07-14 12:03:59 +02:00
commit d3cb790bd9
431 changed files with 44078 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using System.Reflection;
using Inspectron.Settings.WindowsWizard.Interfaces;
namespace Inspectron.Settings.WindowsWizard.Controls
{
public partial class CheckEditor : UserControl, ISetupItem
{
private PropertyInfo _prp;
private object _obj;
public CheckEditor()
{
InitializeComponent();
}
public void SetProperty(object obj, string propertyName)
{
checkBox1.Text = PropHelper.SplitCamelCase(propertyName);
_prp = PropHelper.GetPrp(obj, propertyName);
_obj = obj;
checkBox1.Checked = (bool)_prp.GetValue(obj);
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
_prp.SetValue(_obj, checkBox1.Checked);
}
}
}