Example #1
0
 private void cmbProfiles_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     Profile profile = cmbProfiles.SelectedItem as Profile;
     this.DataContext = profile;
     if (profile != null)
     {
         SimpleAES aes = new SimpleAES();
         if (string.IsNullOrWhiteSpace(profile.Password))
             txtPassword.Password = "";
         else
             txtPassword.Password = aes.Decrypt(profile.Password);
     }
 }