CodePopupEditor.cs 637 B

12345678910111213141516171819202122232425
  1. using System;
  2. namespace InABox.Core
  3. {
  4. public class CodePopupEditor : DataLookupEditor
  5. {
  6. public CodePopupEditor(Type type, params string[] otherfields) : base(type, otherfields)
  7. {
  8. }
  9. public string CodeColumn { get; set; }
  10. public bool CanAdd { get; set; } = false;
  11. public Action<object> OnCreateItem { get; set; }
  12. protected override BaseEditor DoClone()
  13. {
  14. var result = (CloneDataLookupEditor() as CodePopupEditor)!;
  15. result.CanAdd = CanAdd;
  16. result.CodeColumn = CodeColumn;
  17. return result;
  18. }
  19. }
  20. }