예제 #1
0
        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();
        }
예제 #2
0
        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();
        }