private void FillSubDirectory(DirectoryInfo di)
{
IWorkspaceFactory theWSFact;
IWorkspace theWS;
IFeatureWorkspace theFWS;
IFeatureClass theFClass;
int FCount;
try
{
foreach (DirectoryInfo iDir in di.GetDirectories())
{
FillSubDirectory(iDir);
}
foreach (FileInfo theFile in di.GetFiles("*.mdb"))
{
theWSFact = new AccessWorkspaceFactoryClass();
theWS = theWSFact.OpenFromFile(theFile.FullName, 0);
theFWS = (IFeatureWorkspace)theWS;
String[] theSrcNames = GeoDbProcs.GetFeatureClassNames(srcWrkSpc);
foreach (String theSrcName in theSrcNames)
{
theFClass = theFWS.OpenFeatureClass(theSrcName);
lbSource.Items.Add(new FeatureData(theSrcName, theFClass));
Application.DoEvents();
}
}
}
catch { }
}