Templates working
This commit is contained in:
@ -14,10 +14,22 @@ using System.Windows.Shapes;
|
||||
|
||||
namespace WGneu.Windows {
|
||||
public partial class DocumentViewerWindow : Window {
|
||||
|
||||
private Utils.TemporaryFile? PdfFile = null;
|
||||
|
||||
public DocumentViewerWindow(string title, string path) {
|
||||
InitializeComponent();
|
||||
Title = Title + " - " + title;
|
||||
WebView.Source = new("file://" + path);
|
||||
}
|
||||
|
||||
public DocumentViewerWindow(string title, Utils.TemporaryFile file) : this(title, file.FilePath) {
|
||||
PdfFile = file;
|
||||
}
|
||||
|
||||
public void OnClosed(object sender, EventArgs e) {
|
||||
PdfFile?.Dispose();
|
||||
PdfFile = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user