Exemplo n.º 1
0
        private void Draw(double[] Xcoord, double[] Ycoord)
        {
            int id = ActiveLayer.GetLargestID();
            //int id = ActiveLayer.Elements.Count;
            //int id = 4;
            //int id = ActiveLayer.ElementKeys[ActiveLayer.ElementKeys.Count];
            //int id = ActiveLayer.Selection.ElementKeys.Count;
            //MessageBox.Show("Selected id = " + id.ToString(), "Notification", MessageBoxButtons.OK, MessageBoxIcon.Information);

            PolyLine pLine = ActiveLayer.Elements.GetElement(id).PolyLine;

            //MessageBox.Show("Selected element = " + ActiveLayer.Elements.GetElement(id).Key.ToString(), "Notification", MessageBoxButtons.OK, MessageBoxIcon.Information);

            pLine.Fill(4, ref Xcoord[0], ref Ycoord[0]);
            pLine.AddPoint(Xcoord[0], Ycoord[0]);

            //ActiveLayer.Elements.GetElement(ActiveLayer.ElementKeys[id]).SetPolyLine(pLine);

            #region debug
            MessageBox.Show(ActiveLayer.Elements.GetElement(ActiveLayer.ElementKeys[1]).SetPolyLine(pLine).ToString(), "Notification", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //MessageBox.Show(el.SetPolyLine(pLine).ToString(), "Notification", MessageBoxButtons.OK, MessageBoxIcon.Information);
            #endregion
        }