37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
using System.Collections.ObjectModel;
|
|
using System.Windows;
|
|
using Pf2e.Database;
|
|
using Pf2e.Database.Model.Enum;
|
|
using Pf2e.Scrapper.WPF.EntityViewer.ViewModel;
|
|
|
|
namespace Pf2e.WPF.EntityViewer;
|
|
|
|
internal partial class EntityForm : Window
|
|
{
|
|
public Pf2eDbContext Context { get; }
|
|
public EntityFormViewModel ViewModel { get; }
|
|
|
|
public EntityForm(Pf2eDbContext context, EntityFormViewModel viewModel)
|
|
{
|
|
Context = context;
|
|
ViewModel = viewModel;
|
|
InitializeComponent();
|
|
|
|
EntityListControl.DataContext = ViewModel.DbEntityListViewModel;
|
|
ViewControl.DataContext = ViewModel.ViewViewModel;
|
|
|
|
DataContext = ViewModel;
|
|
|
|
ViewModel.DbEntityListViewModel.Reload();
|
|
}
|
|
|
|
private void Window_Loaded(object sender, RoutedEventArgs e) { }
|
|
|
|
private void Button_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
ApplicationStateChange?.Invoke(this, ApplicationStage.InitialSettings);
|
|
}
|
|
|
|
public event ImportApplication.ApplicationStateChangeDelegate? ApplicationStateChange;
|
|
}
|