Exemple #1
0
        /// <summary>
        /// class constructor
        /// </summary>
        public DiffDocViewModel()
        {
            _DiffViewOptions = new TextEditorOptions()
            {
                ShowTabs            = false,
                ConvertTabsToSpaces = true,
                IndentationSize     = 4
            };

            _ViewA        = new DiffSideViewModel();
            _ViewB        = new DiffSideViewModel();
            _ViewLineDiff = new DiffSideViewModel();

            _ViewA.CaretPositionChanged += OnViewACaretPositionChanged;
            _ViewB.CaretPositionChanged += OnViewBCaretPositionChanged;
        }
Exemple #2
0
        /// <summary>hidden class constructor</summary>
        protected DiffDocViewModel()
        {
            _DiffViewOptions = new TextEditorOptions()
            {
                ShowTabs            = false,
                ConvertTabsToSpaces = true,
                IndentationSize     = 4
            };

            _ViewA        = new DiffSideViewModel(ViewSource.Left, this);
            _ViewB        = new DiffSideViewModel(ViewSource.Right, this);
            _ViewLineDiff = new DiffSideViewModel();

            _ViewA.CaretPositionChanged += OnViewACaretPositionChanged;
            _ViewB.CaretPositionChanged += OnViewBCaretPositionChanged;

            _IsComparedAs   = _ShouldBeComparedAs = CompareType.Auto;
            _CanSyncDisplay = true;
        }