internal 线路绘图工具.Device FindDeviceByDistance(double distance) { if ((NodeDevice as ICheckDistance).IsDistanceIn(distance)) { return(NodeDevice); } else { foreach (TopolotyNode node in RightNodes) { 线路绘图工具.Device resultDevice = node.FindDeviceByDistance(distance); if (resultDevice != null) { return(resultDevice); } } } return(null); }
private int SetMAOffset(线路绘图工具.Device RailSwitch) { if ((RailSwitch as RailSwitch).SectionName.Substring(0, 3) == "110" || (RailSwitch as RailSwitch).SectionName.Substring(0, 3) == "111" || (RailSwitch as RailSwitch).SectionName.Substring(0, 3) == "118" || (RailSwitch as RailSwitch).SectionName.Substring(0, 3) == "119") { if ((RailSwitch as RailSwitch).IsPositionNormal == true && (RailSwitch as RailSwitch).IsPositionReverse == false) { return(45); } else { return(20); } } else { return(20); } }