默认头像
路人甲
路人甲
  • 注册日期2006-08-05
  • 发帖数146
  • QQ
  • 铜币591枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1834回复:3

我做了个查找的.........

楼主#
更多 发布于:2006-09-11 20:23

最近看到帮助有个Find Samples的 就想也做一个,不过运行Find Samples时都不行,请高手们  帮忙看看   帮个忙  ,谢谢你们~~~~~~~

喜欢0 评分0
默认头像
路人甲
路人甲
  • 注册日期2004-10-27
  • 发帖数517
  • QQ4604052
  • 铜币1枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2006-09-12 09:22
MSN:hsghxm@163.com QQ:4604052 (很少用,最好别加) Email:hsghxm@163.com 我的BOLG:http://www.gisempire.com/blog/user1/864/index.htm
举报 回复(0) 喜欢(0)     评分
默认头像
路人甲
路人甲
  • 注册日期2006-08-05
  • 发帖数146
  • QQ
  • 铜币591枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2006-09-11 20:29
请各位都来看看帮帮忙呀  小弟,谢过了~~~~~~~
举报 回复(0) 喜欢(0)     评分
默认头像
路人甲
路人甲
  • 注册日期2006-08-05
  • 发帖数146
  • QQ
  • 铜币591枚
  • 威望0点
  • 贡献值0点
  • 银元0个
3楼#
发布于:2006-09-11 20:27

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using ESRI.ArcGIS.SystemUI;
using ESRI.ArcGIS.ArcReaderControl;

namespace Find
{
///


/// Summary description for Form1.
///

public class Form1 : System.Windows.Forms.Form
{
 public System.Windows.Forms.Button cmdLoad;
 public System.Windows.Forms.TextBox txbPath;
 public System.Windows.Forms.Label Label1;
 public System.Windows.Forms.Label Label6;
 public System.Windows.Forms.Label Label5;
 public System.Windows.Forms.Label Label3;
 public System.Windows.Forms.Label Label2;
 public System.Windows.Forms.ComboBox cboLayers;
 public System.Windows.Forms.Button cmdFlicker;
 public System.Windows.Forms.Button cmdFlash;
 public System.Windows.Forms.Button cmdFindNext;
 public System.Windows.Forms.Button cmdFind;
 private ArcReaderSearchDef m_SearchDef;
 private IARFeatureCursor m_FeatureCursor;
 private IARFeature m_Feature;
 private System.Collections.SortedList m_LayerCollection = new System.Collections.SortedList();
 private ESRI.ArcGIS.ArcReaderControl.AxArcReaderControl axArcReaderControl2;
 ///
 /// Required designer variable.
 ///

 private System.ComponentModel.Container components = null;

 public Form1()
 {
  //
  // Required for Windows Form Designer support
  //
  InitializeComponent();

  //
  // TOD Add any constructor code after InitializeComponent call
  //
 }

 ///


 /// Clean up any resources being used.
 ///

 protected override void Dispose( bool disposing )
 {
  if( disposing )
  {
   if (components != null)
   {
    components.Dispose();
   }
  }
  base.Dispose( disposing );
 }

 #region Windows Form Designer generated code
 ///


 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 ///

