private void OnAspectRatioChanged(object sender, EventArgs e) { //validation has already occurred by the time we get here, so it should be safe to parse a float float.TryParse(txtAspectRatio.Text, out _aspectRatio); _eventArgs.AspectRatio = _aspectRatio; AspectRatioChanged?.Invoke(this, _eventArgs); }
protected virtual void OnAspectRatioChanged(object sender, EventArgs e) { float.TryParse(txtAspectRatio.Text, out _aspectRatio); _eventArgs.AspectRatio = _aspectRatio; AspectRatioChanged?.Invoke(this, _eventArgs); }