DynamicEditorPage.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using System;
  2. using System.Collections.Concurrent;
  3. using System.Collections.Generic;
  4. using System.Windows;
  5. using InABox.Core;
  6. namespace InABox.DynamicGrid
  7. {
  8. public enum PageType
  9. {
  10. Editor,
  11. Other
  12. }
  13. public interface IDynamicEditorPage
  14. {
  15. DynamicEditorGrid EditorGrid { get; set; }
  16. PageType PageType { get; }
  17. bool Ready { get; set; }
  18. void Load(object item, Func<Type, CoreTable>? PageDataHandler);
  19. void BeforeSave(object item);
  20. void AfterSave(object item);
  21. Size MinimumSize();
  22. string Caption();
  23. int Order();
  24. }
  25. //public class DynamicEditorPage
  26. //{
  27. // public String Name { get; set; }
  28. // public Control Page { get; set; }
  29. // public DynamicEditorPage(String name, Control page) : base()
  30. // {
  31. // Name = name;
  32. // Page = page;
  33. // }
  34. //}
  35. public class DynamicEditorPages : List<IDynamicEditorPage>
  36. {
  37. public DynamicEditorPages() : base()
  38. {
  39. }
  40. public DynamicEditorPages(IEnumerable<IDynamicEditorPage> pages) : this()
  41. {
  42. foreach (var page in pages)
  43. Add(page);
  44. }
  45. }
  46. }