Templates working

This commit is contained in:
2023-03-09 20:46:01 +01:00
parent a55678e5ef
commit d514a639a9
13 changed files with 158 additions and 41 deletions

View File

@ -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;
}
}
}