internal EditorDiffMargin(IWpfTextView textView, UnifiedDiff unifiedDiff, IMarginCore marginCore) : base(textView) { ViewModel = new EditorDiffMarginViewModel(marginCore, unifiedDiff, UpdateDiffDimensions); UserControl = new EditorDiffMarginControl {DataContext = ViewModel, Width = MarginWidth}; }
protected DiffViewModel(HunkRangeInfo hunkRangeInfo, IMarginCore marginCore, Action <DiffViewModel, HunkRangeInfo> updateDiffDimensions) { HunkRangeInfo = hunkRangeInfo; MarginCore = marginCore; _updateDiffDimensions = updateDiffDimensions; MarginCore.BrushesChanged += HandleBrushesChanged; }
internal ScrollDiffMarginViewModel(IMarginCore marginCore, Action<DiffViewModel, HunkRangeInfo> updateDiffDimensions) : base(marginCore) { if (updateDiffDimensions == null) throw new ArgumentNullException("updateDiffDimensions"); _updateDiffDimensions = updateDiffDimensions; }
protected DiffViewModel(HunkRangeInfo hunkRangeInfo, IMarginCore marginCore, Action<DiffViewModel, HunkRangeInfo> updateDiffDimensions) { HunkRangeInfo = hunkRangeInfo; MarginCore = marginCore; _updateDiffDimensions = updateDiffDimensions; MarginCore.BrushesChanged += HandleBrushesChanged; }
internal EditorDiffMargin(IWpfTextView textView, IMarginCore marginCore) : base(textView) { ViewModel = new EditorDiffMarginViewModel(marginCore, UpdateDiffDimensions); UserControl = new EditorDiffMarginControl { DataContext = ViewModel, Width = MarginWidth }; }
protected DiffMarginViewModelBase(IMarginCore marginCore) { if (marginCore == null) throw new ArgumentNullException(nameof(marginCore)); MarginCore = marginCore; DiffViewModels = new ObservableCollection<DiffViewModel>(); }
internal EditorDiffMarginViewModel(IMarginCore marginCore, Action <DiffViewModel, HunkRangeInfo> updateDiffDimensions) : base(marginCore) { if (updateDiffDimensions == null) { throw new ArgumentNullException("updateDiffDimensions"); } _updateDiffDimensions = updateDiffDimensions; }
internal EditorDiffViewModel(HunkRangeInfo hunkRangeInfo, IMarginCore marginCore, Action <DiffViewModel, HunkRangeInfo> updateDiffDimensions) : base(hunkRangeInfo, marginCore, updateDiffDimensions) { ShowPopup = false; DiffText = GetDiffText(); IsDiffTextVisible = GetIsDiffTextVisible(); UpdateDimensions(); }
internal ScrollDiffMargin(IWpfTextView textView, UnifiedDiff unifiedDiff, IMarginCore marginCore, IWpfTextViewMargin containerMargin) : base(textView) { var scrollBarMargin = containerMargin.GetTextViewMargin(PredefinedMarginNames.VerticalScrollBar); // ReSharper disable once SuspiciousTypeConversion.Global _scrollBar = (IVerticalScrollBar)scrollBarMargin; ViewModel = new ScrollDiffMarginViewModel(marginCore, unifiedDiff, UpdateDiffDimensions); UserControl = new ScrollDiffMarginControl { DataContext = ViewModel, Width = MarginWidth, MaxWidth = MarginWidth, MinWidth = MarginWidth}; }
internal EditorDiffViewModel(HunkRangeInfo hunkRangeInfo, IMarginCore marginCore, Action<DiffViewModel, HunkRangeInfo> updateDiffDimensions) : base(hunkRangeInfo, marginCore, updateDiffDimensions) { ShowPopup = false; DiffText = GetDiffText(); IsDiffTextVisible = GetIsDiffTextVisible(); UpdateDimensions(); }
protected DiffMarginViewModelBase(IMarginCore marginCore) { if (marginCore == null) throw new ArgumentNullException("marginCore"); MarginCore = marginCore; DiffViewModels = new ObservableCollection<DiffViewModel>(); MarginCore.HunksChanged += HandleHunksChanged; }
protected DiffMarginViewModelBase(IMarginCore marginCore) { if (marginCore == null) { throw new ArgumentNullException("marginCore"); } MarginCore = marginCore; DiffViewModels = new ObservableCollection <DiffViewModel>(); MarginCore.HunksChanged += HandleHunksChanged; }
internal EditorDiffMarginViewModel(IMarginCore marginCore, UnifiedDiff unifiedDiff, Action<DiffViewModel, HunkRangeInfo> updateDiffDimensions) : base(marginCore) { if (updateDiffDimensions == null) throw new ArgumentNullException(nameof(updateDiffDimensions)); _updateDiffDimensions = updateDiffDimensions; foreach (var diffViewModel in unifiedDiff.HunkRanges.Select(CreateDiffViewModel)) { DiffViewModels.Add(diffViewModel); } }
internal ScrollDiffMargin(IWpfTextView textView, IMarginCore marginCore, IWpfTextViewMargin containerMargin) : base(textView) { var scrollBarMargin = containerMargin.GetTextViewMargin(PredefinedMarginNames.VerticalScrollBar); // ReSharper disable once SuspiciousTypeConversion.Global _scrollBar = (IVerticalScrollBar)scrollBarMargin; ViewModel = new ScrollDiffMarginViewModel(marginCore, UpdateDiffDimensions); UserControl = new ScrollDiffMarginControl { DataContext = ViewModel, Width = MarginWidth, MaxWidth = MarginWidth, MinWidth = MarginWidth }; }
internal ScrollDiffViewModel(HunkRangeInfo hunkRangeInfo, IMarginCore marginCore, Action <DiffViewModel, HunkRangeInfo> updateDiffDimensions) : base(hunkRangeInfo, marginCore, updateDiffDimensions) { UpdateDimensions(); }
internal ScrollDiffViewModel(HunkRangeInfo hunkRangeInfo, IMarginCore marginCore, Action<DiffViewModel, HunkRangeInfo> updateDiffDimensions) : base(hunkRangeInfo, marginCore, updateDiffDimensions) { UpdateDimensions(); }