using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Observatory.Framework
{
///
/// Class permitting plugins to provide their UI, if any, to Observatory Core.
///
public class PluginUI
{
///
/// Type of UI used by plugin.
///
public readonly UIType PluginUIType;
///
/// UI object used by plugins with UIType.Avalonia.
/// (Untested/not implemented)
///
public object UI;
///
/// >Two-dimensional collection of items to display in UI grid for UIType.Basic
///
public BasicGrid BasicGrid;
///
/// Instantiate PluginUI of UIType.Basic.
///
///
/// Collection bound to DataGrid used byu plugins with UIType.Basic.
/// Objects in collection should be of a class defined within the plugin consisting of string properties.
Each object is a single row, and the property names are used as column headers.
///
public PluginUI(BasicGrid basicGrid)
{
PluginUIType = UIType.Basic;
BasicGrid = basicGrid;
}
///
/// Instantiate PluginUI of specified UIType.
/// (Untested/not implemented)
///
/// UIType for plugin.
/// Avalonia control to place in plugin tab.
public PluginUI(UIType uiType, object UI)
{
PluginUIType = uiType;
this.UI = UI;
}
///
/// Options for plugin UI types.
///
public enum UIType
{
///
/// No UI. Tab will not be added to list.
///
None = 0,
///
/// Simple DataGrid, to which items can be added or removed.
///
Basic = 1,
///
/// AvaloniaUI control which is placed in plugin tab.
///
Avalonia = 2,
///
/// UI used by Observatory Core settings tab.
/// Not intended for use by plugins.
///
Core = 3
}
}
}