Ejemplo n.º 1
0
        void frmViewPointsDeletePointsEvent(List <int> DeletedPointIndexes)
        {
            if (ViewPoint == null || ViewPoint.IsDisposed)
            {
                ViewPoint = new frmViewPoints();
            }
            else
            {
                ViewPoint.Show();
                ViewPoint.Focus();
            }

            List <MapWinGIS.Point> DeletedPoints = new List <MapWinGIS.Point>();

            foreach (int DeletedPointIndex in DeletedPointIndexes)
            {
                DeletedPoints.Add(points[DeletedPointIndex - 1]);
            }
            foreach (MapWinGIS.Point DeletedPoint in DeletedPoints)
            {
                points.Remove(DeletedPoint);
            }

            ViewPoint.DataTablePointsList.Clear();
            int ID = 0;

            foreach (MapWinGIS.Point point in points)
            {
                ID++;
                ViewPoint.DataTablePointsList.Rows.Add(new string[] { Convert.ToString(ID), Convert.ToString(point.y), Convert.ToString(point.x) });
            }

            UpdatePoint(Map, points);
        }
Ejemplo n.º 2
0
        private void btnViewPoints_Click(object sender, EventArgs e)
        {
            if (ViewPoint == null || ViewPoint.IsDisposed)
            {
                ViewPoint = new frmViewPoints();
            }
            else
            {
                ViewPoint.Show();
                ViewPoint.Focus();
            }

            int ID = 0;

            foreach (MapWinGIS.Point point in points)
            {
                ID++;
                ViewPoint.DataTablePointsList.Rows.Add(new string[] { Convert.ToString(ID), Convert.ToString(point.y), Convert.ToString(point.x), point.Key });
            }
            ViewPoint.DeletePointsEvent        += new DeletePointsDelegate(frmViewPointsDeletePointsEvent);
            ViewPoint.SavePointsShapefileEvent += new SavePointsShapefileDelegate(ViewPoint_SavePointsShapefileEvent);
            ViewPoint.ConnectPointsEvent       += new ConnectPointsDelegate(ViewPoint_ConnectPointsEvent);
            ViewPoint.PointContentChangedEvent += new PointContentChangedDelegate(ViewPoint_PointContentChangedEvent);
            ViewPoint.Show();
            //ViewPoint.Owner = this;
        }