private void Greediness_Leave(object sender, EventArgs e) { double alfa; if (Greediness.Text != "") { try { alfa = double.Parse(Greediness.Text); if (alfa >= 0 && alfa <= 1) { greedyOk = true; } else { Greediness.Select(); greedyOk = false; System.Windows.Forms.MessageBox.Show("Il valore del livello di greediness deve essere compreso tra 0 e 1", "Warning", MessageBoxButtons.OK); } if (fileOk && nIterOk && greedyOk) { calc.Enabled = true; } else { calc.Enabled = false; } } catch (Exception exept) { Greediness.Select(); calc.Enabled = false; greedyOk = false; System.Windows.Forms.MessageBox.Show("Il valore del livello di greediness deve essere compreso tra 0 e 1", "Warning", MessageBoxButtons.OK); } } }
internal RepetitionAtLeastOneRegExp(RegExp expression, Greediness greediness = Greediness.GreedyQuantification) : base(expression, greediness) { }
internal RepetitionRegExp(RegExp expression, Greediness greediness = Greediness.GreedyQuantification) { ExpressionToRepeat = expression; ChildExpressions = new[] {expression}; Greediness = greediness; }