Add SeriesViewDialog
This commit is contained in:
parent
784ab73a36
commit
9ae1f0399b
27 changed files with 1293 additions and 18 deletions
23
Source/LibationUiBase/SeriesView/SeriesOrder.cs
Normal file
23
Source/LibationUiBase/SeriesView/SeriesOrder.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
|
||||
namespace LibationUiBase.SeriesView
|
||||
{
|
||||
public class SeriesOrder : IComparable
|
||||
{
|
||||
public float Order { get; }
|
||||
public string OrderString { get; }
|
||||
|
||||
public SeriesOrder(string orderString)
|
||||
{
|
||||
OrderString = orderString;
|
||||
Order = float.TryParse(orderString, out var o) ? o : -1f;
|
||||
}
|
||||
public override string ToString() => OrderString;
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
if (obj is not SeriesOrder other) return 1;
|
||||
return Order.CompareTo(other.Order);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue