| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using InABox.Configuration;
- using InABox.Core;
- namespace PRSDesktop
- {
- public class PanelAction
- {
- public Action<PanelAction> OnExecute { get; set; }
- public string Caption { get; set; }
- public Bitmap Image { get; set; }
- public void Execute()
- {
- OnExecute?.Invoke(this);
- }
- }
- public interface ICorePanel
- {
- void Setup();
- /// <summary>
- /// Shutdown the panel.
- /// </summary>
- /// <param name="cancel">If the operation can be cancelled, this is not <see langword="null"/></param>
- void Shutdown(CancelEventArgs? cancel);
- void Refresh();
- }
- public interface IBasePanel : ICorePanel, IDataModelSource
- {
- bool IsReady { get; set; }
- void CreateToolbarButtons(IPanelHost host);
- Dictionary<string, object[]> Selected();
- void Heartbeat(TimeSpan time);
- }
- public interface IPanel<T> : IBasePanel
- {
- }
- public interface IPropertiesPanel<TProperties>
- where TProperties : BaseObject, IGlobalConfigurationSettings, new()
- {
- public TProperties Properties { get; set; }
- }
- public interface IPropertiesPanel<TProperties, TSecurity> : IPropertiesPanel<TProperties>
- where TProperties : BaseObject, IGlobalConfigurationSettings, new()
- where TSecurity : ISecurityDescriptor, new()
- {
- }
- public interface IPanelHost
- {
- void CreatePanelAction(PanelAction action);
- void CreateSetupAction(PanelAction action);
- }
- }
|