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


C# IActiveView类代码示例

本文整理汇总了C#中IActiveView的典型用法代码示例。如果您正苦于以下问题:C# IActiveView类的具体用法?C# IActiveView怎么用?C# IActiveView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IActiveView类属于命名空间,在下文中一共展示了IActiveView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetMapCoordinatesFromScreenCoordinates

        public IPoint GetMapCoordinatesFromScreenCoordinates(IPoint screenPoint, IActiveView
                activeView)
        {
            //http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//00010000049z000000

            if (screenPoint == null || screenPoint.IsEmpty || activeView == null)
            {
                return null;
            }

            ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = activeView.ScreenDisplay;
            ESRI.ArcGIS.Display.IDisplayTransformation displayTransformation =
                    screenDisplay.DisplayTransformation;

            return displayTransformation.ToMapPoint((System.Int32)screenPoint.X,
                    (System.Int32)screenPoint.Y); // Explicit cast.
        }
开发者ID:jstep,项目名称:resources,代码行数:17,代码来源:GetMapPoint.cs

示例2: ExportActiveView

        public static void ExportActiveView(IActiveView pActiveView ,string strImagePath)
        {
            IExporter pExporter;
            IEnvelope pEnv;
            tagRECT rectExpFrame;
            int hdc;
            short dpi;

            pExporter=new JpegExporterClass();

            pEnv=new EnvelopeClass();

            //Setup the exporter
            rectExpFrame = pActiveView.ExportFrame;

            pEnv.PutCoords(rectExpFrame.left,rectExpFrame.top,rectExpFrame.right,rectExpFrame.bottom);

            dpi=96;

            pExporter.PixelBounds=pEnv;

            pExporter.ExportFileName=strImagePath;

            pExporter.Resolution=dpi;

            hdc=pExporter.StartExporting();

            pActiveView.Output(hdc,dpi,ref rectExpFrame,null,null);

            pExporter.FinishExporting();
        }
开发者ID:chinasio,项目名称:Control,代码行数:31,代码来源:SpatialHelperFunction.cs

示例3: GetEnvlope

 public static IEnvelope GetEnvlope(IActiveView activeView, IPoint queryPoint, double envlopeDistance)
 {
     IEnvelope envelope = new EnvelopeClass();
     envelope.CenterAt(queryPoint);
     envelope.Width = 2 * envlopeDistance;
     envelope.Height = 2 * envlopeDistance;
     return envelope;           
 }
开发者ID:weepingdog,项目名称:VerticesToCenter,代码行数:8,代码来源:FunctionCommon.cs

示例4: PictureThread

 public PictureThread(string FilePath,IActiveView ActiveView,DataType dataType,string MapType)
 {
     this.ActiveView = ActiveView;
     this.FilePath = FilePath;
     this.MapType = MapType;
     this.DPI = int.Parse(System.Configuration.ConfigurationManager.AppSettings["DPI"]);
     this.Lenged = GetLegend(dataType,this.MapType);
 }
开发者ID:LooWooTech,项目名称:Traffic,代码行数:8,代码来源:PictureThread.cs

示例5: frmAdjustPoint

 //private delegate void DoWork();
 public frmAdjustPoint(IGeoReference geoRef, IActiveView activeView,IMap map,string fileName)
 {
     InitializeComponent();
     m_geoRef = geoRef;
     m_activeView = activeView;
     m_map = map;
     m_fileName = fileName;
 }
开发者ID:chinasio,项目名称:minegis,代码行数:9,代码来源:frmAdjustPoint.cs

示例6: GotoXY_Load

 //private void GetLongLat(float jing, float wei, out float Long, float lat)
 //{
 //}
 private void GotoXY_Load(object sender, EventArgs e)
 {
     activeview = pAxMapControl.Map as IActiveView;
     map = activeview.FocusMap;
     pScreenDisplay = activeview.ScreenDisplay;
     pGraphicsContainer = map as IGraphicsContainer;
     IGraphicsContainerSelect pGraphconSel = map as IGraphicsContainerSelect;
 }
开发者ID:hijushen,项目名称:WindowDemo,代码行数:11,代码来源:GotoXY.cs

示例7: ConvertPixelsToMapUnits

 //ת�����ص���ͼ��λ
 public double ConvertPixelsToMapUnits(IActiveView activeView, double pixelUnits)
 {
     double realDisplayExtent;
     int pixelExtent;
     double sizeOfOnePixel;
     pixelExtent = activeView.ScreenDisplay.DisplayTransformation.get_DeviceFrame().right - activeView.ScreenDisplay.DisplayTransformation.get_DeviceFrame().left;
     realDisplayExtent = activeView.ScreenDisplay.DisplayTransformation.VisibleBounds.Width;
     sizeOfOnePixel = realDisplayExtent / pixelExtent;
     return pixelUnits * sizeOfOnePixel;
 }
开发者ID:ismethr,项目名称:gas-geological-map,代码行数:11,代码来源:AddDongshi.cs

示例8: TileCache

 public TileCache(IActiveView view)
 {
     InitializeComponent();
     this.view = view;
     var tiles = Enum.GetValues(typeof(DownloadTileLayer));
     foreach (var t in tiles)
     {
         comboBox1.Items.Add(t.ToString());
     }
 }
开发者ID:betasyispretty,项目名称:PcArcBruTile,代码行数:10,代码来源:TileCache.cs

