private void OnGenerateButtonClick(IItem sender, MouseArgs args) { if (ValidateInput()) { var eventArgs = new GotCorrectPruferEventArgs { Code = GetCode() }; OnGotCorrectPruferInput(eventArgs); Close(); } else { _output.SetText("Incorrect Input"); } }
protected virtual void OnGotCorrectPruferInput(GotCorrectPruferEventArgs e) { var handler = GotCorrectPruferInput; handler?.Invoke(this, e); }