 private void InitializeComponent()
 {
  System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
  this.cmdLoad = new System.Windows.Forms.Button();
  this.txbPath = new System.Windows.Forms.TextBox();
  this.Label1 = new System.Windows.Forms.Label();
  this.Label6 = new System.Windows.Forms.Label();
  this.Label5 = new System.Windows.Forms.Label();
  this.Label3 = new System.Windows.Forms.Label();
  this.Label2 = new System.Windows.Forms.Label();
  this.cboLayers = new System.Windows.Forms.ComboBox();
  this.cmdFlicker = new System.Windows.Forms.Button();
  this.cmdFlash = new System.Windows.Forms.Button();
  this.cmdFindNext = new System.Windows.Forms.Button();
  this.cmdFind = new System.Windows.Forms.Button();
  this.axArcReaderControl2 = new ESRI.ArcGIS.ArcReaderControl.AxArcReaderControl();
  ((System.ComponentModel.ISupportInitialize)(this.axArcReaderControl2)).BeginInit();
  this.SuspendLayout();
  //
  // cmdLoad
  //
  this.cmdLoad.BackColor = System.Drawing.SystemColors.Control;
  this.cmdLoad.Cursor = System.Windows.Forms.Cursors.Default;
  this.cmdLoad.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  this.cmdLoad.ForeColor = System.Drawing.SystemColors.ControlText;
  this.cmdLoad.Location = new System.Drawing.Point(470, 9);
  this.cmdLoad.Name = "cmdLoad";
  this.cmdLoad.RightToLeft = System.Windows.Forms.RightToLeft.No;
  this.cmdLoad.Size = new System.Drawing.Size(98, 27);
  this.cmdLoad.TabIndex = 3;
  this.cmdLoad.Text = "Load PMF";
  this.cmdLoad.Click += new System.EventHandler(this.cmdLoad_Click);
  //
  // txbPath
  //
  this.txbPath.AcceptsReturn = true;
  this.txbPath.AutoSize = false;
  this.txbPath.BackColor = System.Drawing.SystemColors.Window;
  this.txbPath.Cursor = System.Windows.Forms.Cursors.IBeam;
  this.txbPath.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  this.txbPath.ForeColor = System.Drawing.SystemColors.WindowText;
  this.txbPath.Location = new System.Drawing.Point(10, 9);
  this.txbPath.MaxLength = 0;
  this.txbPath.Name = "txbPath";
  this.txbPath.RightToLeft = System.Windows.Forms.RightToLeft.No;
  this.txbPath.Size = new System.Drawing.Size(452, 27);
  this.txbPath.TabIndex = 2;
  this.txbPath.Text = "";
  //
  // Label1
  //
  this.Label1.BackColor = System.Drawing.SystemColors.Control;
  this.Label1.Cursor = System.Windows.Forms.Cursors.Default;
  this.Label1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  this.Label1.ForeColor = System.Drawing.SystemColors.Highlight;
  this.Label1.Location = new System.Drawing.Point(586, 129);
  this.Label1.Name = "Label1";
  this.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No;
  this.Label1.Size = new System.Drawing.Size(241, 27);
  this.Label1.TabIndex = 16;
  this.Label1.Text = "5) Loop though any other features that were found.";
  //
  // Label6
  //
  this.Label6.BackColor = System.Drawing.SystemColors.Control;
  this.Label6.Cursor = System.Windows.Forms.Cursors.Default;
  this.Label6.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  this.Label6.ForeColor = System.Drawing.SystemColors.Highlight;
  this.Label6.Location = new System.Drawing.Point(586, 69);
  this.Label6.Name = "Label6";
  this.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No;
  this.Label6.Size = new System.Drawing.Size(241, 18);
  this.Label6.TabIndex = 15;
  this.Label6.Text = "3) Enter a search string to find.";
  //
  // Label5
  //
  this.Label5.BackColor = System.Drawing.SystemColors.Control;
  this.Label5.Cursor = System.Windows.Forms.Cursors.Default;
  this.Label5.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  this.Label5.ForeColor = System.Drawing.SystemColors.Highlight;
  this.Label5.Location = new System.Drawing.Point(586, 95);
  this.Label5.Name = "Label5";
  this.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No;
  this.Label5.Size = new System.Drawing.Size(241, 27);
  this.Label5.TabIndex = 14;
  this.Label5.Text = "4) Flash or flicker the found feature.";
  //
  // Label3
  //
  this.Label3.BackColor = System.Drawing.SystemColors.Control;
  this.Label3.Cursor = System.Windows.Forms.Cursors.Default;
  this.Label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  this.Label3.ForeColor = System.Drawing.SystemColors.Highlight;
  this.Label3.Location = new System.Drawing.Point(586, 43);
  this.Label3.Name = "Label3";
  this.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No;
  this.Label3.Size = new System.Drawing.Size(241, 18);
  this.Label3.TabIndex = 13;
  this.Label3.Text = "2) Select a layer to search.";
  //
  // Label2
  //
  this.Label2.BackColor = System.Drawing.SystemColors.Control;
  this.Label2.Cursor = System.Windows.Forms.Cursors.Default;
  this.Label2.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  this.Label2.ForeColor = System.Drawing.SystemColors.Highlight;
  this.Label2.Location = new System.Drawing.Point(586, 9);
  this.Label2.Name = "Label2";
  this.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No;
  this.Label2.Size = new System.Drawing.Size(241, 27);
  this.Label2.TabIndex = 12;
  this.Label2.Text = "1) Enter a valid file path and load the PMF.";
  //
  // cboLayers
  //
  this.cboLayers.BackColor = System.Drawing.SystemColors.Window;
  this.cboLayers.Cursor = System.Windows.Forms.Cursors.Default;
  this.cboLayers.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  this.cboLayers.ForeColor = System.Drawing.SystemColors.WindowText;
  this.cboLayers.Items.AddRange(new object[] {
                "Layer",
                "Field"});
  this.cboLayers.Location = new System.Drawing.Point(586, 207);
  this.cboLayers.Name = "cboLayers";
  this.cboLayers.RightToLeft = System.Windows.Forms.RightToLeft.No;
  this.cboLayers.Size = new System.Drawing.Size(231, 22);
  this.cboLayers.TabIndex = 17;
  //
  // cmdFlicker
  //
  this.cmdFlicker.BackColor = System.Drawing.SystemColors.Control;
  this.cmdFlicker.Cursor = System.Windows.Forms.Cursors.Default;
  this.cmdFlicker.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  this.cmdFlicker.ForeColor = System.Drawing.SystemColors.ControlText;
  this.cmdFlicker.Location = new System.Drawing.Point(701, 310);
  this.cmdFlicker.Name = "cmdFlicker";
  this.cmdFlicker.RightToLeft = System.Windows.Forms.RightToLeft.No;
  this.cmdFlicker.Size = new System.Drawing.Size(116, 36);
  this.cmdFlicker.TabIndex = 21;
  this.cmdFlicker.Text = "Flicker Feature";
  this.cmdFlicker.Click += new System.EventHandler(this.cmdFlicker_Click);
  //
  // cmdFlash
  //
  this.cmdFlash.BackColor = System.Drawing.SystemColors.Control;
  this.cmdFlash.Cursor = System.Windows.Forms.Cursors.Default;
  this.cmdFlash.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  this.cmdFlash.ForeColor = System.Drawing.SystemColors.ControlText;
  this.cmdFlash.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
  this.cmdFlash.Location = new System.Drawing.Point(586, 310);
  this.cmdFlash.Name = "cmdFlash";
  this.cmdFlash.RightToLeft = System.Windows.Forms.RightToLeft.No;
  this.cmdFlash.Size = new System.Drawing.Size(116, 36);
  this.cmdFlash.TabIndex = 20;
  this.cmdFlash.Text = "Flash Feature";
  this.cmdFlash.Click += new System.EventHandler(this.cmdFlash_Click);
  //
  // cmdFindNext
  //
  this.cmdFindNext.BackColor = System.Drawing.SystemColors.Control;
  this.cmdFindNext.Cursor = System.Windows.Forms.Cursors.Default;
  this.cmdFindNext.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  this.cmdFindNext.ForeColor = System.Drawing.SystemColors.ControlText;
  this.cmdFindNext.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
  this.cmdFindNext.Location = new System.Drawing.Point(701, 250);
  this.cmdFindNext.Name = "cmdFindNext";
  this.cmdFindNext.RightToLeft = System.Windows.Forms.RightToLeft.No;
  this.cmdFindNext.Size = new System.Drawing.Size(116, 44);
  this.cmdFindNext.TabIndex = 19;
  this.cmdFindNext.Text = "Find Next";
  this.cmdFindNext.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
  this.cmdFindNext.Click += new System.EventHandler(this.cmdFindNext_Click);
  //
  // cmdFind
  //
  this.cmdFind.BackColor = System.Drawing.SystemColors.Control;
  this.cmdFind.Cursor = System.Windows.Forms.Cursors.Default;
  this.cmdFind.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  this.cmdFind.ForeColor = System.Drawing.SystemColors.ControlText;
  this.cmdFind.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
  this.cmdFind.Location = new System.Drawing.Point(586, 250);
  this.cmdFind.Name = "cmdFind";
  this.cmdFind.RightToLeft = System.Windows.Forms.RightToLeft.No;
  this.cmdFind.Size = new System.Drawing.Size(116, 44);
  this.cmdFind.TabIndex = 18;
  this.cmdFind.Text = "Find";
  this.cmdFind.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
  this.cmdFind.Click += new System.EventHandler(this.cmdFind_Click);
  //
  // axArcReaderControl2
  //
  this.axArcReaderControl2.Location = new System.Drawing.Point(8, 48);
  this.axArcReaderControl2.Name = "axArcReaderControl2";
  this.axArcReaderControl2.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axArcReaderControl2.OcxState")));
  this.axArcReaderControl2.Size = new System.Drawing.Size(536, 384);
  this.axArcReaderControl2.TabIndex = 22;
  //
  // Form1
  //
  this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  this.ClientSize = new System.Drawing.Size(835, 506);
  this.Controls.Add(this.axArcReaderControl2);
  this.Controls.Add(this.cmdFlicker);
  this.Controls.Add(this.cmdFlash);
  this.Controls.Add(this.cmdFindNext);
  this.Controls.Add(this.cmdFind);
  this.Controls.Add(this.cboLayers);
  this.Controls.Add(this.Label1);
  this.Controls.Add(this.Label6);
  this.Controls.Add(this.Label5);
  this.Controls.Add(this.Label3);
  this.Controls.Add(this.Label2);
  this.Controls.Add(this.cmdLoad);
  this.Controls.Add(this.txbPath);
  this.Name = "Form1";
  this.Text = "Form1";
  this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
  this.Load += new System.EventHandler(this.Form1_Load);
  ((System.ComponentModel.ISupportInitialize)(this.axArcReaderControl2)).EndInit();
  this.ResumeLayout(false);

 }
 #endregion

