本文整理汇总了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.
}
示例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();
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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());
}
}
示例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;
}
示例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;
}
示例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);
}
}
示例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;
//}
}
示例13: MainForm
public MainForm()
{
InitializeComponent();
m_ipActiveView = axMapControl1.ActiveView;
m_ipMap = m_ipActiveView.FocusMap;
clicked = false;
pGC = m_ipMap as IGraphicsContainer;
}
示例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();
}
示例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;
}