示例#1
0
 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);
     }
 }
示例#2
0
        protected virtual void OnGotCorrectInput(GotCorrectFindPathEventArgs e)
        {
            var handler = GotCorrectFindPath;

            handler?.Invoke(this, e);
        }