예제 #1
0
 protected override void OnFetchFailed(Exception exception)
 {
     if (DiffViewerHeaders.IsDisposed || DiffViewerFiles.IsDisposed)
     {
         return;
     }
     DiffViewerHeaders.BeginUpdate();
     _progressPanel.Remove();
     if (exception != null && !string.IsNullOrWhiteSpace(exception.Message))
     {
         DiffViewerHeaders.Panels.Add(new FlowProgressPanel()
         {
             Message = exception.Message
         });
     }
     DiffViewerHeaders.EndUpdate();
 }
예제 #2
0
        protected override Task <Diff> FetchDataAsync(IProgress <OperationProgress> progress, CancellationToken cancellationToken)
        {
            Verify.State.IsFalse(IsDisposed, "DiffBinding is disposed.");

            if (!DiffViewerHeaders.Created)
            {
                DiffViewerHeaders.CreateControl();
            }
            if (!DiffViewerFiles.Created)
            {
                DiffViewerFiles.CreateControl();
            }
            _scrollPosAfterReload = DiffViewerFiles.VScrollPos;
            DiffViewerFiles.Panels.Clear();
            DiffViewerHeaders.BeginUpdate();
            DiffViewerHeaders.Panels.Clear();
            DiffViewerHeaders.ScrollToTopLeft();
            AddSourceSpecificPanels();
            DiffViewerHeaders.Panels.Add(_progressPanel);
            DiffViewerHeaders.EndUpdate();
            _allDiffPanels.Clear();
            return(DiffSource.GetDiffAsync(DiffOptions, progress, cancellationToken));
        }