private void Ball_MonitoringChanged(object sender, MonitoringArgs e) { if(e.valor) //Important to avoid recursivity { if(monitoredBall != null) { if(monitoredBall != (Ball)sender) monitoredBall.Monitoring = false; } monitoredBall = (Ball)sender; } }
private void Ball_MonitoringChanged(object sender, MonitoringArgs e) { if (e.valor) //Important to avoid recursivity { if (monitoredBall != null) { if (monitoredBall != (Ball)sender) { monitoredBall.Monitoring = false; } } monitoredBall = (Ball)sender; } }
private void Catcher_MonitoringChanged(object sender, MonitoringArgs e) { if (e.valor) //Important to avoid recursivity { if (monitoredCatcher != null) { if (monitoredCatcher != (Catcher)sender) { monitoredCatcher.Monitoring = false; } } monitoredCatcher = (Catcher)sender; } }
private void Catcher_MonitoringChanged(object sender, MonitoringArgs e) { if (e.valor) //Important to avoid recursivity { if(monitoredCatcher != null) { if(monitoredCatcher != (Catcher)sender) monitoredCatcher.Monitoring = false; } monitoredCatcher = (Catcher)sender; } }