private void OnHashWorkerDoWork(object sender, DoWorkEventArgs e)
{
while (hashFileList.Count > 0 && isHashing)
{
if (m_HashWorker.CancellationPending)
{
e.Cancel = true;
return;
}
HashItem thisItem = hashFileList[0],
_temp = m_aniDBAPI.ed2kHash(thisItem);
if (isHashing && _temp != null) // if we did not abort remove item from queue and process
{
Dispatcher.BeginInvoke(new Action<HashItem>(FinishHash), _temp);
removeRowFromHashTable(hashFileList[hashFileList.IndexOf(thisItem)]);
}
}
}