IDynamicEditorControl.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Configuration;
  4. using System.Windows;
  5. using System.Windows.Media;
  6. using InABox.Core;
  7. namespace InABox.DynamicGrid
  8. {
  9. public delegate void EditorControlValueChangedHandler(IDynamicEditorControl sender, Dictionary<string, object?> values);
  10. public interface IDynamicEditorControl
  11. {
  12. string ColumnName { get; set; }
  13. bool Loaded { get; set; }
  14. bool Changed { get; set; }
  15. IBaseEditor EditorDefinition { get; set; }
  16. bool IsEnabled { get; set; }
  17. void SetFocus();
  18. int DesiredHeight();
  19. event EditorControlValueChangedHandler OnEditorValueChanged;
  20. void Configure();
  21. void SetEnabled(bool enabled);
  22. void SetVisible(bool enabled);
  23. void SetValue(string property, object? value);
  24. object? GetValue(string property);
  25. IDynamicEditorHost Host { get; set; }
  26. }
  27. public interface IDynamicEditorControl<T> : IDynamicEditorControl
  28. {
  29. public T Value { get; set; }
  30. public Type ValueType { get; set; }
  31. }
  32. }