首页 / 浏览问题 / 组件GIS / 问题详情
c#如何加载udbx类型的文件
3EXP 2021年02月24日
操作系统:win10;使用产品:supermap-iobjects  10.1

数据类型:udbx

初次接触supermap组件开发,不知道怎么加载udbx数据

1个回答

安装目录\SampleCode\Data\DatasourceManage\DatasourceManage.csproj

参考产品包中的示例代码:其中数据引擎改为udbx即可
4,620EXP 2021年02月24日

感谢,那请问怎么给workspaceTree1的不同节点添加不同的右键菜单呢,大佬heart

解决了,不过我是判断的workspacetree右键,方法比较笨,这是代码

 if (e.Button == MouseButtons.Right)
            {
                try
                {
                    if (workspaceTree1.SelectedNode.Parent == null)
                        return;
                    if (workspaceTree1.SelectedNode.Parent.Parent == null)
                        return;
                    #region
                    //String strText = workspaceTree1.SelectedNode.Text;
                    //switch (strText)
                    //{
                    //    //case "未命名工作空间":
                    //    case "数据源":
                    //    case "地图":
                    //    case "布局":
                    //    case "场景":
                    //    case "资源":
                    //        workspaceTree1.ContextMenuStrip = null;
                    //        return;
                    //    default:
                    //        break;
                    //}
                    #endregion
                    if (workspaceTree1.SelectedNode.Parent.Text == "数据源")
                        workspaceTree1.ContextMenuStrip = this.contextMenuStripDS;
                    else if (workspaceTree1.SelectedNode.Parent.Parent.Text == "数据源")
                        workspaceTree1.ContextMenuStrip = this.contextMenuStripDT;
                }
                catch (Exception)
                {
                }
            }

是什么好的方法吗,求大佬告知,万分感谢
...