Rename solution directory to Elwig
This commit is contained in:
44
Elwig/Windows/MainWindow.xaml.cs
Normal file
44
Elwig/Windows/MainWindow.xaml.cs
Normal file
@ -0,0 +1,44 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.Intrinsics.X86;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using Elwig.Documents;
|
||||
using Elwig.Helpers;
|
||||
|
||||
namespace Elwig.Windows {
|
||||
public partial class MainWindow : Window {
|
||||
private readonly AppDbContext Context = new();
|
||||
|
||||
public MainWindow() {
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs evt) {
|
||||
Context.Countries.Load();
|
||||
Button4.IsEnabled = App.IsPrintingReady;
|
||||
}
|
||||
|
||||
protected override void OnClosing(CancelEventArgs evt) {
|
||||
Context.Dispose();
|
||||
base.OnClosing(evt);
|
||||
}
|
||||
|
||||
private void Button2_Click(object sender, RoutedEventArgs evt) {
|
||||
var w = new MemberListWindow();
|
||||
w.Show();
|
||||
}
|
||||
|
||||
private void Button4_Click(object sender, RoutedEventArgs evt) {
|
||||
Utils.RunBackground("PDF Generation", async () => {
|
||||
using var letter = new BusinessLetter("Test Dokument", Context.Members.First());
|
||||
await letter.Generate();
|
||||
letter.Show();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user