public void FakeDoit(IEnumerable<int> itemsToChange, int tagFakeFlid, int tagEnable, ProgressState state)
{
CheckDisposed();
ITsString tss = TsStringUtils.MakeTss(m_selectedLabel, m_cache.DefaultAnalWs);
// Build a Set of parts of speech that can take this class.
Set<int> possiblePOS = GetPossiblePartsOfSpeech();
int i = 0;
// Report progress 50 times or every 100 items, whichever is more (but no more than once per item!)
int interval = Math.Min(100, Math.Max(itemsToChange.Count() / 50, 1));
foreach (int hvo in itemsToChange)
{
i++;
if (i % interval == 0)
{
state.PercentDone = i * 100 / itemsToChange.Count();
state.Breath();
}
bool fEnable = IsItemEligible(m_sda, hvo, possiblePOS);
if (fEnable)
m_sda.SetString(hvo, tagFakeFlid, tss);
m_sda.SetInt(hvo, tagEnable, (fEnable ? 1 : 0));
}
}