private void OnButtonClick(bool dijkstra, bool bellmanFord, bool floyd) { if (ValidateInput()) { var eventArgs = new GotCorrectFindPathEventArgs { FirstVertex = Int32.Parse(_firstVertex.GetText()), SecondVertex = Int32.Parse(_secondVertex.GetText()), Dijkstra = dijkstra, BellmanFord = bellmanFord, Floyd = floyd }; _output.SetText(string.Empty); OnGotCorrectInput(eventArgs); } else { _output.SetText("Incorrect Input"); _output.SetHeight(50); } }
protected virtual void OnGotCorrectInput(GotCorrectFindPathEventArgs e) { var handler = GotCorrectFindPath; handler?.Invoke(this, e); }