private void 属性查询ToolStripMenuItem_Click(object sender, EventArgs e) { //新创建属性查询窗体 FormQueryByAttribute formQueryByAttribute = new FormQueryByAttribute(); //将当前主窗体中MapControl控件中的Map对象赋值给FormQueryByAttribute窗体的CurrentMap属性 formQueryByAttribute.CurrentMap = axMapControl1.Map; //显示属性查询窗体 formQueryByAttribute.Show(); }
//属性查询菜单项点击事件响应函数 private void queryAttributeMenuItem1_Click(object sender, EventArgs e) { //新建属性查询窗体 FormQueryByAttribute formQueryByAttribute = new FormQueryByAttribute(); //地图作为参数传入到窗体中 formQueryByAttribute.CurrentMap = axMapControl1.Map; //显示窗体 formQueryByAttribute.Show(); }