本文整理汇总了C#中PointClass.Compare方法的典型用法代码示例。如果您正苦于以下问题:C# PointClass.Compare方法的具体用法?C# PointClass.Compare怎么用?C# PointClass.Compare使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PointClass
的用法示例。
在下文中一共展示了PointClass.Compare方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnClick
//.........这里部分代码省略.........
{//start point
string[] XY = sCourse.Split(' ');
double x = Convert.ToDouble(XY[1]);
double y = Convert.ToDouble(XY[2]);
StartPoint.PutCoords(x, y);
}
if (sCourse.Contains("ep"))
{//end point
string[] XY = sCourse.Split(' ');
double x = Convert.ToDouble(XY[1]);
double y = Convert.ToDouble(XY[2]);
EndPoint.PutCoords(x, y);
}
if (sCourse.Contains("tometricfactor"))
{//this handles the comma-separated file case
string[] sScaleFactor = sCourse.Split(',');
m_dScaleFactor = Convert.ToDouble(sScaleFactor[1]);
}
}
catch { }
}
tr.Close(); //close the file and release resources
string sFileExt = System.IO.Path.GetExtension(openFileDialog.FileName.TrimEnd());
if ((sFileExt.ToLower() == ".csv") && (sFileLine[0].Contains(",")))
{//if it's a comma-delimited file
ft = FileType.CommaDelimited;
}
//Test for loop traverse
if (!(EndPoint.IsEmpty))
{
if (EndPoint.Compare(StartPoint) == 0)
IsLoopTraverse = true;
else
IsLoopTraverse = false;
}
//get highest point id number in grid, and get the to point id on the last line.
IGSLine pParcelLine = null;
int iFirstToNode = -1;
int iLastToNode = -1;
int iHighestPointID = -1;
for (int i = 0; i < pTrav.LineCount; i++)
{
if (pTrav.GetLine(i, ref pParcelLine))
{
if (iFirstToNode < 0)
iFirstToNode = pParcelLine.ToPoint;
iLastToNode = pParcelLine.ToPoint;
iHighestPointID = iHighestPointID < pParcelLine.ToPoint ? pParcelLine.ToPoint : iHighestPointID;
iHighestPointID = iHighestPointID < pParcelLine.FromPoint ? pParcelLine.FromPoint : iHighestPointID;
}
}
ICadastralUndoRedo pCadUndoRedo = pTrav as ICadastralUndoRedo;
pCadUndoRedo.StartUndoRedoSession("Load Lines From File");
try
{
IGSLine pLine = null;
int iLinecount = iCount - 1;
ISegment pExitTangent = null;
for (iCount = 0; iCount <= iLinecount; iCount++)
{
if (ft == FileType.COGOToolbarTraverse)