Ejemplo n.º 1
0
        public override void OnClick()
        {
            if (m_Hook == null)
            {
                return;
            }
            //LogFile log = new LogFile(m_Hook.tipRichBox, m_Hook.strLogFilePath);

            //if (log != null)
            //{
            //    log.Writelog("标准图幅");
            //}
            if (m_Hook.ArcGisMapControl.Map.LayerCount == 0)
            {
                MessageBox.Show("当前没有调阅数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                if (this.WriteLog)
                {
                    Plugin.LogTable.Writelog("标准分幅制图 提示‘当前没有调阅数据!’", m_Hook.tipRichBox);
                }
                return;
            }
            ISpatialReference pSpatialRefrence = m_Hook.ArcGisMapControl.SpatialReference;

            if (!(pSpatialRefrence is IProjectedCoordinateSystem))
            {
                //MessageBox.Show("请设置地图的投影坐标!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                //Plugin.LogTable.Writelog("标准分幅制图 提示‘请设置地图的投影坐标!’", m_Hook.tipRichBox);
                //return;
            }
            if (this.WriteLog)
            {
                Plugin.LogTable.Writelog("标准分幅制图", m_Hook.tipRichBox);
            }
            m_Hook.ArcGisMapControl.CurrentTool = null;
            try
            {
                FrmSheetMapUserSet fmSMUS = new
                                            FrmSheetMapUserSet(m_Hook.ArcGisMapControl, m_frmhook.MainForm, pHook, SheetType.foundationTerrain);
                fmSMUS.Show(m_frmhook.MainForm);
            }
            catch (Exception ex)
            {
                SysCommon.Error.ErrorHandle.ShowFrmErrorHandle("提示", ex.Message);
            }
        }
Ejemplo n.º 2
0
        public override void OnClick()
        {
            if (m_Hook == null)
            {
                return;
            }

            if (m_Hook.ArcGisMapControl.Map.LayerCount == 0)
            {
                MessageBox.Show("当前没有调阅数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                if (this.WriteLog)
                {
                    Plugin.LogTable.Writelog("标准分幅制图 提示‘当前没有调阅数据!’", m_Hook.tipRichBox);
                }
                return;
            }
            ISpatialReference pSpatialRefrence = m_Hook.ArcGisMapControl.SpatialReference;

            if (!(pSpatialRefrence is IProjectedCoordinateSystem))
            {
                //MessageBox.Show("请设置地图的投影坐标!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                //Plugin.LogTable.Writelog("标准分幅制图 提示‘请设置地图的投影坐标!’", m_Hook.tipRichBox);
                //return;
            }
            try
            {
                if (this.WriteLog)
                {
                    Plugin.LogTable.Writelog("城镇地籍图", m_Hook.tipRichBox);
                }
                m_Hook.ArcGisMapControl.CurrentTool = null;
                FrmSheetMapUserSet fmSMUS = new
                                            FrmSheetMapUserSet(m_Hook.ArcGisMapControl, m_frmhook.MainForm, pHook, SheetType.urbanCadastre);
                fmSMUS.Show(m_frmhook.MainForm);
                fmSMUS.WriteLog = WriteLog;//ygc 2012-9-12 是否写日志
            }
            catch (Exception ex)
            {
                SysCommon.Error.ErrorHandle.ShowFrmErrorHandle("提示", ex.Message);
            }
        }