Пример #1
0
 private void OnButtonClick(bool shortest)
 {
     if (ValidateInput())
     {
         var eventArgs = new GotCorrectShimbelEventArgs
         {
             EdgesAmount   = Int32.Parse(_edgesAmount.GetText()),
             ShortestPaths = shortest
         };
         _output.SetText(string.Empty);
         OnGotCorrectInput(eventArgs);
     }
     else
     {
         _output.SetText("Incorrect Input");
         _output.SetHeight(50);
     }
 }
Пример #2
0
        protected virtual void OnGotCorrectInput(GotCorrectShimbelEventArgs e)
        {
            var handler = GotCorrectShimbel;

            handler?.Invoke(this, e);
        }