This commit is contained in:
Frozd
2025-09-17 13:31:01 +02:00
parent 3561193b2f
commit 1654c4d722
5 changed files with 34 additions and 11 deletions

View File

@@ -33,9 +33,23 @@ namespace CarManagerV2
{
InitializeComponent();
this.Cursor = Cursors.Hand;
foreach (Control ctrl in this.Controls)
{
ctrl.Click += ForwardClick;
foreach (Control inner in ctrl.Controls) // In case you have nested controls
inner.Click += ForwardClick;
}
this.Click += (s, e) => this.OnCardClicked();
}
private void ForwardClick(object sender, EventArgs e)
{
// Raise your CardClicked event no matter what got clicked
CardClicked?.Invoke(this, EventArgs.Empty);
}
public event EventHandler CardClicked;
private void OnCardClicked()
{