public RenameProfile(Profile profile)
 {
     InitializeComponent();
     _profile = profile;
     txtProfileName.Text = profile.Name;
     txtProfileName.Focus();
     txtProfileName.SelectAll();
 }
 private void btnAddProfile_Click(object sender, RoutedEventArgs e)
 {
     Profile profile = new Profile();
     RenameProfile form = new RenameProfile(profile);
     form.Owner = this;
     form.Title = "Add Profile";
     if (form.ShowDialog() == true)
     {
         _profiles.Add(profile);
         cmbProfiles.SelectedItem = profile;
     }
 }