Пример #1
0
        public static void DrawLine(IGraphicsContainer3D lineGraphicsContainer3D, List <IPoint> listPoints)
        {
            IPointCollection linePointColl = new PolylineClass();

            foreach (var point in listPoints)
            {
                linePointColl.AddPoint(point, ref _missing, ref _missing);
            }
            DrawUtilities.DrawLine(lineGraphicsContainer3D, linePointColl);
        }
Пример #2
0
        public static bool refreshInfLayer()
        {
            DataTable gridTable = IbatisHelper.ExecuteQueryForDataTable("GetInfSource", null);

            if (gridTable.Rows.Count < 1)
            {
                return(false);
            }

            IRgbColor      pColor = new RgbColorClass(); //颜色
            IGraphicsLayer pLayer = ((object)GISMapApplication.Instance.Scene as IBasicMap).BasicGraphicsLayer;
            IPoint         pt     = null;

            pColor.RGB = System.Drawing.Color.FromArgb(0, 0, 255).ToArgb();

            foreach (DataRow dataRow in gridTable.Rows)
            {
                pt = GeometryUtilities.ConstructPoint3D(double.Parse(dataRow["x"].ToString()), double.Parse(dataRow["y"].ToString()), double.Parse(dataRow["z"].ToString()));
                DrawUtilities.DrawPoint(pLayer as IGraphicsContainer3D, pt, pColor, 25);
            }

            return(true);
        }