Example #1
0
        /// <summary>
        /// 设置默认邮箱
        /// </summary>
        /// <param name="defaultMail"></param>
        public void SetDefautMail(string defaultMail)
        {
            mailTextBox.Text = defaultMail;
            string userInputMail = mailTextBox.Text == string.Empty ? "*****@*****.**" : mailTextBox.Text;

            userImgBox.Fill = new ImageBrush(AvatarHelper.GetAvatarByEmail(userInputMail));
        }
Example #2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string valueStr      = value as string;
            string userInputMail = valueStr == string.Empty ? "*****@*****.**" : valueStr;

            return(new ImageBrush(AvatarHelper.GetAvatarByEmail(userInputMail)));
        }
Example #3
0
        private void mailTextBox_LostFocus(object sender, RoutedEventArgs e)
        {
            string userInputMail = mailTextBox.Text == string.Empty ? "*****@*****.**" : mailTextBox.Text;

            userImgBox.Fill = new ImageBrush(AvatarHelper.GetAvatarByEmail(userInputMail));
        }