IPanel.cs 986 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Drawing;
  4. using InABox.Core;
  5. namespace PRSDesktop
  6. {
  7. public class PanelAction
  8. {
  9. public Action<PanelAction> OnExecute { get; set; }
  10. public string Section { get; set; }
  11. public string Caption { get; set; }
  12. public Bitmap Image { get; set; }
  13. public void Execute()
  14. {
  15. OnExecute?.Invoke(this);
  16. }
  17. }
  18. public interface ICorePanel
  19. {
  20. void Setup();
  21. void Shutdown();
  22. void Refresh();
  23. }
  24. public interface IBasePanel : ICorePanel, IDataModelSource
  25. {
  26. bool IsReady { get; set; }
  27. void CreateToolbarButtons(IPanelHost host);
  28. bool Focus();
  29. Dictionary<string, object[]> Selected();
  30. void Heartbeat(TimeSpan time);
  31. }
  32. public interface IPanel<T> : IBasePanel
  33. {
  34. }
  35. public interface IPanelHost
  36. {
  37. void CreatePanelAction(PanelAction action);
  38. }
  39. }