添加项目文件。
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
|
||||
namespace JinYuan.ControlLib.UCHelper
|
||||
{
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 属性排序 序号比较器
|
||||
public class PropertyOrderPair : IComparable
|
||||
{
|
||||
private float order;
|
||||
|
||||
private string categoryName;
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 类别名称
|
||||
public string CategoryName => categoryName;
|
||||
|
||||
//
|
||||
// 参数:
|
||||
// categoryName:
|
||||
// 类别名称
|
||||
//
|
||||
// order:
|
||||
// 序号
|
||||
public PropertyOrderPair(string categoryName, float order)
|
||||
{
|
||||
this.order = order;
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
PropertyOrderPair propertyOrderPair = (PropertyOrderPair)obj;
|
||||
if (propertyOrderPair.order == order)
|
||||
{
|
||||
return string.Compare(categoryName, propertyOrderPair.categoryName);
|
||||
}
|
||||
|
||||
if (propertyOrderPair.order > order)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user