2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-07-01 16:33:43 -04:00

WIP: observatory UI overhaul

This commit is contained in:
Xjph
2023-07-07 08:36:27 -02:30
parent 1d62a0ec1d
commit d99a190869
28 changed files with 1448 additions and 386 deletions

View File

@ -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; }
}
}