private void SetUser(User u) { NameBox.Text = u.UserName; if (u.SavePassword) { PasswordBox.Password = LocalUtils.GetPassword(u.UserName); } SavePassword.IsChecked = u.SavePassword; AutoLogin.IsChecked = u.AutoLogin; }