private void DoSave(object sender, ExecutedRoutedEventArgs e)
        {
            lock (stateLock)
            {
                var window = new DiffWindow();
                List <PathEntry> newPaths = new List <PathEntry>(SystemPath.Concat(UserPath).Select(_ => _.Path));
                List <PathEntry> oldPaths = new List <PathEntry>(reg.SystemPath.Concat(reg.UserPath));
                foreach (var x in new ObservableCollection <DiffPath>(newPaths.Except(oldPaths).Select(p => new DiffPath(p, true)).Concat(
                                                                          oldPaths.Except(newPaths).Select(p => new DiffPath(p, false)))))
                {
                    window.Changes.Add(x);
                }

                if (window.ShowDialog() == true)
                {
                    Write();
                }
            }
        }
     private void DoSave(object sender, ExecutedRoutedEventArgs e)
     {
         lock(stateLock)
         {
             var window = new DiffWindow();
             List<PathEntry> newPaths = new List<PathEntry>(SystemPath.Concat(UserPath).Select(_ => _.Path));
             List<PathEntry> oldPaths = new List<PathEntry>(reg.SystemPath.Concat(reg.UserPath));
             foreach (var x in new ObservableCollection<DiffPath>(newPaths.Except(oldPaths).Select(p => new DiffPath(p, true)).Concat(
                             oldPaths.Except(newPaths).Select(p => new DiffPath(p, false)))))
             {
                 window.Changes.Add(x);
             }
 
             if (window.ShowDialog() == true)
             {
                 Write();
             }
         }
     }