public override void OnClick() { if (_hook == null) { return; } if (_hook.MainUserControl == null) { return; } //UserControlSMPD pUserControl = _hook.MainUserControl as UserControlSMPD; //if (pUserControl != null) //{ // //切换到标准图幅tab页 // pUserControl.TurnToXZQTab(); //} //ygc 2013-01-28修改行政区选择方式 //更新图库树 FrmGetXZQLocation newFrom = new FrmGetXZQLocation(); newFrom.m_DefaultMap = _hook.MapControl; newFrom.m_IsClose = true; if (newFrom.ShowDialog() != DialogResult.OK) { return; } newFrom.drawgeometryXOR(newFrom.m_pGeometry); frmExport pfrmExport = new GeoDataExport.frmExport(_hook.MapControl.Map, newFrom.m_pGeometry); pfrmExport.WriteLog = this.WriteLog;//ygc 2012-9-11 新增是否写日志 pfrmExport.XZQCode = newFrom.m_XZQCode; pfrmExport.ShowDialog(); }
public override void OnMouseDown(int Button, int Shift, int X, int Y) { if (m_hookHelper != null) { IMapControl2 pMapcontrol = (IMapControl2)((IToolbarControl)m_hookHelper.Hook).Buddy; pMapcontrol.ActiveView.Refresh(); pGeometry = pMapcontrol.TrackPolygon(); ISimpleFillSymbol pSimplefillSymbol = new SimpleFillSymbolClass(); IRgbColor pRgbColor = new RgbColorClass(); pRgbColor.Red = 155; pRgbColor.Green = 100; pRgbColor.Blue = 200; pSimplefillSymbol.Color = (IColor)pRgbColor; ILineSymbol pLineSymbol = new SimpleLineSymbolClass(); pLineSymbol.Color = (IColor)pRgbColor; pLineSymbol.Width = 1; pSimplefillSymbol.Outline = pLineSymbol; pSimplefillSymbol.Style = esriSimpleFillStyle.esriSFSHollow; object symbol = pSimplefillSymbol; pMapcontrol.DrawShape(pGeometry, ref symbol); IMap pMap = m_hookHelper.FocusMap; frmExport frm = new frmExport(pMap, pGeometry); frm.WriteLog = WriteLog;//ygc 2012-9-12 是否写日志 frm.Show(); //TODO: Add Map/PageLayout related logic } else if (m_sceneHookHelper != null) { //TODO: Add Scene related logic } else if (m_globeHookHelper != null) { //TODO: Add Globe related logic } }