|
@@ -26,20 +26,6 @@ namespace QuestPDF.Previewer
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private bool _isRendering;
|
|
|
|
|
- public bool IsRendering
|
|
|
|
|
- {
|
|
|
|
|
- get => _isRendering;
|
|
|
|
|
- private set
|
|
|
|
|
- {
|
|
|
|
|
- if (_isRendering != value)
|
|
|
|
|
- {
|
|
|
|
|
- _isRendering = value;
|
|
|
|
|
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsRendering)));
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
public void UpdateDocument(IDocument? document)
|
|
public void UpdateDocument(IDocument? document)
|
|
|
{
|
|
{
|
|
|
Document = document;
|
|
Document = document;
|
|
@@ -49,7 +35,6 @@ namespace QuestPDF.Previewer
|
|
|
|
|
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
- IsRendering = true;
|
|
|
|
|
RenderDocument(document);
|
|
RenderDocument(document);
|
|
|
}
|
|
}
|
|
|
catch (Exception exception)
|
|
catch (Exception exception)
|
|
@@ -57,10 +42,6 @@ namespace QuestPDF.Previewer
|
|
|
var exceptionDocument = new ExceptionDocument(exception);
|
|
var exceptionDocument = new ExceptionDocument(exception);
|
|
|
RenderDocument(exceptionDocument);
|
|
RenderDocument(exceptionDocument);
|
|
|
}
|
|
}
|
|
|
- finally
|
|
|
|
|
- {
|
|
|
|
|
- IsRendering = false;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void RenderDocument(IDocument document)
|
|
private void RenderDocument(IDocument document)
|