 ///


 /// The main entry point for the application.
 ///

 [STAThread]
 static void Main()
 {
  Application.Run(new Form1());
 }

 private void Form1_Load(object sender, System.EventArgs e)
 {
  //Load button images
//   System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap (GetType().Assembly.GetManifestResourceStream(GetType(), "find.bmp"));
//   bitmap.MakeTransparent(System.Drawing.Color.Teal);
//   cmdFind.Image = bitmap;
//   cmdFindNext.Image = bitmap;
  cmdFindNext.Enabled = false;
  cmdFlash.Enabled = false;
  cmdFlicker.Enabled = false;
 }

 private void cmdFind_Click(object sender, System.EventArgs e)
 {
  cmdFindNext.Enabled = false;
  cmdFlash.Enabled = false;
  cmdFlicker.Enabled = false;

  //Determine whether a document is loaded
  if (axArcReaderControl2.CurrentViewType == esriARViewType.esriARViewTypeNone)
  {
   MessageBox.Show("You must load a document!");
   return;
  }

  //Determine whether permission to search layers
  if (axArcReaderControl2.HasDocumentPermission(esriARDocumentPermissions.esriARDocumentPermissionsQueryFeatures) == false)
  {
   MessageBox.Show("You do not have permission to search for features!");
   return;
  }


 
  //Get IARLayer interface
  int index = m_LayerCollection.IndexOfKey(cboLayers.SelectedItem.ToString());
  IARLayer layer = (IARLayer) m_LayerCollection.GetByIndex(index);

  //Get string to search for from the user
  InputFormResult res = InputForm.ShowModal(this,"Enter a string to find: (The search is case sensitive)","Find", "");

  if (res.Result == DialogResult.Cancel) return;
  string sFind = res.InputString;
  if (sFind.Trim() == "") return;

  //Get IARFeatureCursor interface. Because there is no 'WhereClause' set
  //yet this feature cursor will conatin all the features in the layer.
  m_SearchDef = new ArcReaderSearchDefClass();
  m_FeatureCursor = layer.SearchARFeatures(m_SearchDef);
  //Get IARFeature interface by looping to the first feature in the cursor
  m_Feature = m_FeatureCursor.NextARFeature();

  string sWhereClause = "";

  //Loop through the feature's fields to find the field names of any string
  //fields. Build up a 'WhereClause' using the field names and the users string.
  for (int i = 0; i <= m_Feature.FieldCount - 1; i++)
  {
   if (m_Feature.get_FieldType(i) == esriARFieldType.esriARFieldTypeString)
   {
    if (sWhereClause == "")
    {
     sWhereClause = m_Feature.get_FieldName(i) + " Like '" + sFind + "'";
    }
    else
    {
     sWhereClause = sWhereClause + " OR " + m_Feature.get_FieldName(i) + " Like '" + sFind + "'";
    }
   }
  }

  //Set the search definiton WhereClause
  m_SearchDef.WhereClause = sWhereClause;
  //Get IARFeatureCursor interface by searching the layer
  m_FeatureCursor = layer.SearchARFeatures(m_SearchDef);
  //Get IARFeature interface by looping to the first feature in the cursor
  m_Feature = m_FeatureCursor.NextARFeature();

  if (m_Feature == null)
  {
   MessageBox.Show("No features found!");
   return;
  }
  else
  {
   m_Feature.ZoomTo();
   axArcReaderControl2.ARPageLayout.FocusARMap.Refresh(true);
   cmdFindNext.Enabled = true;
   cmdFlash.Enabled = true;
   cmdFlicker.Enabled = true;
  }
 }

