Using Html/Pdf Initializer

This commit is contained in:
2023-03-08 23:25:01 +01:00
parent 30c4eea7b7
commit a55678e5ef
8 changed files with 72 additions and 33 deletions

View File

@ -22,6 +22,7 @@ namespace WGneu.Windows {
public partial class MainWindow : Window {
private readonly WgContext _context = new WgContext();
private CollectionViewSource countryViewSource;
public MainWindow() {
InitializeComponent();
countryViewSource = (CollectionViewSource)FindResource("countryViewSource");
@ -29,8 +30,9 @@ namespace WGneu.Windows {
private void Window_Loaded(object sender, RoutedEventArgs e) {
_context.Countries.Load();
Documents.Pdf.Init();
countryViewSource.Source = _context.Countries.Local.ToObservableCollection();
Button3.IsEnabled = App.IsPrintingReady;
Button4.IsEnabled = App.IsPrintingReady;
}
protected override void OnClosing(CancelEventArgs e) {