private void AxRenderControl_RcMouseDragSelect(IPickResultCollection PickResults, gviModKeyMask Mask) { if (PickResults != null) { int i = 0; IPickResult t = null; while ((t = PickResults.Get(i)) != null) { if (t.Type == gviObjectType.gviObjectRenderPoint) { IRenderPoint temp = ((IRenderPointPickResult)t).Point; } if (t.Type == gviObjectType.gviObject3DTileLayer) { I3DTileLayer temp = ((I3DTileLayerPickResult)t).TileLayer; } if (t.Type == gviObjectType.gviObjectRenderModelPoint) { IRenderModelPoint temp = ((IRenderModelPointPickResult)t).ModelPoint; } } } }
void axRenderControl1_RcMouseDragSelect(IPickResultCollection PickResults, gviModKeyMask Mask) { IPickResultCollection prc = PickResults; if (prc == null && CTRL && Mask == gviModKeyMask.gviModKeyCtrl) { return; } if (!CTRL || (CTRL && Mask != gviModKeyMask.gviModKeyCtrl)) //ctrl键 { this.axRenderControl1.FeatureManager.UnhighlightAll(); } if (prc != null) { for (int i = 0; i < prc.Count; i++) { IPickResult pr = prc.Get(i); if (pr != null && pr.Type == gviObjectType.gviObjectFeatureLayer) { IFeatureLayerPickResult flpr = pr as IFeatureLayerPickResult; int fid = flpr.FeatureId; IFeatureLayer fl = flpr.FeatureLayer; foreach (IFeatureClass fc in fcMap.Keys) { if (fc.Guid.Equals(fl.FeatureClassId)) { this.axRenderControl1.FeatureManager.HighlightFeature(fc, fid, System.Drawing.Color.Yellow); } } } } } }
private void FeatureLayerPicks(IPickResultCollection pickResults) { UnhighlightFeature(pickResults); if (pickResults != null && pickResults.Count > 0) { for (int i = 0; i < pickResults.Count; i++) { IPickResult pr = pickResults[i]; HighlightFeature(pr); } } }
private void AxRenderControl1_RcMouseDragSelect(IPickResultCollection PickResults, gviModKeyMask Mask) { if (PickResults == null) { return; } for (int i = 0; i < PickResults.Count; i++) { IRenderPipeLinePickResult pr = PickResults.Get(i) as IRenderPipeLinePickResult; if (pr == null) { continue; } GetParam(); IRenderPipeLine rpl = pr.RenderPipeLine; rpl.Color = System.Drawing.Color.Yellow; rpl.Play(playMode, duration, needLoop); currentPLs.Add(rpl); } }
void axRenderControl1_RcMouseDragSelect(IPickResultCollection PickResults, gviModKeyMask Mask) { IPickResultCollection prc = PickResults; if (prc == null) { return; } Hashtable fcEnvMap = new Hashtable(); this.axRenderControl1.FeatureManager.UnhighlightAll(); for (int i = 0; i < prc.Count; i++) { IPickResult pr = prc.Get(i); if (pr.Type == gviObjectType.gviObjectFeatureLayer) { IFeatureLayerPickResult flpr = pr as IFeatureLayerPickResult; int fid = flpr.FeatureId; IFeatureLayer fl = flpr.FeatureLayer; foreach (IFeatureClass fc in fcMap.Keys) { if (fc.Guid.Equals(fl.FeatureClassId)) { this.axRenderControl1.FeatureManager.HighlightFeature(fc, fid, System.Drawing.Color.Yellow); if (fcEnvMap.ContainsKey(fc)) { List <int> fids = fcEnvMap[fc] as List <int>; fids.Add(fid); fcEnvMap.Remove(fc); fcEnvMap.Add(fc, fids); } else { List <int> fids = new List <int>(); fids.Add(fid); fcEnvMap.Add(fc, fids); fcGUIDs.Add(fc.Guid); } } } } } // 计算Envelope env = null; foreach (IFeatureClass fc in fcEnvMap.Keys) { List <int> fids = fcEnvMap[fc] as List <int>; if (env == null) { env = fc.GetFeaturesEnvelope(fids.ToArray(), "Geometry"); } else { env.ExpandByEnvelope(fc.GetFeaturesEnvelope(fids.ToArray(), "Geometry")); } } // 设定出图参数 switch (type) { case ExportType.Export25D: { Export25D(); } break; case ExportType.ExportDEM: { ExportDEM(); } break; case ExportType.ExportDOM: { ExportDOM(); } break; case ExportType.ExportOrthoImage: { ExportOrthoImage(); } break; } // 恢复漫游模式 this.axRenderControl1.InteractMode = gviInteractMode.gviInteractNormal; }