public Control(ControlConfig config, Control parent = null) { Initialize(new Rectangle(config.LocationX, config.LocationY, config.SizeWidth, config.SizeHeight), parent); Name = config.Name; Color = config.Color; Text = RichText.ParseText(config.Text, Color, Font); foreach (dynamic child in config.Children) { if (child is ComboBoxConfig) // TODO fix combo boxes { continue; } Assembly assembly = typeof(Control).Assembly; Type controlType = assembly.GetType(child.TypeName); ConstructorInfo[] ctors = controlType.GetConstructors(); ctors[1].Invoke(new object[] { child, this }); } }
public SpinButton(ControlConfig config, Control parent = null) : base(config, parent) { Initialize(null); }
public Label(ControlConfig config, Control parent = null) : base(config, parent) { TextChanged += Label_TextChanged; }