 private void cmdFindNext_Click(object sender, System.EventArgs e)
 {
  //Get IARFeature interface by looping to the next feature in the cursor
  m_Feature = m_FeatureCursor.NextARFeature();

  if (m_Feature == null)
  {
   MessageBox.Show("No more features found!");
   cmdFindNext.Enabled = false;
   cmdFlash.Enabled = false;
   cmdFlicker.Enabled = false;
  }
  else
  {
   m_Feature.ZoomTo();
   axArcReaderControl2.ARPageLayout.FocusARMap.Refresh(true);
  }
 }

 private void cmdFlash_Click(object sender, System.EventArgs e)
 {
  m_Feature.Flash();
 }

 private void cmdFlicker_Click(object sender, System.EventArgs e)
 {
  m_Feature.Flicker();
 }

 private void cmdLoad_Click(object sender, System.EventArgs e)
 {
  //Load the specified pmf
  if (txbPath.Text == "")
  {
   return;
  }
  if (axArcReaderControl2.CheckDocument(txbPath.Text) == true)
  {
   axArcReaderControl2.LoadDocument(txbPath.Text,"");
  }
  else
  {
   MessageBox.Show("This document cannot be loaded!");
  }
 }

 private void DisplayLayerNames()
 {
  //Clear previous
  cboLayers.Items.Clear();
  for (int i = 0; i <= m_LayerCollection.Count; i++)
  {
   m_LayerCollection.Remove((1));
  }

  //Loop through each layer in the focus map
  for (int i = 0; i <= axArcReaderControl2.ARPageLayout.FocusARMap.ARLayerCount - 1; i++)
  {
   IARLayer layer = axArcReaderControl2.ARPageLayout.FocusARMap.get_ARLayer(i);
   if (layer.IsGroupLayer == false)
   {
    //If the layer is searchable add layer
    //to collection, and name to combo box
    if (layer.Searchable == true)
    {
     cboLayers.Items.Add(axArcReaderControl2.ARPageLayout.FocusARMap.get_ARLayer(i).Name);
     m_LayerCollection.Add(layer.Name, layer);
    }
   }
   else
   {
    //Loop though each layer in the group layer
    for (int j = 0; j <= layer.ARLayerCount - 1; j++)
    {
     //If the layer is searchable add layer
     //to collection, and name to combo box
     if (layer.get_ChildARLayer(j).Searchable == true)
     {
      cboLayers.Items.Add(layer.get_ChildARLayer(j).Name);
      m_LayerCollection.Add(layer.get_ChildARLayer(j).Name, layer.get_ChildARLayer(j) );
     }
    }
   }
  }

  //Select the first layer in the combo box
  if (cboLayers.Items.Count != 0)
  {
   cmdFind.Enabled = true;
   cboLayers.SelectedIndex = 0;
  }
  else
  {
   cmdFind.Enabled = false;
  }
 }

