Developing GIS Applications with Arc Objects using C
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET GIS 应 用 开 发 Developing GIS Applications with Arc. Objects using C#. NET 江西省研究生优质课程 主讲:兰小机 GIS博士、教授 Email : landcom 8835@163. com QQ : 305333315 课件: ftp: //218. 87. 136. 94/
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 教材及参考材料 l 教材: 1. 《基于Arc. Objects与C#. NET的GIS应用开发》,兰小 机等编著,冶金 业出版社,2011年 12月 2. 最新课件 l 参考材料: 1. Arc. Objects SDK 10 Microsoft . NET Framework 2. http: //resources. arcgis. com/ 3. http: //help. arcgis. com/zhcn/arcgisdesktop/10. 0/help/ 4. Arc. GIS 开发 具包中的文档,包括Arc. GIS开发帮助、 组件帮助、对象模型图和示例
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET Chap. 3 使用控件编程 (6学时) l 为了能够快速建构一个具有GIS功能的独立应用程序, Arc. GIS Engine为开发者提供了多个可视化的组件--控 件,如 License. Control 、Map. Control、 Page. Layout. Control、TOCControl、Toolbar. Control和 Symbology. Control等。 l 在VS. NET中使用Arc. Objects,需要使用ESRI interop程 序集,这些程序集在托管的. NET代码和非托管的COM代 码之间起了桥梁作用。 l ESRI interop程序集为Arc. GIS控件提供了能够位于. NET 窗体上的控件,这些控件名前缀为“Ax”,如 Ax. Map. Control、Ax. Page. Layout. Control、 Ax. TOCControl和Ax. Toolbar. Control.
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET ØUsing the Winforms Arc. GIS Engine controls ØUsing Arc. GIS Engine Controls in WPF
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 本章内容: 1. Map. Control控件 2. Page. Layout. Control控件 3. TOCControl控件 4. Toolbar. Control及相关对象 5. Control Commands (Symbology. Control in Chapter 6) 6. 在WPF程序中使用Arc. GIS Engine控 件
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l Map. Control实现的主要接口有: ØIMap. Control. Default ØIMap. Control 2 Ø IMap. Control 3 ØIMap. Control 4( new in 9. 2 ) ØIMap. Control. Events 2事件接口 ØITOCBuddy ØIToolbar. Buddy
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 1. 1. 3 IMap. Control 3与IMap. Control 4 l IMap. Control 3接口继承IMap. Control 2,并增加了以下8个 属性和一个方法: Ø Custom. Property:使用该属性关联有用信息 Ø Document. Filename:返回Map. Control装入的地图文档的文件名 Ø Document. Map:返回Map. Control最后装入的地图(Map)名称 Ø Key. Intercept:返回或设置Map. Control截取键盘按键信息 Ø Object:返回潜在的Map. Control控件 • When querying interface to IMap. Control 2 in Visual Basic. NET or Visual C#. NET the Object property or container specific code must be used. This is because. NET contains the real control inside a wrapper object known as an host.
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET Ø Show. Map. Tips:确定是否显示地图的Map Tips Ø Tip. Delay:设置Map Tips的延迟时间 Ø Tip. Style:设置Map Tips的显示样式 Ø Suppress. Resize. Drawing ():在控件尺寸发生变化过 程中,阻止数据实时重绘 l 与IMap. Control 3相比,IMap. Control 4多了以下两 个可读写属性: Ø public bool Auto. Keyboard. Scrolling {get; set; }: Indicates whether keyboard scrolling is enabled. Ø public bool Auto. Mouse. Wheel {get; set; }: Indicates whether the mouse wheel is enabled.
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 引用控件本身 l 当使用IMap. Control 2接口时: IMap. Control 2 p. Map. Control = ax. Map. Control 1. Object as IMap. Control 2; 或IMap. Control 2 p. Map. Control = ax. Map. Control 1. Get. Ocx() as IMap. Control 2; l 当使用IMap. Control 3接口时: IMap. Control 3 p. Map. Control = ax. Map. Control 1. Object as IMap. Control 3; 或IMap. Control 3 p. Map. Control = ax. Map. Control 1. Get. Ocx() as IMap. Control 3;
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l 当使用IMap. Control 4接口时: IMap. Control 4 p. Map. Control; p. Map. Control = ax. Map. Control 1. Object as IMap. Control 4; 或 p. Map. Control = ax. Map. Control 1. Get. Ocx() as IMap. Control 4;
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 使用箭��、鼠�����地��航 l 使用箭头键平移(Panning)地图 ax. Map. Control 1. Key. Intercept = (int) esri. Key. Intercept. Arrow. Keys; ax. Map. Control 1. Auto. Keyboard. Scrolling=true; l 使用鼠标滚轮缩放地图 ax. Map. Control 1. Auto. Mouse. Wheel = true;
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET ax. Map. Control 1. Key. Intercept = (int) esri. Key. Intercept. Arrow. Keys; Auto. Keyboard. Scrolling=true; Constant esri. Key. Intercept. None Value 0 esri. Key. Intercept. Arrow. Ke 1 ys esri. Key. Intercept. Alt 2 esri. Key. Intercept. Tab 4 esri. Key. Intercept. Enter 8 Description No keys are intercepted. Intercepts the arrow keys, normally handled by the container to change control focus. Intercepts the Alt key, normally handled by a container to change focus. Intercepts the Tab key, normally handled by the container to change control focus. Intercepts the Enter key,
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l Generally there is no need to explicitly set event handlers, as most development environments will automatically provide event handlers.
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 1. 1. 5 ITOCBuddy l 该接口定义了以下2个方法: ØGet. Active. View Returns the underlying object implementing basic map and Active. View. This is used to populate the TOC. ØGet. Scale Returns the scale of the supplied Basic. Map, this allows for objects that do not support IMap.
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 1. 1. 6 IToolbar. Buddy l Objects that implement the IToolbar. Buddy interface can be passed to the IToolbar. Control: : Set. Buddy. Control method. l The Current. Tool is the tool used to interact with the display area of the IToolbar. Control: : Buddy.
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l Samples: 1. Map. Control. Map. Tips 2. Map. Control. Geo. Events 3. Map. Control. Draw. Text 4. Map. Control. CADViewer 5. Map. Control. Save. Layer. File
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 下面是一个载入文档的例子-- ax. Map. Control 1. Load. Mx. File private void Load. Map. Document() { System. Windows. Forms. Open. File. Dialog open. File. Dialog 2; open. File. Dialog 2 = new Open. File. Dialog(); open. File. Dialog 2. Title = "Open Map Document"; open. File. Dialog 2. Filter = "Map Documents (*. mxd)|*. mxd"; open. File. Dialog 2. Show. Dialog(); string s. File. Path = open. File. Dialog 2. File. Name; if (ax. Map. Control 1. Check. Mx. File(s. File. Path)) {ax. Map. Control 1. Load. Mx. File(s. File. Path, 0, Type. Missing); } else {Message. Box. Show(s. File. Path + " is not a valid Arc. Map document"); return; }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET IMx. Document 与IMap. Document
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET IApplication的属性、方法
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l IMx. Document. Activated. View Ø In Arc. Map's layout view, graphics can either be added to the Page. Layout's graphics container or the focus Map's graphics container if the Map has been activated by double-clicking on it. In this case, IMx. Document: : Active. View differs from IMx. Document: : Activated. View in that the Active. View property may pass a reference to the Page. Layout object while the Activated. View property may pass a reference to the focus Map object if that Map has been activated. Ø In data view, both Active. View and Activated. View return a reference to the focus Map.
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET IMap. Document m_Map. Document = new Map. Document. Class(); private void Load. Map. Doc() { Open. File. Dialog open. File. Dialog 2 = new Open. File. Dialog(); open. File. Dialog 2. Title = "Open Map Document"; open. File. Dialog 2. Filter = "Map Documents (*. mxd)|*. mxd"; open. File. Dialog 2. Show. Dialog(); string s. File. Path = open. File. Dialog 2. File. Name; If(m_Map. Document. Is. Map. Document(s. File. Path)) { m_Map. Document. Open(s. File. Path, ""); ax. Map. Control 1. Map = m_Map. Document. get_Map(0); ax. Map. Control 1. Refresh(); } }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET private void Save. Document() { if (m_Map. Document. get_Is. Read. Only(m_Map. Docum ent. Document. Filename) == true) { Message. Box. Show("This map document is read only!"); return; } m_Map. Document. Save(m_Map. Document. Uses. Relative. Path s, true); Message. Box. Show("Changes saved successfully!");
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 使用鼠标拖曳确定地图显示的范围(拉框放大) private void ax. Map. Control 1_On. Mouse. Down (object sender, ESRI. Arc. GIS. Map. Control. IMap. Control. Events 2_On Mouse. Down. Event e) { //改变地图控件显示范围为当前拖曳的区域 ax. Map. Control 1. Extent = ax. Map. Control 1. Track. Rectangle(); //刷新地图 public void Refresh ( ax. Map. Control 1. Refresh(esri. View. Draw. Phase phase, View. Geography, null); object layer. Or. Element, } object envelope );
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 移动、旋转地图 l 在 Map. Control中有一种更简单便利的方法 pan()来移动其中的地图,还可使用 Rotation属性设置地图的旋转角度。 l 下面的方法使用在Map. Control控件的 On. Mose. Down事件中: ax. Map. Control 1. pan(); ax. Map. Control 1. Rotation = 45;
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET private void ax. Map. Control 1_On. Mouse. Down (object sender, ESRI. Arc. GIS. Map. Control. IMap. Control. Events 2_On Mouse. Down. Event e) { //产生拖曳多边形,并绘制 IGeometry p. Geom = ax. Map. Control 1. Track. Polygon(); Draw. Map. Shape(p. Geom); //刷新地图 //ax. Map. Control 1. Refresh(esri. View. Draw. Phase. esri View. Geography, null);
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET private void Draw. Map. Shape (IGeometry p. Geom) { IRgb. Color p. Color; p. Color = new Rgb. Color. Class(); p. Color. Red = 220; p. Color. Green = 112; p. Color. Blue = 60; public void Draw. Shape ( IGeometry Shape, ref object symbol ); //新建一个绘制图形的填充符号 ISimple. Fill. Symbol p. Fillsyl; p. Fillsyl = new Simple. Fill. Symbol. Class(); p. Fillsyl. Color = p. Color; object o. Fillsyl = p. Fillsyl; ax. Map. Control 1. Draw. Shape(p. Geom, ref o. Fillsyl); }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET private void ax. Map. Control 1_On. Mouse. Down(object sender, IMap. Control. Events 2_On. Mouse. Down. Event e) { //产生拖曳多边形 IGeometry p. Geom = ax. Map. Control 1. Track. Polygon(); ax. Map. Control 1. Map. Select. By. Shape(p. Geom, null, false); ax. Map. Control 1. Refresh(esri. View. Draw. Phase. esri. View. Geo. Selection, null);
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l 清除选择集的方法 ax. Map. Control 1. Map. Clearselection(); ax. Map. Control 1. Active. View. Refresh();
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 1. 5 实现鹰眼功能
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 两个控件的数据共享 private void ax. Map. Control 1_On. Map. Replaced (object sender, IMap. Control. Events 2_On. Map. Replaced. Event e) { IMap p. Map; p. Map = ax. Map. Control 1. Map; int i ; for( i = 0; i<= p. Map. Layer. Count - 1; i++) { ax. Map. Control 2. Map. Add. Layer(p. Map. get_Layer(i)); }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 绘制鹰眼控件中的显示方框 l 主窗体视图的范围发生变化后,会触发控件的 On. Extent. Undated事件,绘制方框的方法就在这 个事件中进行: Ø private void ax. Map. Control 1_On. Extent. Updated(object sender, IMap. Control. Events 2_On. Extent. Updated. Event e) { ……. }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET �建数据���面
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l Page. Layout. Control控件同样实现了多个接口 Ø IPage. Layout. Control. Default Ø IPage. Layout. Control 2 Ø IPage. Layout. Control 3 (New in 9. 2) Ø IPage. Layout. Control. Events
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET IPage. Layout. Control 3
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l Samples: 1. Page. Layout. Control. Load. Map. Document 2. Page. Layout. Control. Copy. Focus. Map 3. Page. Layout. Control. Overview 4. Page. Layout. Control. Page. Appearance 5. Page. Layout. Control. Print. Preview 6. Page. Layout. Control. Printing
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 2. 1 Page. Layout. Control操作 MXD文 件 l 在Ax. Page. Layout. Control控件对MXD文件 的操作,与Map. Control类似。 Ø public void Load. Mx. File ( string file. Name, object password );
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 下面是在Page. Layout控件中打开一个MXD文件的方法: private void Open. Map. Document() { IMap. Document m_Map. Document = new Map. Document. Class(); Open. File. Dialog open. File. Dialog 1 = new Open. File. Dialog(); open. File. Dialog 1. Title = "Open Map Document"; open. File. Dialog 1. Filter = "Map Documents (*. mxd)|*. mxd"; open. File. Dialog 1. Show. Dialog(); string s. File. Path = open. File. Dialog 1. File. Name; m_Map. Document. Open(s. File. Path, ""); ax. Page. Layout. Control 1. Page. Layout = m_Map. Document. Page. Layout; ax. Page. Layout. Control 1. Refresh(); }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET private void Save. Document() { //Check that the document is not read only. if (m_Map. Document. get_Is. Read. Only(m_Map. Document. Docume nt. Filename) == true) { Message. Box. Show("This map document is read only!"); return; } //Save with the current relative path setting. m_Map. Document. Save(m_Map. Document. Uses. Relative. Paths, true); Message. Box. Show("Changes saved successfully!"); }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET private void cmd. Save. As_Click(object sender, System. Event. Args e) { //Open a file dialog for saving map documents. save. File. Dialog 1. Title = "Save Map Document As"; save. File. Dialog 1. Filter = "Map Documents (*. mxd)|*. mxd"; save. File. Dialog 1. Show. Dialog(); string s. File. Path = save. File. Dialog 1. File. Name; if (s. File. Path == “”) return; if (s. File. Path == m_Map. Document. Filename) { //Save changes to the current document. Save. Document(); } else { //Save. As a new document with relative paths. m_Map. Document. Save. As(s. File. Path, true); //Open the document. Open. Document((s. File. Path)); Message. Box. Show("Document saved successfully!"); }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 3 TOCControl控件 1. TOCControl控件概述 ① ITOCControl与ITOCControl 2 ② ITOCControl. Events 2. 应用开发实例
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 3. 1 TOCControl控件概述 l TOCControl要与一个“伙伴控件” 协同 作。 Ø “伙伴控件”可以是Map. Control、 Page. Layout. Control、Scene. Control或 Globe. Control。 Ø “伙伴控件”可以在设计时通过TOCControl 属性页设置或用Set. Buddy. Control方法通过 编程设置。
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 3. 1. 1 ITOCControl与ITOCControl 2 l ITOCControl接口是任何与TOCControl 有关的任务的出发点,如设置控件的外观, 设置伙伴控件,管理图层的可见性和标签 的编辑。
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET ITOCControl
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l When querying interface to ITOCControl in Visual Basic. NET or Visual C#. NET the Object property or container specific code must be used. This is because. NET contains the real control inside a wrapper object known as an host. ITOCControl 2 p. TOCControl; p. TOCControl = ax. TOCControl 1. Object as ITOCControl 2; 或 p. TOCControl = ax. TOCControl 1. Get. Ocx() as ITOCControl 2;
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l public void Hit. Test (int X, int Y, ref esri. TOCControl. Item. Type, ref IBasic. Map, ref ILayer, ref object Unk, ref object Data ); Ø Item. Type specifies an enumeration indicating the type of item (none, map, layer, heading or legend class). Ø Basic. Map specifies an IMap object. Ø Layer specifies an ILayer object. Ø Unk specifies an ILegend. Group object. Ø Data specifies a long indicating the index of the legend class within the legend group. Use this index in conjunction with the legend group to
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET IBasic. Map map = new Map. Class(); ILayer layer = new Feature. Layer. Class(); object other = new object(); object index = new object(); esri. TOCControl. Item item = new esri. TOCControl. Item(); //Determine what kind of item has been clicked on ax. TOCControl 1. Hit. Test(e. x, e. y, ref item, ref map, ref layer, ref other, ref index); if (e. button == 1) { if (layer == null) return; IFeature. Layer feature. Layer = layer as IFeature. Layer; if (feature. Layer == null) return; IGeo. Feature. Layer geo. Feature. Layer = (IGeo. Feature. Layer) feature. Layer;
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET ILegend. Class legend. Class = new Legend. Class(); ISymbol symbol = null; if (other is ILegend. Group && (int)index != -1) { legend. Class = ((ILegend. Group)other). get_Class((int)index); symbol = legend. Class. Symbol; } if (symbol == null) return; symbol = Get. Symbol. By. Symbol. Selector(symbol); if (symbol == null) return; legend. Class. Symbol = symbol; this. Activate(); ax. Map. Control 1. Active. View. Contents. Changed(); ax. Map. Control 1. Refresh(esri. View. Draw. Phase. esri. View. Geograph y, null); ax. TOCControl 1. Update(); }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET ITOCControl 2 (New in 9. 2) l 与ITOCControl相比,ITOCControl 2多了以下1 个属性和2个方法: Ø public bool Enable. Layer. Drag. Drop {get; set; } : Indicates if layers can be dragged and dropped in the control. Ø public void Get. Selected. Item (ref esri. TOCControl. Item. Type, ref IBasic. Map, ref ILayer, ref object Unk, ref object Data ):Returns the selected item in the TOCControl. Ø public void Select. Item (object Unk, object Data ):
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l //Selecting the focus map Ø ax. TOCControl 1. Select. Item( ax. TOCControl 1. Active. View. Focus. Map); l //Selecting a layer in the focus map Ø ax. TOCControl 1. Select. Item (ax. TOCControl 1. Active. View. Focus. Map. get_Layer(0)); l //To select an item within a Legend. Group Ø ILayer layer = ax. TOCControl 1. Active. View. Focus. Map. get_Layer(0); Ø ILegend. Info legend. Info = (ILegend. Info) layer; Ø ILegend. Group legend. Group = legend. Info. get_Legend. Group(0); Ø //Select a heading • ax. TOCControl 1. Select. Item (legend. Group); Ø //Select a legend class
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 3. 1. 2 ITOCControl. Events l ITOCControl. Events是一个事件接口,它 定义了 TOCControl能够处理的全部事件, 如On. Mouse. Down、On. Mouse. Move、 On. Mouse. Up、On. Double. Click、 On. Begin. Label. Edit、On. End. Label. Edit、 On. Key. Down、On. Key. Up。
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l private void ax. TOCControl 1_On. Begin. Label. Edit (object sender, ITOCControl. Events_On. Begin. Label. Edit. Event e) { ………… m_TOCControl. Hit. Test(e. x, e. y, ref item, ref map, ref layer, ref other, ref index); //已在其它地方(如窗体 的Load事件中)声明为ITOCControl类型的变量,并 已实例化 if (item !=
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l private void ax. TOCControl 1_On. End. Label. Edit(object sender, ITOCControl. Events_On. End. Label. Edit. E vent e) { //Prevent empty labels if (e. new. Label. Trim() == "") { e. can. Edit = false; } }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l Samples 1. TOCControl. Context. Menu 2. TOCControl. Layer. Drag. Drop 3. TOCControl. Metadata. Viewer
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l 当右�点�地�� , �出 l 当右�点���� , �出
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET private void Main. Form_Load(object sender, Event. Args e) Ø定�地�右�菜�、��右�菜� private void ax. TOCControl 1_On. Mouse. Down(object sender, ITOCControl. Events_On. Mouse. Down. Event e) Ø根据右�点�的�象,�出相�的右�菜�
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET IToolbar. Menu m_Toc. Layer. Menu = new Toolbar. Menu. Class(); IToolbar. Menu m_Toc. Map. Menu = new Toolbar. Menu. Class(); private void Main. Form_Load(object sender, Event. Args e) {…… //TOCControl��右�菜� m_Toc. Layer. Menu. Add. Item(new Open. Attribute. Table. Cmd(), 0, 0, false, esri. Command. Styles. esri. Command. Style. Icon. And. Text ); m_Toc. Layer. Menu. Add. Item(new Remove. Layer. Cmd(), 0, 1, false, esri. Command. Styles. esri. Command. Style. Icon. And. Text
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET m_Toc. Layer. Menu. Add. Item(new Scale. Thresholds(), 3, 4, false, esri. Command. Styles. esri. Command. Style. Text. Only); m_Toc. Layer. Menu. Add. Item(new Layer. Selectable(), 1, 5, true, esri. Command. Styles. esri. Command. Style. Text. Only); m_Toc. Layer. Menu. Add. Item(new Layer. Selectable(), 2, 6, false, esri. Command. Styles. esri. Command. Style. Text. Only); m_Toc. Layer. Menu. Add. Item(new Zoom. To. Layer. Cmd(), 0, 7, true, esri. Command. Styles. esri. Command. Style. Icon. And. Te xt); m_Toc. Layer. Menu. Add. Item(new
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l private void ax. TOCControl 1_On. Mouse. Down (object sender, ITOCControl. Events_On. Mouse. Down. Event e) { …… ax. TOCControl 1. Hit. Test(e. x, e. y, ref item, ref map, ref layer, ref other, ref index); if (e. button == 2) { if (item == esri. TOCControl. Item. Map) { m_map. Control. Custom. Property = map; m_Toc. Map. Menu. Popup. Menu (e. x, e. y, ax. TOCControl 1. h. Wnd); } else if (layer is IFeature. Layer) { m_map. Control. Custom. Property = layer; m_Toc. Layer. Menu. Popup. Menu (e. x, e. y, ax. TOCControl 1. h. Wnd); } }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l public sealed class Open. Attribute. Table. Cmd : Base. Command {…… public override void On. Click() { IMap map = null; if (m_hook. Helper. Hook is IMap. Control 3) { m_mapcontrol = m_hook. Helper. Hook as IMap. Control 3; current. Layer = m_mapcontrol. Custom. Property as IFeature. Layer; if (current. Layer == null) return; map = m_mapcontrol. Map; } if (map == null) return; Layer. Attributes layer. Attribute. Table = new Layer. Attributes (map, current. Layer); layer. Attribute. Table. Show(m_hook. Helper as System. Windows. Forms. IWin 32 Window); }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l public partial class Layer. Attributes : Form {…… Data. Set m_layer. Data. Set = new Data. Set (m_data. Set. Name); private System. Windows. Forms. Data. Grid. View data. Grid. View 1; public Layer. Attributes (IMap map, IFeature. Layer feature. Layer) { Initialize. Component(); m_map = map; m_active. View = map as IActive. View;
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l private void Attributes. Form_Load(object sender, Event. Args e) { this. Text = current. Layer. Name + " 属性表"; int row. Count = Construct. Data. Set (current. Layer); data. Grid. View 1. Data. Source = m_layer. Data. Set; data. Grid. View 1. Data. Member = current. Layer. Name; tool. Strip. Status. Label 1. Text = "����数: "; tool. Strip. Status. Label 2. Text = "���数: " + current. Layer. Feature. Class. Feature. Count(null). To. S tring();
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l private int Construct. Data. Set(IFeature. Layer p. Feat. Lyr) { ILayer. Fields p. Featlyr. Fields = p. Feat. Lyr as ILayer. Fields; IFeature. Class p. Feat. Cls = p. Feat. Lyr. Feature. Class; int rows = 0; if (m_layer. Data. Set. Tables[p. Feat. Lyr. Name] == null) { Data. Table p. Table = new Data. Table(p. Feat. Lyr. Name); Data. Column p. Table. Col; for (int i = 0; i <= p. Featlyr. Fields. Field. Count - 1; i++) { p. Table. Col = new Data. Column(p. Featlyr. Fields. get_Field(i). Alias. Name); p. Table. Columns. Add(p. Table. Col); p. Table. Col = null; }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET IFeature. Cursor features = p. Feat. Lyr. Search(null, false); IFeature feature = features. Next. Feature(); while (feature != null) { Data. Row p. Table. Row = p. Table. New. Row(); for (int i = 0; i <= p. Featlyr. Fields. Field. Count - 1; i++) { if (p. Featlyr. Fields. Find. Field(p. Feat. Cls. Shape. Field. Name) == i) { p. Table. Row[i] = p. Feat. Cls. Shape. Type; } else { p. Table. Row[i] = feature. get_Value(i); } p. Table. Rows. Add(p. Table. Row); feature = features. Next. Feature(); } rows = p. Table. Rows. Count; m_layer. Data. Set. Tables. Add(p. Table); } return rows; }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 4 Toolbar. Control及相关对象 1. Toolbar. Control控件 2. Toolbar. Control上的命令 3. Toolbar. Item 4. 更新命令 5. Toolbar. Menu 组件类 6. Toolbar. Palette 7. Command. Pool 8. 操作栈(Operation. Stack) 9. 定制
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l Toolbar. Control主要接口有: Ø Ø IToolbar. Control 2 IToolbar. Control. Default IToolbar. Control. Events (default)
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 4. 1. 1 IToolbar. Control与 IToolbar. Control 2 l IToolbar. Control接口是任何与Toolbar. Control有关的任 务的出发点,如设置控件的外观,设置伙伴控件,添加或 去除命令、 具、菜单,定制Toolbar. Control的内容。 l IToolbar. Control接口提供的主要属性 Ø Buddy、Command. Pool、Current. Tool、Customize、 Custom. Property、Enabled、Object、Operation. Stack 、 Tool. Tips、Text. Alignment、Update. Interval等。 l IToolbar. Control接口提供的主要方法 Ø Add. Item、Add. Menu. Item、Add. Toolbar. Def、Find、Get. Item、 Get. Item. Rect、Hit. Test、Move. Item、Remove. All、 Set. Buddy. Control、Update等。
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET IToolbar. Control 2 (New in 9. 2) l 与IToolbar. Control相比, IToolbar. Control 2增加了以下: 1. public bool Align. Left {get; set; } 2. public uint Back. Color {get; set; } 3. public uint Fade. Color {get; set; } 4. public esri. Toolbar. Fill. Direction {get; set; } 5. public int Icon. Size {get; set; } 6. public void Load. Items ( IStream p. Stream ); 7. public esri. Toolbar. Orientation {get; set; } 8. public void Save. Items ( IStream p. Stream ); 9. public bool Show. Hidden. Items {get; set; } 10. public bool Themed. Drawing {get; set; } 11. public bool Transparent {get; set; }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 4. 1. 2 IToolbar. Control. Default l 在绝大多数开发环境中,在容器(窗体)中放置 Toolbar. Control控件,将产生一个名叫 ax. Toolbar. Control 1的对象,这个对象上直接可用的属 性和方法对应于IToolbar. Control. Default接口上的属性 和方法,加上容器特有的属性和方法。 l IToolbar. Control. Default接口的属性和方法,与 Toolbar. Control的最高编号主接口的属性、方法相同。 例如,目前版本中,IToolbar. Control. Default等同于 IToolbar. Control 2,但在未来的版本中,将变为 IToolbar. Control 3。在软件开发中,使用 IToolbar. Control. Default接口,能够保证总是访问最新 版本的Toolbar. Control。
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 4. 1. 3 IToolbar. Control. Events l IToolbar. Control. Events是一个事件接口, 它定义了 Toolbar. Control能够处理的全 部事件,如On. Double. Click、 On. Item. Click、On. Key. Down、On. Key. Up、 On. Mouse. Down、On. Mouse. Move、 On. Mouse. Up。
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l设计时,可以通过Toolbar. Control 的属性对话框 将命令项添加到Toolbar. Control 上。 l可以用三种方法将命令添加到Toolbar. Control中 Ø 使用UID对象(使用GUID) Ø 使用prog. ID Ø 给Add. Item方法提供某个现有命令的一个实例。 Constant Value Description public int Add. Item ( esri. Command. Style. Text. Only 0 Display text only. object item, esri. Command. Style. Icon. Only 1 Display icon only. int Sub. Type, esri. Command. Style. Icon. And. Text 2 Display icon and int index, text. bool begin. Group, esri. Command. Style. Menu. Bar 4 Display bar as main menu. int Group. Spacing, esri. Command. Styles Style );
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET //Adding a command by UID u. ID = new UIDClass(); u. ID. Value = "esri. Controls. Map. Full. Extent. Command"; ax. Toolbar. Control 1. Add. Item( u. ID, -1, false, 0, esri. Command. Styles. esri. Command. Style. Icon. Only); //Adding a command by Prog. ID string prog. ID = "esri. Controls. Map. Full. Extent. Command"; ax. Toolbar. Control 1. Add. Item( prog. ID, -1, false, 0, esri. Command. Styles. esri. Command. Style. Icon. Only); //Adding a command by ICommand command = new Controls. Map. Full. Extent. Command. Class(); ax. Toolbar. Control 1. Add. Item( command, -1, false, 0,
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l Toolbar. Menu的主要接口 有:IToolbar. Menu、 IToolbar. Menu 2 。
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l IToolbar. Menu 2
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 4. 6 Toolbar. Palette l A Toolbar. Palette supplies the implementation of a palette item that can host commands and tools. A Toolbar. Palette cannot host Tool. Control, Toolbar. Menu or Multi. Item objects. A Toolbar. Palette can either be hosted on the Toolbar. Control or can appear as a popup palette.
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET Ø //Create a Toolbar. Palette • m_Toolbar. Palette = new Toolbar. Palette. Class(); Ø //Add new items to the Toolbar. Palette • m_Toolbar. Palette. Add. Item("esri. Controls. Select. Tool", 0, 1); • m_Toolbar. Palette. Add. Item("esri. Controls. New. Circle. Tool", 0, -1); • m_Toolbar. Palette. Add. Item("esri. Controls. New. Curve. Tool ", 0, -1); • m_Toolbar. Palette. Add. Item("esri. Controls. New. Ellipse. Tool ", 0, -1); • m_Toolbar. Palette. Add. Item("esri. Controls. New. Line. Tool", 0, -1); • m_Toolbar. Palette. Add. Item("esri. Controls. New. Polygon. To ol", 0, -1); • m_Toolbar. Palette. Add. Item("esri. Controls. New. Rectangle. T ool", 0, -1); • m_Toolbar. Palette. Add. Item("esri. Controls. New. Free. Hand. T
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 4. 8 操作栈(Operation. Stack) l Toolbar. Control有一个操作栈( Operation. Stack ),用于管理“撒消 (undo)”和“重做(redo)”功能。 l Operations are added to the operation stack by each Toolbar. Item’s underlying command, so that the operation can be rolled forward, then rolled back as needed.
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l Whether or not a command makes use of an Operation. Stack depends upon its implementation. Typically, as a developer, you create a single Controls. Operation. Stack for an application and set it onto each Toolbar. Control. Undo and Redo commands can be added to the Toolbar. Control that step through the Operation. Stack. Extent changes in an Active. View are added to the IActive. View. Extent. Stack and not an Operation. Stack.
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET Customize. Dialog l Customize. Dialog包含一个无模态对话 框,允许程序运行时将 commands, toolbar definitions (toolsets) 和 menu definitions 添加到 Toolbar. Control 上,当 IToolbar. Control: : Customize 设置为 true时。
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l Customize. Dialog的主要接口为:ICustomize. Dialog 和事件接口ICustomize. Dialog. Events。 l ICustomize. Dialog接口的属性 Ø Dialog. Title、Is. Dialog. Active、 Double. Click. Destination、Commands. Category、 Menus. Category、Toolbars. Category、 Show. Add. From. File。 l ICustomize. Dialog接口的方法 Ø Start. Dialog 、Close. Dialog、 Set. Double. Click. Destination。 l ICustomize. Dialog. Events 接口成员:On. Start. Dialog 、 On. Close. Dialog.
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 开发实例 l 首先声明一个ICustomize. Dialog类型的全局变量 m_Customize. Dialog,并实例化,代码如下: private ICustomize. Dialog m_Customize. Dialog = new Customize. Dialog. Class(); l 接着,声明如下两个事件变量: private ICustomize. Dialog. Events_On. Start. Dialog. Event. Han dler start. Dialog. E; private ICustomize. Dialog. Events_On. Close. Dialog. Event. Ha
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l COM事件转换为. NET 事件: Ø为每个事件产生一个代理( delegate ) • 命名:事件接口+_+事件名+ Event. Handler • 例如: IActive. View. Events_Selection. Changed. Event. Han dler Ø创建一个. NET事件接口 • 命名:事件接口+ _ + Event • 例如: IActive. View. Events_Event
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l 创建一个名为Create. Customize. Dialog的方法,在该方法中 添加代码,对两个事件变量和定制对话框进行有关设置: private void Create. Customize. Dialog() ICustomize. Dialog. Events_Event p. Customize. Dialog. Event = m_Customize. Dialog as ICustomize. Dialog. Events_Event; start. Dialog. E = new ICustomize. Dialog. Events_On. Start. Dialog. Event. Handler( On. Start. Dialog. Handler ); p. Customize. Dialog. Event. On. Start. Dialog += start. Dialog. E; close. Dialog. E = new ICustomize. Dialog. Events_On. Close. Dialog. Event. Handler( On. Close. Dialog. Handler ); p. Customize. Dialog. Event. On. Close. Dialog += close. Dialog. E; m_Customize. Dialog. Title = "Customize Toolbar. Control Items"; m_Customize. Dialog. Set. Double. Click. Destination( ax. Toolbar. Control 1); {
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l 在窗体Form 1的Load调用 Create. Customize. Dialog方法: l private void Form 1_Load(object sender, System. Event. Args e) { //…………… Create. Customize. Dialog(); //…………… }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l 向窗体Form 1中添加一个复选框并将其命名为 chk. Customize,标题为“Customize”。 l 在复选框chk. Customize的Checked. Changed事 件处理方法中添加如下代码: l private void chk. Customize_Checked. Changed(object sender, System. Event. Args e) { // Show or hide the Customize dialog box. if (chk. Customize. Checked == false) m_Customize. Dialog. Close. Dialog(); else m_Customize. Dialog. Start. Dialog(ax. Toolbar. Contro l 1. h. Wnd);
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l 添加下面的On. Start. Dialog和On. Close. Dialog事件处理器, 在打开或关闭定制对话框时会触发这两个方法。 l private void On. Start. Dialog. Handler () { ax. Toolbar. Control 1. Customize = true; } l private void On. Close. Dialog. Handler () { ax. Toolbar. Control 1. Customize = false; chk. Customize. Checked = false; } Ø 按以上步骤就能实现Toolbar. Control的定制。
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 5. 2 与 Toolbar. Control一起使用 l 通过Toolbar. Control控件使用Control Commands有三条途径: Ø 在程序设计阶段,通过Toolbar. Control控件的属性 页设置; Ø 在程序代码中,使用Add. Item, Add. Menu. Item或 Add. Toolbar. Def方法将要用到的Control Commands的实例对象添加到Toolbar. Control控件 中, 可用使用Add. Item 或 Add. Sub. Menu方法添加 到 Toolbar. Menu上; Ø 最终用户可用通过Customize 对话框进行设置(当 Toolbar. Control控件的Customize设置为true时有
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l 例如: ICommand cmd = new Symbology. Unique. Value. Renderer(); cmd. On. Create(ax. Map. Control 1. Get. Ocx()); if (cmd. Enabled) cmd. On. Click(); ICommand p. Command = new Controls. Select. Features. Tool. Class(); p. Command. On. Create(ax. Map. Control 1. Object); ax. Map. Control 1. Current. Tool = p. Command as ITool; Base. Tool tool = new Select. Adjacent. Features(); tool. On. Create(ax. Map. Control 1. Object); ax. Map. Control 1. Current. Tool = tool;
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 6 在WPF程序中使用Arc. GIS Engine 控件 1. WPF简介 2. 如何在WPF中使用Arc. GIS Engine 控件 3. 在WPF里使用Arc. GIS Engine控件的局限性
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 6. 2 如何在WPF中使用Arc. GIS Engine 控件
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 3. 6. 2. 1 WPF和Windows Forms集成 l 将WPF与Windows Forms集成可以有在同一窗 体和在不同窗体两种方式。要把Arc. GIS Engine 的Windows Forms控件集成到WPF环境里去, 有两个选项可供选择: Ø在WPF应用程序中添加一个Windows Form, 然后在此Form上添加使用Arc. GIS Engine控件。 Ø将Arc. GIS Engine控件直接加到WPF窗体中。
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET 示例:在WPF中添加一个Map. Control。 l 步骤一:启动Visual Studio l 步骤二:新建项目里选WPF应用程序,命名为 Map. Hosted. In. WPF l 步骤三:添加引用ESRI. Arc. GIS. Ax. Controls、 ESRI. Arc. GIS. System、ESRI. Arc. GIS. Version、 ESRI. Arc. GIS. Geometry,其中ESRI. Arc. GIS. Version为 Arc. GIS新增的程序集,它提供了绑定运行时的API,它的 Runtime. Manager类可用以列举目前所安装的Arc. GIS产品 以及其安装目录。 l 步骤四:将Windows. Forms. Host控件拖入窗体
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l 步骤五:将窗体的标题改为“Map. Control Hosted in WPF”,将Windows. Forms. Host控件 的Name属性设为“map. Host”,添加一个 Windows Load事件,取其默认名 Window_Loaded。 Ø 再拖放两个Windows. Forms. Host控件到窗体中,并分 别命名为toc. Host、toolbar. Host.
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET <Window x: Class=" Map. Control. In. WPF. Main. Window" xmlns="http: //schemas. microsoft. com/winfx/2006/xaml/present ation" xmlns: x="http: //schemas. microsoft. com/winfx/2006/xaml" Title="Map. Control hosted in WPF" Loaded="Window_Loaded" Height="582" Width="698"> <Grid> <Windows. Forms. Host Height="278" Horizontal. Alignment="Left" Name="map. Host" Vertical. Alignment="Top" Width="300" Margin="203, 33, 0, 0" /> <Windows. Forms. Host Height="278" Horizontal. Alignment="Left" Margin="0, 33, 0, 0" Name="toc. Control. Host" Vertical. Alignment="Top" Width="200" /> <Windows. Forms. Host Height="36" Horizontal. Alignment="Left" Name="toolbar. Control. Host" Vertical. Alignment="Top" Width="503" /> </Grid>
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l 步骤六:绑定产品及初始化license public partial class App : Application { protected override void On. Startup(Startup. Event. Args e) { base. On. Startup(e); ESRI. Arc. GIS. Runtime. Manager. Bind(ESRI. Arc. GIS. Product. Code. Engine); Initialize. Engine. License(); } private void Initialize. Engine. License() { Ao. Initialize aoi = new Ao. Initialize. Class(); esri. License. Product. Code product. Code = esri. License. Product. Code. Engine; if (aoi. Is. Product. Code. Available(product. Code) == esri. License. Status. esri. License. Available) { aoi. Initialize(product. Code); } } }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l 步骤七:定义Arc. GIS Engine控件 public partial class Main. Window : Window { Ax. Map. Control map. Control = null; Ax. TOCControl toc. Control = null; Ax. Toolbar. Control toolbar. Control = null; public Main. Window() { Initialize. Component(); Create. Engine. Controls(); } private void Create. Engine. Controls() { map. Control = new Ax. Map. Control(); map. Host. Child = map. Control; toc. Control = new Ax. TOCControl(); toc. Host. Child = toc. Control; toolbar. Control = new Ax. Toolbar. Control(); toolbar. Host. Child = toolbar. Control;
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l 步骤八:为控件添加属性事件 private void Wire. Map. Events() { map. Control. On. Mouse. Down+=new IMap. Control. Events 2_Ax_On. Mouse. Down. Event. Handler(map. Contr ol_On. Mouse. Down); //按智能提示完成 } private void map. Control_On. Mouse. Down(object sender, IMap. Control. Events 2_On. Mouse. Down. Event e) { IEnvelope extent= map. Control. Track. Rectangle(); map. Control. Extent = extent; map. Control. Refresh(); }
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l 步骤九:编写窗体加载事件代码 private void Window_Loaded(object sender, Routed. Event. Args e) { toc. Control. Set. Buddy. Control(map. Control); toolbar. Control. Set. Buddy. Control(map. Control); Toolbar. Add. Items(); Create. Customize. Dialog(); Wire. Map. Events(); map. Control. Load. Mx. File(@"E: usa. States. mxd"); } 步骤十:运行程序
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET l private void Toolbar. Add. Items() { toolbar. Control. Add. Item(new Controls. Open. Doc. Command. Class(), -1, false, -1, esri. Command. Styles. esri. Command. Style. Icon. Only); toolbar. Control. Add. Item(new Controls. Save. As. Doc. Command. Class(), …); toolbar. Control. Add. Item(new Controls. Add. Data. Command. Class(), …); toolbar. Control. Add. Item("esri. Controls. Map. Navigation Toolbar"); toolbar. Control. Add. Item("esri. Controls. Map. Identify. Too l"); toolbar. Control. Add. Item(new Controls. Map. Zoom. Tool. Control. Class(), …);
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET App. xaml l <Application x: Class="Map. Control. In. WPF. App” xmlns="http: //schemas. microsoft. com/winfx/2006/xaml/pr esentation” xmlns: x="http: //schemas. microsoft. com/winfx/200 6/xaml" Startup. Uri="Main. Window. xaml"> <Application. Resources> </Application>
江西理 大学 – Developing GIS Applications with Arc. Objects using C#. NET App. xaml. cs public partial class App : Application { protected override void On. Startup(Startup. Event. Args e) { base. On. Startup(e); ESRI. Arc. GIS. Runtime. Manager. Bind(ESRI. Arc. GIS. Product. Code. Engine); Initialize. Engine. License(); } private void Initialize. Engine. License() { Ao. Initialize aoi = new Ao. Initialize. Class(); esri. License. Product. Code product. Code = esri. License. Product. Code. Engine; if (aoi. Is. Product. Code. Available(product. Code) == esri. License. Status. esri. License. Available) { aoi. Initialize(product. Code); } } }
- Slides: 144