Ejemplo n.º 1
0
        private void metroTextBox1_TextChanged(object sender, System.EventArgs e)
        {
            if (!NotContainSymbols(AmountField.Text))
            {
                AmountField.Text = AmountField.Text.Substring(0, AmountField.Text.Length - 1);
            }
            if (AmountField.Text == "")
            {
                AmountField.Text = "0";
            }
            AmountField.Select(AmountField.Text.Length, 0);
            int v = System.Convert.ToInt32(AmountField.Text);

            if (v > AmountTrack.Maximum)
            {
                AmountTrack.Value = AmountTrack.Maximum;
            }
            else
            {
                AmountTrack.Value = v;
            }

            TimeList.SelectedItem = null;
            resultVehicle.Visible = false;
        }
Ejemplo n.º 2
0
 private void metroTextBox2_TextChanged(object sender, System.EventArgs e)
 {
     if (!NotContainSymbols(AmountField.Text))
     {
         AmountField.Text = AmountField.Text.Substring(0, AmountField.Text.Length - 1);
     }
     if (AmountField.Text == "")
     {
         AmountField.Text = "0";
     }
     AmountField.Select(AmountField.Text.Length, 0);
 }