using InABox.Wpf; using System; using System.Windows; using InABox.Core; namespace InABox.DynamicGrid { /// /// Interaction logic for DynamicImportList.xaml /// public partial class DynamicImportList : ThemableWindow { public DynamicImportList(Type entitytype, Guid entityid) { InitializeComponent(); Imports.EntityType = entitytype; Imports.EntityID = entityid; Imports.OnImportItem += o => { return OnImportItem != null ? OnImportItem.Invoke(o) : true; }; Imports.OnCustomiseImport += (o, e) => { OnCustomiseImport?.Invoke(o, e); }; Imports.OnSave += (sender, entity) => OnSave?.Invoke(sender, entity); Imports.OnLoad += (sender, type, fields, id) => OnLoad(sender, type, fields, id); Imports.Refresh(true, true); } public event OnImportItem OnImportItem; public event OnCustomiseImport OnCustomiseImport; public event ImportSaveEvent OnSave; public event ImportLoadEvent OnLoad; } }