Commit 48f37511 authored by 潘栩锋's avatar 潘栩锋 🚴

修改 Range, BorderSearch, GetSample

parent 7b6f8b44
......@@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using System.ComponentModel;
using Newtonsoft.Json;
using System.Collections;
namespace Misc
{
......@@ -372,6 +373,45 @@ namespace Misc
}
/// <summary>
/// Range 比较器
/// </summary>
public class RangeEqualityComparer : IEqualityComparer<Range>
{
/// <summary>
///
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
public bool Equals(Range x, Range y)
{
if ((x.Begin == y.Begin) && (x.End == y.End))
{
return true;
}
else
return false;
}
/// <summary>
///
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public int GetHashCode(Range obj)
{
int hashCode = obj.Begin.GetHashCode();
int hashCode2 = obj.End.GetHashCode();
if (hashCode != hashCode2)
{
hashCode ^= hashCode2;
}
return hashCode;
}
}
public static class EListRange
{
/// <summary>
......
......@@ -20,7 +20,6 @@ namespace FLY.Thick.Base.Server
#endregion
#region 属性,成员变量的代理
/// <summary>
/// 启动与否
/// </summary>
......@@ -58,7 +57,6 @@ namespace FLY.Thick.Base.Server
/// </summary>
public int Width { get; protected set; }
private int mid;
/// <summary>
/// 膜中间位置 单位 脉冲
/// </summary>
......
......@@ -350,7 +350,7 @@ namespace FLY.Thick.Base.Server
}
else
{
return null;
return new Range();
}
}
/// <summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment