StaticLookupEditor.cs 726 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. namespace InABox.Core
  3. {
  4. public abstract class StaticLookupEditor : BaseEditor, ILookupEditor
  5. {
  6. public StaticLookupEditor(Type type)
  7. {
  8. Type = type;
  9. LookupWidth = int.MaxValue;
  10. }
  11. public Type Type { get; set; }
  12. public int LookupWidth { get; set; }
  13. public EditorButton[] Buttons { get; set; }
  14. public abstract CoreTable Values(string columnname, object[] items = null);
  15. public StaticLookupEditor CloneStaticLookupEditor()
  16. {
  17. var result = Activator.CreateInstance(GetType(), Type) as StaticLookupEditor;
  18. result.LookupWidth = LookupWidth;
  19. return result;
  20. }
  21. }
  22. }