コード例 #1
0
        private void OverviewValueChanged(object p)
        {
            lock (_lockObject)
            {
                if ((p is double) == false)
                {
                    return;
                }

                double param = (double)p;

                if (_IgnoreNextSliderValueChange == true)
                {
                    if (_LastLineToSync == (int)param)
                    {
                        return;
                    }

                    _IgnoreNextSliderValueChange = false;
                    return;
                }

                _LastLineToSync = (int)param;

                IDiffSideViewModel nonActView;
                IDiffSideViewModel activeView = DiffCtrl.GetActiveView(out nonActView);
                var gotoPos = new DiffViewPosition((int)param, 0);
                DiffCtrl.ScrollToLine(gotoPos, nonActView, activeView, false);
            }
        }
コード例 #2
0
        /// <summary>
        /// Class constructor
        /// </summary>
        public DiffSideViewModel()
        {
            _position = new DiffViewPosition(0, 0);

            _DocLineDiffsLock = new object();
            _DocLineDiffs     = new ObservableRangeCollection <IDiffLineViewModel>();
            BindingOperations.EnableCollectionSynchronization(_DocLineDiffs, _DocLineDiffsLock);

            _Line   = 0;
            _Column = 0;

            _TxtControl     = new TextBoxController();
            _ViewActivation = DateTime.MinValue;

            _oneTaskScheduler = new OneTaskLimitedScheduler();
        }
コード例 #3
0
        /// <summary>Class constructor</summary>
        public DiffSideViewModel()
        {
            _position = new DiffViewPosition(0, 0);

            _DocLineDiffsLock = new object();
            _DocLineDiffs     = new ObservableRangeCollection <IDiffLineViewModel>();
            BindingOperations.EnableCollectionSynchronization(_DocLineDiffs, _DocLineDiffsLock);

            _ViewActivation = DateTime.MinValue;

            _oneTaskScheduler = new OneTaskLimitedScheduler();

            CurrentViewMode = DisplayMode.Comparing;
            _DocumentViews  = new ObservableCollection <DiffSideTextViewModel>();

            SetDocumentViews(string.Empty, string.Empty, Encoding.Default, string.Empty, false);
        }