 private void axArcReaderControl1_OnCurrentViewChanged(object sender, ESRI.ArcGIS.ArcReaderControl.IARControlEvents_OnCurrentViewChangedEvent e)
 {
  //Set the current tool to none selected
  if (axArcReaderControl2.CurrentViewType != esriARViewType.esriARViewTypeNone)
  {
   if (axArcReaderControl2.CurrentARTool != esriARTool.esriARToolNoneSelected)
   {
    axArcReaderControl2.CurrentARTool = esriARTool.esriARToolNoneSelected;
   }
  }
 }

 private void axArcReaderControl1_OnDocumentLoaded(object sender, ESRI.ArcGIS.ArcReaderControl.IARControlEvents_OnDocumentLoadedEvent e)
 {
  //Update layer list
  DisplayLayerNames();
 }

 private void axArcReaderControl1_OnFocusARMapChanged(object sender, ESRI.ArcGIS.ArcReaderControl.IARControlEvents_OnFocusARMapChangedEvent e)
 {
  //Update layer list
  DisplayLayerNames();
 }

 private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
  //Release COM objects
  ESRI.ArcGIS.Utility.COMSupport.AOUninitialize.Shutdown();
 }
}
}
这是例子的代码给你们附上, int index = m_LayerCollection.IndexOfKey(cboLayers.SelectedItem.ToString());
  IARLayer layer = (IARLayer) m_LayerCollection.GetByIndex(index);
到这里的时候出错了 不知道哪里出了问题

举报 回复(0) 喜欢(0)     评分
默认头像

返回顶部