void editingSession_ConflictDataChanged(object sender, ConflictDataChangedEventArgs e)
        {
            IEnumerable <ConflictInfo> conflicts = e.NewConflicts;

            Application.Current.Dispatcher.Invoke(() =>
            {
                if (conflicts != null && conflicts.Any())
                {
                    ConflictPopupViewModel controlViewModel = null;

                    if (control == null)
                    {
                        control             = new ConflictPopup();
                        controlViewModel    = new ConflictPopupViewModel(this.editingSession.SCCService);
                        control.DataContext = controlViewModel;
                    }
                    else
                    {
                        controlViewModel = (ConflictPopupViewModel)control.DataContext;
                    }

                    controlViewModel.ConflictViewModel.LatestVersion = e.LatestVersion;
                    controlViewModel.ConflictViewModel.FilePath      = _view.GetDocumentFullPath();

                    _adornmentLayer.AddAdornment(AdornmentPositioningBehavior.ViewportRelative, null, null, control, null);
                }
                else
                {
                    _adornmentLayer.RemoveAllAdornments();
                }
            });
        }
Example #2
0
        private void editingSession_ConflictDataChanged(object sender, ConflictDataChangedEventArgs e)
        {
            this.conflictInfo = e.NewConflicts;

            Application.Current.Dispatcher.Invoke(() =>
            {
                RedrawAdornments();
            });
        }