private void CopyProfile(object sender, RoutedEventArgs e) { ProfileItem pi; if (!GetSelectedItem(out pi)) { return; } var w = new TextDialog("Profile name", pi.profile.Title + " Copy"); w.ShowDialog(); if (!w.DialogResult.HasValue || !w.DialogResult.Value) { return; } context.ProfilesManager.CopyProfile(pi.profile, w.TextResult); ReloadProfileTree(); }
private void RenameProfile(object sender, RoutedEventArgs e) { ProfileItem pi; if (!GetSelectedItem(out pi)) { return; } var w = new TextDialog("Rename profile", pi.profile.Title); w.ShowDialog(); if (!w.DialogResult.HasValue || !w.DialogResult.Value) { return; } pi.profile.Rename(w.TextResult); ReloadProfileTree(); }