ThinkPad T490s TrackPoint的小红帽无法使用

Windows里面的小红帽设置是灰色的无法使用,有没有大佬知道解决方法!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
在ArcEngine中使用Select Elements选择元素的步骤如下: 1. 获取MapControl或PageLayoutControl对象。 2. 创建一个新的SelectionEnvironment对象,并设置选择条件、符号等属性。 3. 调用MapControl或PageLayoutControl的ClearSelection方法,清空当前选择集。 4. 调用MapControl或PageLayoutControl的SelectByShape或SelectByPoint等方法,根据指定的几何图形或位置选择元素。 5. 遍历MapControl或PageLayoutControl的Selection集合,获取所选元素的ID号。 6. 根据ID号获取元素对象,执行相应操作。 以下是一个示例代码: ```C# // 获取MapControl对象 ESRI.ArcGIS.Controls.AxMapControl mapControl = this.axMapControl1; // 创建SelectionEnvironment对象 ESRI.ArcGIS.Carto.ISelectionEnvironment selectionEnv = new ESRI.ArcGIS.Carto.SelectionEnvironmentClass(); selectionEnv.CombinationMethod = ESRI.ArcGIS.Carto.esriSelectionResultEnum.esriSelectionResultNew; selectionEnv.SelectionColor = GetRGBColor(255, 0, 0); // 设置选择符号颜色 // 清空当前选择集 mapControl.Map.ClearSelection(); // 创建选择几何图形并进行选择 ESRI.ArcGIS.Geometry.IPoint point = new ESRI.ArcGIS.Geometry.PointClass(); point.PutCoords(x, y); // 设置点的坐标 ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = mapControl.ActiveView.ScreenDisplay; double tolerance = screenDisplay.DisplayTransformation.FromPoints(5); // 设置选择容差 ESRI.ArcGIS.Display.IDisplayFeedback displayFeedback = new ESRI.ArcGIS.Display.RubberBandFeedbackClass(); displayFeedback.Display = screenDisplay; ESRI.ArcGIS.Geometry.IGeometry geometry = displayFeedback.TrackPoint(); // 获取选择几何图形 mapControl.Map.SelectByShape(geometry, selectionEnv, false); // 根据几何图形进行选择 // 遍历选择集合并获取元素对象 ESRI.ArcGIS.Carto.IEnumFeature enumFeature = (ESRI.ArcGIS.Carto.IEnumFeature)mapControl.Map.FeatureSelection; ESRI.ArcGIS.Geodatabase.IFeature feature; enumFeature.Reset(); while ((feature = enumFeature.Next()) != null) { // 根据ID号获取元素对象并执行操作 int featureID = feature.OID; ESRI.ArcGIS.Carto.IFeatureLayer featureLayer = (ESRI.ArcGIS.Carto.IFeatureLayer)mapControl.Map.get_Layer(0); ESRI.ArcGIS.Carto.IFeatureSelection featureSelection = (ESRI.ArcGIS.Carto.IFeatureSelection)featureLayer; ESRI.ArcGIS.Geodatabase.IQueryFilter queryFilter = new ESRI.ArcGIS.Geodatabase.QueryFilterClass(); queryFilter.WhereClause = "OBJECTID = " + featureID; ESRI.ArcGIS.Geodatabase.IFeatureCursor featureCursor = featureLayer.Search(queryFilter, false); ESRI.ArcGIS.Geodatabase.IFeature feature2 = featureCursor.NextFeature(); // 执行操作 // ... } ``` 在上述代码中,首先获取MapControl对象,并创建SelectionEnvironment对象,设置选择条件。然后调用MapControl的ClearSelection方法,清空当前选择集。接着创建选择几何图形,使用MapControl的SelectByShape方法进行选择。最后遍历选择集合,根据ID号获取元素对象,并执行相应操作。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值