Example #1
0
        private void DoSaveMerge()
        {
            file.SaveResult(ResultDocument.Text);

            var left  = Left;
            var right = Right;

            if (left != _result)
            {
                _sourceFiles.Remove(left);
            }
            if (right != _result)
            {
                _sourceFiles.Remove(right);
            }

            if (file.Resolved)
            {
                Left = Right = null;
            }
            else
            {
                LeftSelection.Reset();
                Left  = _result;
                Right = RightSelection.First();
            }
            FileResolved?.Invoke(this, EventArgs.Empty);
        }
Example #2
0
 public void Remove(ModFile toRemove)
 {
     _sourceFiles.Remove(_sourceFiles.FirstOrDefault(f => f.Source == toRemove));
     if (file.Resolved)
     {
         Left = Right = null;
     }
     else
     {
         LeftSelection.Reset();
         Left  = LeftSelection.First();
         Right = RightSelection.First();
     }
     FileResolved?.Invoke(this, EventArgs.Empty);
 }
Example #3
0
        private void DoPickRight()
        {
            if (Left != _result)
            {
                _sourceFiles.Remove(Left);
            }
            else
            {
                file.SaveResult(null);
            }

            if (file.Resolved)
            {
                Left = Right = null;
            }
            else
            {
                LeftSelection.Reset();
                Left = LeftSelection.First();
            }
            FileResolved?.Invoke(this, EventArgs.Empty);
        }