Outsource many methods from MemberAdminWindow to abstract classes
This commit is contained in:
23
Elwig/Windows/ContextWindow.cs
Normal file
23
Elwig/Windows/ContextWindow.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using Elwig.Helpers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace Elwig.Windows {
|
||||
public abstract class ContextWindow : Window {
|
||||
protected readonly AppDbContext Context;
|
||||
|
||||
public ContextWindow() : base() {
|
||||
Context = new();
|
||||
}
|
||||
|
||||
protected override void OnClosing(CancelEventArgs evt) {
|
||||
Context.Dispose();
|
||||
base.OnClosing(evt);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user