public override DataSourceCategoryNode[] MakeDataSourceNode(System.IO.DirectoryInfo dir) { System.IO.FileInfo[] files = dir.GetFiles(m_strFilter); if (null == files || files.Length == 0) { return(null); } GeoStar.Kernel.ConnectProperty conn = new GeoStar.Kernel.ConnectProperty(); conn.Server = dir.FullName; GeoStar.Kernel.GeoDatabase gdb = m_Fac.Open(conn); if (null == gdb) { return(null); } List <DataSourceCategoryNode> vList = new List <DataSourceCategoryNode>(); foreach (var item in gdb.EnumDataRoomName(GeoStar.Kernel.DataRoomType.eFeatureClassType)) { GeoStar.Kernel.FeatureClass vFeaClass = gdb.OpenDataRoom(GeoStar.Kernel.DataRoomType.eFeatureClassType, item) as GeoStar.Kernel.FeatureClass; vList.Add(new GeoStarFeatureClassDataSource(vFeaClass)); } return(vList.ToArray()); }
protected override void OnExpand() { Dictionary <string, bool> vExist = new Dictionary <string, bool>(); foreach (var item in m_GDB.EnumDataRoomName(GeoStar.Kernel.DataRoomType.eFeatureClassType)) { GeoStar.Kernel.FeatureClass vFeaClass = m_GDB.OpenDataRoom(GeoStar.Kernel.DataRoomType.eFeatureClassType, item) as GeoStar.Kernel.FeatureClass; if (null == vFeaClass) { continue; } vExist[item] = true; if (!Node.Nodes.ContainsKey(item)) { CategoryNode vNode = new GeoStarFeatureClassDataSource(vFeaClass); AppendNode(vNode.Node); } } RemoveDeletedNode(vExist); }
public override DataSourceCategoryNode[] MakeDataSourceNode(System.IO.DirectoryInfo dir) { List <DataSourceCategoryNode> vList = new List <DataSourceCategoryNode>(); if (!ExistRaster(dir)) { return(vList.ToArray()); } GeoStar.Kernel.ConnectProperty conn = new GeoStar.Kernel.ConnectProperty(); conn.Server = dir.FullName; GeoStar.Kernel.GeoDatabase gdb = m_Fac.Open(conn); foreach (var item in gdb.EnumDataRoomName(GeoStar.Kernel.DataRoomType.eRasterClassType)) { GeoStar.Kernel.RasterClass c = gdb.OpenDataRoom(GeoStar.Kernel.DataRoomType.eRasterClassType, item) as GeoStar.Kernel.RasterClass; if (null == c) { continue; } vList.Add(new GeoStarRasterClassDataSource(c)); } return(vList.ToArray()); }