Ejemplo n.º 1
0
        private void AddButton_Click(object sender, EventArgs e)
        {
            if (InitBox.Text == "0" || InitBox.Text == " " || InitBox.Text == "" || InitBox.Text == null || NameBox.Text == "" || NameBox.Text == " " || NameBox.Text == null)
            {
                ErrorLabel.Text = "There was and invalid input. Try again";
            }
            else
            {
                ErrorLabel.ResetText();

                string init = InitBox.Text;
                float  number;
                bool   success = float.TryParse(init, out number);
                if (success == true)
                {
                    initiatives.Add(new Tuple <string, float>(NameBox.Text, number));
                    initiatives = initiatives.OrderByDescending(t => t.Item2).ToList();

                    WriteToList(initiatives);
                }
                else
                {
                    ErrorLabel.Text = "For some reason decimal , not .";
                }
            }
        }
Ejemplo n.º 2
0
 private void PasswordMaskedTextBox_TextChanged(object sender, EventArgs e)
 {
     ErrorLabel.ResetText();
 }
Ejemplo n.º 3
0
 private void SignInComboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     ErrorLabel.ResetText();
 }
Ejemplo n.º 4
0
 private void UserNameTextBox_TextChanged(object sender, EventArgs e)
 {
     ErrorLabel.ResetText();
 }