Exemplo n.º 1
0
        public MapForm()
        {
            ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);
            InitializeComponent();

            m_menuMap = new ToolbarMenuClass();

            //添加事件
            AddEnvet();
            mapControlTemp           = this.axMapControl1;
            ArcGisUtils.axMapControl = this.axMapControl1;

            ArcGisUtils.axPageLayoutControl = PageLayoutForm.GetInstance().GetAxPageLayoutControl();
            //检查数据库以前是否有
            SoftwareConfig mxdConfig = SoftwareConfig.FindConfig(JTSYQMxdPathReids);

            if (mxdConfig != null)
            {
                if (this.axMapControl1.CheckMxFile(mxdConfig.Value))
                {
                    LoadMXD(mxdConfig.Value);
                    ArcGisUtils.MXDPath = mxdConfig.Value;
                }
                else
                {
                    SoftwareConfig.Delete(JTSYQMxdPathReids);
                }
            }
        }
Exemplo n.º 2
0
        public static PageLayoutForm GetInstance()
        {
            bool flag = PageLayoutForm.pageLayoutForm == null;

            if (flag)
            {
                PageLayoutForm.pageLayoutForm = new PageLayoutForm();
            }
            return(PageLayoutForm.pageLayoutForm);
        }