当前位置: 首页>>代码示例>>C#>>正文


C# PointClass.Compare方法代码示例

本文整理汇总了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)
开发者ID:Esri,项目名称:parcel-fabric-desktop-addins,代码行数:67,代码来源:LoadFileToLinesGrid.cs


注:本文中的PointClass.Compare方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。