Esempio n. 1
0
        private void nameEntry_TextChanged(object sender, TextChangedEventArgs e)
        {
            var check      = false;
            var characters = _conn.GetUserCharacters(_userId);

            foreach (var c in characters)
            {
                if (c.CharName == nameEntry.Text)
                {
                    check = true;
                }
            }
            if (check)
            {
                nameValidate.TextColor = Color.Red;
                nameValidate.Text      = "Character Name Unavailable";
                nameValidate.IsVisible = true;
                _nameCheck             = false;
            }
            else
            {
                nameValidate.TextColor = Color.Green;
                nameValidate.Text      = "Character Name Available";
                nameValidate.IsVisible = true;
                _nameCheck             = true;
            }
        }
 //Support Methods
 private void SetCharLists()
 {
     Characters = _conn.GetUserCharacters(_userId);
     foreach (var character in Characters)
     {
         CharacterNames.Add(character.CharName);
     }
 }