mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-07-01 08:23:42 -04:00
WIP: observatory UI overhaul
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using Observatory.Framework.Files;
|
||||
using Observatory.Framework.Files;
|
||||
using Observatory.Framework.Files.Journal;
|
||||
using System.Xml.XPath;
|
||||
|
||||
namespace Observatory.Framework.Interfaces
|
||||
{
|
||||
@ -50,6 +49,13 @@ namespace Observatory.Framework.Interfaces
|
||||
/// </summary>
|
||||
public object Settings { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <para>Plugin-specific object implementing the IComparer interface which is used to sort columns in the basic UI datagrid.</para>
|
||||
/// <para>If omitted a basic numeric compare sorter is used.</para>
|
||||
/// </summary>
|
||||
public IObservatoryComparer ColumnSorter
|
||||
{ get => null; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -163,13 +169,6 @@ namespace Observatory.Framework.Interfaces
|
||||
/// <param name="items">Grid items to be added. Object types should match original template item used to create the grid.</param>
|
||||
public void AddGridItems(IObservatoryWorker worker, IEnumerable<object> items);
|
||||
|
||||
/// <summary>
|
||||
/// Add multiple items to the bottom of the basic UI grid.
|
||||
/// </summary>
|
||||
/// <param name="worker">Reference to the calling plugin's worker interface.</param>
|
||||
/// <param name="items">Grid items to be added. Object types should match original template item used to create the grid.</param>
|
||||
public void AddGridItems(IObservatoryWorker worker, IEnumerable<object> items);
|
||||
|
||||
/// <summary>
|
||||
/// Clears basic UI grid, removing all items.
|
||||
/// </summary>
|
||||
@ -221,4 +220,21 @@ namespace Observatory.Framework.Interfaces
|
||||
/// </summary>
|
||||
public string PluginStorageFolder { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extends the base IComparer interface with exposed values for the column ID and sort order to use.
|
||||
/// </summary>
|
||||
public interface IObservatoryComparer : System.Collections.IComparer
|
||||
{
|
||||
/// <summary>
|
||||
/// Column ID to be currently sorted by.
|
||||
/// </summary>
|
||||
public int SortColumn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Current order of sorting. Ascending = 1, Descending = -1, No sorting = 0.
|
||||
/// </summary>
|
||||
public int Order { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>Observatory.Framework</RootNamespace>
|
||||
<Configurations>Debug;Release;Portable</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@ -17,5 +18,9 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DocumentationFile>ObservatoryFramework.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Portable|AnyCPU'">
|
||||
<DocumentationFile>ObservatoryFramework.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -1350,6 +1350,12 @@
|
||||
If a public property is necessary but not required to be user accessible the [SettingIgnore] property will suppress display.</para>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Observatory.Framework.Interfaces.IObservatoryPlugin.ColumnSorter">
|
||||
<summary>
|
||||
Plugin-specific object implementing the IComparer interface which is used to sort columns in the basic UI datagrid.
|
||||
If omitted a basic string compare sorter is used.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Observatory.Framework.Interfaces.IObservatoryWorker">
|
||||
<summary>
|
||||
<para>Interface for worker plugins which process journal data to update their UI or send notifications.</para>
|
||||
@ -1504,6 +1510,21 @@
|
||||
Retrieves and ensures creation of a location which can be used by the plugin to store persistent data.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Observatory.Framework.Interfaces.IObservatoryComparer">
|
||||
<summary>
|
||||
Extends the base IComparer interface with exposed values for the column ID and sort order to use.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Observatory.Framework.Interfaces.IObservatoryComparer.SortColumn">
|
||||
<summary>
|
||||
Column ID to be currently sorted by.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Observatory.Framework.Interfaces.IObservatoryComparer.Order">
|
||||
<summary>
|
||||
Current order of sorting. Ascending = 1, Descending = -1, No sorting = 0.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Observatory.Framework.PluginUI">
|
||||
<summary>
|
||||
Class permitting plugins to provide their UI, if any, to Observatory Core.
|
||||
@ -1516,13 +1537,12 @@
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.PluginUI.UI">
|
||||
<summary>
|
||||
<para>UI object used by plugins with UIType.Avalonia.</para>
|
||||
<para>(Untested/not implemented)</para>
|
||||
<para>UI object used by plugins with UIType.Panel.</para>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.PluginUI.DataGrid">
|
||||
<summary>
|
||||
<para>Collection bound to DataGrid used byu plugins with UIType.Basic.</para>
|
||||
<para>Collection bound to DataGrid used by plugins with UIType.Basic.</para>
|
||||
<para>Objects in collection should be of a class defined within the plugin consisting of string properties.<br/>Each object is a single row, and the property names are used as column headers.</para>
|
||||
</summary>
|
||||
</member>
|
||||
@ -1531,7 +1551,7 @@
|
||||
Instantiate PluginUI of UIType.Basic.
|
||||
</summary>
|
||||
<param name="DataGrid">
|
||||
<para>Collection bound to DataGrid used byu plugins with UIType.Basic.</para>
|
||||
<para>Collection bound to DataGrid used by plugins with UIType.Basic.</para>
|
||||
<para>Objects in collection should be of a class defined within the plugin consisting of string properties.<br/>Each object is a single row, and the property names are used as column headers.</para>
|
||||
</param>
|
||||
</member>
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -17,13 +18,12 @@ namespace Observatory.Framework
|
||||
public readonly UIType PluginUIType;
|
||||
|
||||
/// <summary>
|
||||
/// <para>UI object used by plugins with UIType.Avalonia.</para>
|
||||
/// <para>(Untested/not implemented)</para>
|
||||
/// <para>UI object used by plugins with UIType.Panel.</para>
|
||||
/// </summary>
|
||||
public object UI;
|
||||
|
||||
/// <summary>
|
||||
/// <para>Collection bound to DataGrid used byu plugins with UIType.Basic.</para>
|
||||
/// <para>Collection bound to DataGrid used by plugins with UIType.Basic.</para>
|
||||
/// <para>Objects in collection should be of a class defined within the plugin consisting of string properties.<br/>Each object is a single row, and the property names are used as column headers.</para>
|
||||
/// </summary>
|
||||
public ObservableCollection<object> DataGrid;
|
||||
@ -32,7 +32,7 @@ namespace Observatory.Framework
|
||||
/// Instantiate PluginUI of UIType.Basic.
|
||||
/// </summary>
|
||||
/// <param name="DataGrid">
|
||||
/// <para>Collection bound to DataGrid used byu plugins with UIType.Basic.</para>
|
||||
/// <para>Collection bound to DataGrid used by plugins with UIType.Basic.</para>
|
||||
/// <para>Objects in collection should be of a class defined within the plugin consisting of string properties.<br/>Each object is a single row, and the property names are used as column headers.</para>
|
||||
/// </param>
|
||||
public PluginUI(ObservableCollection<object> DataGrid)
|
||||
|
Reference in New Issue
Block a user