Exemplo n.º 1
0
 private void OnGenerateButtonClick(IItem sender, MouseArgs args)
 {
     if (ValidateInput())
     {
         var eventArgs = new GotCorrectInputEventArgs
         {
             VerticesAmount = Int32.Parse(_verticesAmount.GetText()),
             Density        = Double.Parse(_density.GetText()),
             MinWeight      = Int32.Parse(_minWeight.GetText()),
             MaxWeight      = Int32.Parse(_maxWeight.GetText())
         };
         OnGotCorrectInput(eventArgs);
         Close();
     }
     else
     {
         _errorOutput.SetText("Incorrect Input");
     }
 }
Exemplo n.º 2
0
        protected virtual void OnGotCorrectInput(GotCorrectInputEventArgs e)
        {
            var handler = GotCorrectInput;

            handler?.Invoke(this, e);
        }