示例9: addFeatureClassToMap

        /// <summary> Add feature class to active View and then zoom to its extend </summary>
        /// <param name="view">the current active view</param>
        /// <param name="inFeatureClass">the feature class to add</param>
        /// <param name="zoomTo">zoom to loaded feature class</param>
        /// <returns>the created layer</returns>
        public static IFeatureLayer addFeatureClassToMap(IActiveView view, IFeatureClass inFeatureClass, bool zoomTo = false)
        {
            IFeatureLayer featureLayer = new FeatureLayerClass();
            featureLayer.FeatureClass = inFeatureClass;
            featureLayer.Name = inFeatureClass.AliasName;
            featureLayer.Visible = true;
            view.FocusMap.AddLayer(featureLayer);

            if(zoomTo) view.Extent = featureLayer.AreaOfInterest;

            return featureLayer;
        }
开发者ID:geopunt,项目名称:geopunt4arcgis,代码行数:17,代码来源:geopuntHelper.cs

示例10: GetMapUnit

 public static double GetMapUnit(IActiveView activeView)
 {
     IDisplayTransformation DisplayTransformation = activeView.ScreenDisplay.DisplayTransformation;
     IPoint Point1 = DisplayTransformation.VisibleBounds.UpperLeft;
     IPoint Point2 = DisplayTransformation.VisibleBounds.UpperRight;
     int x1, x2, y1, y2;
     DisplayTransformation.FromMapPoint(Point1, out x1, out y1);
     DisplayTransformation.FromMapPoint(Point2, out x2, out y2);
     double pixelExtent = x2 - x1;
     double realWorldDisplayExtent = DisplayTransformation.VisibleBounds.Width;
     return realWorldDisplayExtent / pixelExtent;
 }
开发者ID:weepingdog,项目名称:VerticesToCenter,代码行数:12,代码来源:FunctionCommon.cs

示例11: DisplayFlowDirections

 public DisplayFlowDirections(IMap map, IActiveView actView)
 {
     if (map != null)
     {
         this._map = map;
         _activeView = actView;
         _primaryLyr = DisplayMap.GetMapLayerByLayerName(map, "PrimaryConductor", LayerType.FeatureLayer) as IFeatureLayer;
         _secondaryLyr = DisplayMap.GetMapLayerByLayerName(map, "SecondaryConductor", LayerType.FeatureLayer) as IFeatureLayer;
         //this.UpdateActiveViewEvents(actView);
         //((IMapControlEvents2_Event)mapControl).OnMapReplaced += new IMapControlEvents2_OnMapReplacedEventHandler(SourceTab_OnMapReplaced);
     }
 }
开发者ID:Ramakrishnapv,项目名称:FuturaNetwork,代码行数:12,代码来源:DisplayFlowDirections.cs

示例12: SymbolizationByLayerPropPage

        public SymbolizationByLayerPropPage(MyPluginEngine.IApplication hook)
        {
            InitializeComponent();
            //禁用Glass主题
            this.EnableGlass = false;
            //不显示最大化最小化按钮
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            //
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
            //去除图标
            this.ShowIcon = false;

            m_activeView = hook.MapControl.ActiveView;
            m_map = hook.MapControl.Map;
            m_mapControl = hook.MapControl;
            m_TOCControl = hook.TOCControl;

            //if (m_hookHelper.Hook is IToolbarControl)
            //{
            //    IToolbarControl toolbarControl = m_hookHelper.Hook as IToolbarControl;
            //    m_mapControl = (IMapControl3)toolbarControl.Buddy;
            //}
            //if (m_hookHelper.Hook is IMapControl3)
            //{
            //    m_mapControl = m_hookHelper.Hook as IMapControl3;
            //}
        }
开发者ID:xueqiyong,项目名称:MyPluginEngine,代码行数:28,代码来源:SymbolizationByLayerPropPage.cs

示例13: MainForm

 public MainForm()
 {
     InitializeComponent();
     m_ipActiveView = axMapControl1.ActiveView;
     m_ipMap = m_ipActiveView.FocusMap;
     clicked = false;
     pGC = m_ipMap as IGraphicsContainer;
 }
开发者ID:Krystal001025,项目名称:temp,代码行数:8,代码来源:MainForm.cs

示例14: reverseZoekForm

        public reverseZoekForm()
        {
            view = ArcMap.Document.ActiveView;
            map = view.FocusMap;

            gpExtension = geopunt4arcgisExtension.getGeopuntExtension();
            reverseFC = gpExtension.reverseLayer;
            adresLocation = new dataHandler.adresLocation(adresCallback, timeout: gpExtension.timeout);

            InitializeComponent();
        }
开发者ID:geopunt,项目名称:geopunt4arcgis,代码行数:11,代码来源:reverseZoekForm.cs

示例15: ToolLib

 public ToolLib(frmMain frmMian)
 {
     m_frmMian = frmMian;
     m_mapControl = frmMian.MapControl;
     m_pageLayoutControl = frmMian.PageLayoutControl;
     m_sceneControl = frmMian.SceneControl;
     m_workSpace = frmMian.WorkSpace;
     m_gcon = frmMian.Gcon;
     m_connStr = frmMian.ConnectionString;
     m_statusBar = frmMian.StatusBar;
     m_activeView = frmMian.MapControl.ActiveView;
 }
开发者ID:chinasio,项目名称:minegis,代码行数:12,代码来源:ToolLib.cs


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