private void addShapeToMap()
{
string[] filename;
int index = 0;
DirectoryInfo directory = new DirectoryInfo(strPath);
FileInfo[] files = directory.GetFiles();
filename = new string[files.Length];
foreach (FileInfo file in files)
{
filename[index] = file.Name;
index++;
}
if (strPath != "")
{
IFeatureLayer pfeatlyr;
for (int i = 0; i < filename.Length; i++)
{
int loc = filename[i].LastIndexOf(".");
string strTemp = filename[i].Substring(loc);
if (strTemp == ".shp") {
pfeatlyr = m_MapFun.GetFeatLayerFrom(strPath, filename[i]);
pfeatlyr.Name = filename[i].Substring(0, filename[i].Length - loc-1);
m_AxMapContrl.AddLayer(pfeatlyr);
}
}
}
}