private ImageSource addToDic(string fileName, IconSize size)
{
string key = returnKey(fileName, size);
if (size == IconSize.thumbnail || isExecutable(fileName))
{
if (!thumbDic.ContainsKey(key))
lock (thumbDic)
thumbDic.Add(key, getImage(fileName, size));
return thumbDic[key];
}
else
{
if (!iconDic.ContainsKey(key))
lock (iconDic)
iconDic.Add(key, getImage(fileName, size));
return iconDic[key];
}
}