private void vTreeResult_DoubleClick(object sender, EventArgs e) { try { if (this.WriteLog) { Plugin.LogTable.Writelog("最大林斑号查询"); } if (vTreeResult.SelectedNode.Level == 3) { IFeature pFeature = CommnClass.Query(vTreeResult.SelectedNode.Text); if (pFeature == null) { MessageBox.Show("未找到该行政区林斑号信息!", "提示!"); return; } ///ZQ 20111020 定位范围扩大1.5倍 IEnvelope pExtent = pFeature.Extent; SysCommon.ModPublicFun.ResizeEnvelope(pExtent, 1.5); //先刷新,后闪烁问题 m_MapControl.Extent = pExtent; m_MapControl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewBackground, null, null); m_MapControl.ActiveView.ScreenDisplay.UpdateWindow(); m_MapControl.FlashShape(pFeature.ShapeCopy, 3, 200, null); } } catch { } }
private void btt_Click(object sender, EventArgs e) { if (this.WriteLog) { Plugin.LogTable.Writelog("最大林斑号查询"); } error.Clear(); if (CommnClass.m_cmbBoxCountry == "") { error.SetError(cmbBoxCountry, "县级行政区代码不能为空!"); return; } //进度条 SysCommon.CProgress pgss = new SysCommon.CProgress("正在查询,请稍候..."); pgss.EnableCancel = false; pgss.ShowDescription = false; pgss.FakeProgress = true; pgss.TopMost = true; pgss.ShowProgress(); if (CommnClass.m_cmbBoxVillage == "" && CommnClass.m_cmbBoxNeighbour == "") { CommnClass.SetvTreeCountry(vTreeResult); vTreeResult.ExpandAll(); } else if (CommnClass.m_cmbBoxNeighbour == "") { CommnClass.SetvTreeVillage(vTreeResult); vTreeResult.ExpandAll(); } else { IFeature pFeature = CommnClass.Query(CommnClass.m_cmbBoxNeighbour); if (pFeature == null) { pgss.Close(); MessageBox.Show("未找到行政区林斑号信息!", "提示!"); return; } CommnClass.SetLinBanTreeNeighbour(vTreeResult); vTreeResult.ExpandAll(); ///ZQ 20111020 定位范围扩大1.5倍 IEnvelope pExtent = pFeature.Extent; SysCommon.ModPublicFun.ResizeEnvelope(pExtent, 1.5); //先刷新,后闪烁问题 m_MapControl.Extent = pExtent; m_MapControl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewBackground, null, null); m_MapControl.ActiveView.ScreenDisplay.UpdateWindow(); m_MapControl.FlashShape(pFeature.ShapeCopy, 3, 200, null); } ///ZQ 20111109 modfiy 修改点击查询,界面最小化 Application.DoEvents(); pgss.Close(); }