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; /// /// Collection bound to DataGrid used by 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 ObservableCollection DataGrid; /// /// Collection bound to DataGrid headers used by plugins with UIType.Basic. /// public ObservableCollection Headers; /// /// Collection used to specify formatting of items in respective columns. /// public ObservableCollection Formats; /// /// Two-dimensional collection of items to display in UI grid. /// public ObservableCollection> Items; /// /// 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(ObservableCollection DataGrid) { PluginUIType = UIType.Basic; this.DataGrid = DataGrid; } /// /// 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 } } }