using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Windows; using InABox.Core; namespace InABox.DynamicGrid; public enum PageType { Editor, Other } public interface IDynamicEditorPage { DynamicEditorGrid EditorGrid { get; set; } PageType PageType { get; } bool Ready { get; set; } bool ReadOnly { get; set; } void Load(object item, Func? PageDataHandler); /// /// Called when the "OK" button is clicked on an editor, and before the item is saved. /// /// void BeforeSave(object item); /// /// Called when the "OK" button is clicked on an editor, and after the item is saved. /// /// /// Generally used to save any child entities that need to be saved, since now the parent has a valid . /// /// void AfterSave(object item); event EventHandler OnChanged; void DoChanged(); Size MinimumSize(); string Caption(); int Order(); } //public class DynamicEditorPage //{ // public String Name { get; set; } // public Control Page { get; set; } // public DynamicEditorPage(String name, Control page) : base() // { // Name = name; // Page = page; // } //} public class DynamicEditorPages : List { public DynamicEditorPages() : base() { } public DynamicEditorPages(IEnumerable pages) : this() { foreach (var page in pages) Add(page); } }