private void OnCheckButtonClick(IItem sender, MouseArgs args) { if (ValidateInput()) { var eventArgs = new GotCorrectCheckPathEventArgs { FirstVertex = Int32.Parse(_firstVertex.GetText()), SecondVertex = Int32.Parse(_secondVertex.GetText()) }; _output.SetText(string.Empty); OnGotCorrectInput(eventArgs); } else { _output.SetText("Incorrect Input"); _output.SetHeight(50); } }
protected virtual void OnGotCorrectInput(GotCorrectCheckPathEventArgs e) { var handler = GotCorrectCheckPath; handler?.Invoke(this, e); }