public void BindTo(Control control, IGraphicExtension sender, PropertyInfo prop) { var ma = prop.GetCustomAttribute <ModifiableAttribute>(); if (ma is null) { return; } BindCheckBox(sender, control, prop, x => Redraw(sender, ma.RequiresReset)); BindTrackBar(sender, control, prop, ma, x => Redraw(sender, ma.RequiresReset)); }
private void Draw(IGraphicExtension extension = default) { if (!ValidateGraphics()) { return; } _context.Graphics.Clear(playground.BackColor); if (extension == default) { _extensions.DrawAll(_projectors.Current); } else { extension.Draw(_projectors.Current); } playground.Invalidate(); }
private void Redraw(IGraphicExtension sender, bool resetModel) { OnRedraw?.Invoke(sender, resetModel); }