Rename solution directory to Elwig
This commit is contained in:
25
Elwig/Windows/DocumentViewerWindow.xaml.cs
Normal file
25
Elwig/Windows/DocumentViewerWindow.xaml.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using Elwig.Helpers;
|
||||
|
||||
namespace Elwig.Windows {
|
||||
public partial class DocumentViewerWindow : Window {
|
||||
|
||||
private TempFile? PdfFile = null;
|
||||
|
||||
public DocumentViewerWindow(string title, string path) {
|
||||
InitializeComponent();
|
||||
Title = Title + " - " + title;
|
||||
WebView.Source = new($"file://{path}#view=FitH");
|
||||
}
|
||||
|
||||
public DocumentViewerWindow(string title, TempFile file) : this(title, file.FilePath) {
|
||||
PdfFile = file;
|
||||
}
|
||||
|
||||
public void OnClosed(object sender, EventArgs evt) {
|
||||
PdfFile?.Dispose();
|
||||
PdfFile = null;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user