Templates working
This commit is contained in:
@ -11,9 +11,11 @@ namespace WGneu {
|
||||
public partial class App : Application {
|
||||
|
||||
public static bool IsPrintingReady => Documents.Html.IsReady && Documents.Pdf.IsReady;
|
||||
public static System.Windows.Threading.Dispatcher MainDispatcher { get; private set; }
|
||||
|
||||
public App() : base() {
|
||||
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
|
||||
MainDispatcher = Dispatcher;
|
||||
}
|
||||
|
||||
public void App_Startup(object sender, EventArgs e) {
|
||||
@ -21,6 +23,10 @@ namespace WGneu {
|
||||
Task.Run(() => Documents.Pdf.Init(PrintingReadyChanged));
|
||||
}
|
||||
|
||||
public void App_Exit(object sender, EventArgs e) {
|
||||
Task.Run(() => Documents.Pdf.Close());
|
||||
}
|
||||
|
||||
private void PrintingReadyChanged() {
|
||||
Dispatcher.BeginInvoke(App_PrintingReadyChanged, this, new EventArgs());
|
||||
}
|
||||
|
Reference in New Issue
Block a user