public void WhenIHaveSeenAll_ShareIcons()
        {
            string[] iconName = { "Facebook", "Twitter", "Skype" };

            int indexOfElement = RandomClass.Rand(infoPage.InfoBoxPageElemList["ShareElements"]);

            if (iconName[indexOfElement] == infoPage.InfoBoxPageElemList["ShareElements"][indexOfElement].GetAttribute("title"))
            {
                Move.HoverMouse(infoPage.InfoBoxPageElemList["ShareElements"][indexOfElement]);
            }
        }
 private void BtnNext_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         User user = DataClass.GetContext().User.FirstOrDefault(u => u.Login == TbLogin.Text);
         if (user == null)
         {
             RunError.Text       = null;
             RunError.Text       = "Пользователя с таким логином не существует";
             TbLogin.BorderBrush = Brushes.OrangeRed;
         }
         else
         {
             try
             {
                 string Code   = RandomClass.Rand(6);
                 string a      = "*****@*****.**";
                 var    client = new SmtpClient("smtp.mail.ru", 25);
                 client.Credentials = new NetworkCredential(a, "WASD1337");
                 client.EnableSsl   = true;
                 client.Send(a, TbLogin.Text, "Код для смены пароля", Code);
                 RandomClass.Saver = Code;
                 ActionWindowClass.MainFrame.Navigate(new PageEmailCode());
                 ActionWindowClass.UserTransition = user;
             }
             catch (Exception ex)
             {
                 MessageBox.Show(ex.Message);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }