Exemplo n.º 1
0
        private void btnAddData_Click(object sender, EventArgs e)
        {
            if (_vectorHostLayer == null)
            {
                btnAddVector_Click(null, null);
            }
            using (OpenFileDialog dlg = new OpenFileDialog())
            {
                dlg.Filter = "Shape Files(*.shp)|*.shp";
                if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    _vectorHostLayer.AddData(dlg.FileName, null);

                    _canvas.Refresh(enumRefreshType.All);
                }
            }
        }
Exemplo n.º 2
0
        private void btnAddData_Click(object sender, EventArgs e)
        {
            if (_vectorHostLayer == null)
            {
                btnAddVector_Click(null, null);
            }
            //using (OpenFileDialog dlg = new OpenFileDialog())
            //{
            //    dlg.Filter = "Shape Files(*.shp)|*.shp";
            //    if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            //    {
            //        _vectorHostLayer.AddData(dlg.FileName, null);

            //        _canvas.Refresh(enumRefreshType.All);
            //    }
            //}
            string fname = @"F:\产品与项目\MAS-II\SMART0718\SMART\【控制】UI框架(通用)\Demo\bin\Release\数据引用\基础矢量\行政区划\面\县级行政区域_面.shp";

            _vectorHostLayer.AddData(fname, null);
            _canvas.Refresh(enumRefreshType.All);
        }