资源简介

利用Arcengine控件C#编写的功能,能加载栅格矢量mxd等格式的数据,实现图形的绘制,图形元素的绘制(刷新不消失),添加删除图层,移动图层等功能,比较全面

资源截图

代码片段和文件信息

using System;
using System.Windows.Forms;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Display;
using System.IO;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.DataSourcesRaster;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Output;
namespace 绘制图形
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        int flag = 0;
        private void axToolbarControl1_onmousedown(object sender ESRI.ArcGIS.Controls.IToolbarControlEvents_onmousedownEvent e)
        {

        }

        private void axMapControl1_onmousedown(object sender ESRI.ArcGIS.Controls.IMapControlEvents2_onmousedownEvent e)
        {
            //IColor pColor = new RgbColor();
            //pColor.RGB = 255;
            //IColorSelector pSelector = new ColorSelectorClass();
            //pSelector.Color = pColor;
            //if (pSelector.DoModal(0))
            //{
            //    pColor = pSelector.Color;
            //}
            if (flag == 5)
            {
                IMap pMap;
                IActiveView pActiveView;
                pMap = axMapControl1.Map;
                pActiveView = pMap as IActiveView;
                IPoint pPt;
                pPt = new PointClass();
                pPt.PutCoords(e.mapX e.mapY);
                IMarkerElement pMarkerElement;
                pMarkerElement = new MarkerElementClass();
                ISimpleMarkerSymbol pMarkerSymbol;
                pMarkerSymbol = new SimpleMarkerSymbolClass();
                IRgbColor color = new RgbColorClass();
                color.Red = 255;
                color.Blue = 0;
                color.Green = 0;
                //IColorSelector pSelector = new ColorSelectorClass();
                //pSelector.Color = pColor;
                //if (pSelector.DoModal(0))
                //{
                //    pColor = pSelector.Color;
                //}


                pMarkerSymbol.Color = color;
                pMarkerSymbol.Size = 2;
                pMarkerSymbol.style = esriSimpleMarkerstyle.esriSMSDiamond;
                IElement pElement;
                pElement = pMarkerElement as IElement;
                pElement.Geometry = pPt;
                pMarkerElement.Symbol = pMarkerSymbol;
                IGraphicsContainer pGraphicsContainer;
                pGraphicsContainer = pMap as IGraphicsContainer;
                pGraphicsContainer.AddElement(pMarkerElement as IElement 0);
                pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics null null);
            }
            else if (flag == 8)
            {
                IMap pMap;
                IActiveView pActiveView;
                pMap = axMapControl1.Map;
                pActiveView = pMap as IActiveView;
                ITextElement pTextEle;
                IElement pEles;
                

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      32768  2014-08-19 17:19  总\绘制图形\bin\Debug\绘制图形.exe

     文件      40448  2014-08-19 17:19  总\绘制图形\bin\Debug\绘制图形.pdb

     文件      11600  2014-08-19 17:22  总\绘制图形\bin\Debug\绘制图形.vshost.exe

     文件        490  2010-03-17 22:39  总\绘制图形\bin\Debug\绘制图形.vshost.exe.manifest

     文件      20116  2014-08-19 17:19  总\绘制图形\Form1.cs

     文件      18748  2014-08-19 17:19  总\绘制图形\Form1.Designer.cs

     文件      14626  2014-08-19 17:19  总\绘制图形\Form1.resx

     文件     120655  2014-08-14 19:00  总\绘制图形\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       7610  2014-08-19 17:19  总\绘制图形\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        402  2014-08-19 17:19  总\绘制图形\obj\x86\Debug\GenerateResource.read.1.tlog

     文件        978  2014-08-19 17:19  总\绘制图形\obj\x86\Debug\GenerateResource.write.1.tlog

     文件     104119  2014-08-19 10:23  总\绘制图形\obj\x86\Debug\ResolveAssemblyReference.cache

     文件       1697  2014-08-19 17:22  总\绘制图形\obj\x86\Debug\绘制图形.csproj.FileListAbsolute.txt

     文件      32768  2014-08-19 17:19  总\绘制图形\obj\x86\Debug\绘制图形.exe

     文件       6053  2014-08-19 17:19  总\绘制图形\obj\x86\Debug\绘制图形.Form1.resources

     文件      40448  2014-08-19 17:19  总\绘制图形\obj\x86\Debug\绘制图形.pdb

     文件        180  2014-08-19 17:19  总\绘制图形\obj\x86\Debug\绘制图形.Properties.Resources.resources

     文件        572  2014-08-14 19:49  总\绘制图形\Program.cs

     文件       1374  2014-08-14 11:32  总\绘制图形\Properties\AssemblyInfo.cs

     文件       2872  2014-08-14 11:32  总\绘制图形\Properties\Resources.Designer.cs

     文件       5612  2014-08-14 11:32  总\绘制图形\Properties\Resources.resx

     文件       1095  2014-08-14 11:32  总\绘制图形\Properties\Settings.Designer.cs

     文件        249  2014-08-14 11:32  总\绘制图形\Properties\Settings.settings

     文件       6805  2014-08-19 17:19  总\绘制图形\绘制图形.csproj

     文件        878  2014-08-14 11:32  总\绘制图形.sln

    ..A..H.     26112  2014-08-19 17:22  总\绘制图形.suo

     目录          0  2014-08-14 11:32  总\绘制图形\obj\x86\Debug\TempPE

     目录          0  2014-08-19 17:19  总\绘制图形\obj\x86\Debug

     目录          0  2014-08-14 19:48  总\绘制图形\bin\Debug

     目录          0  2014-08-14 11:32  总\绘制图形\obj\x86

............此处省略8个文件信息

评论

共有 条评论