public void CancelThreads() { if (sortingthread != null) { sortingthread.Cancel(); sortingthread = null; } }
void SortResources() { sortticket++; CancelThreads(); if (sc == ResourceViewManager.SortColumn.Name) { if (Helper.WindowsRegistry.AsynchronSort) { SimPe.Wait.SubStart(names.Count); } SimPe.Wait.Message = SimPe.Localization.GetString("Loading embedded resource names..."); sortingthread = new ResoureNameSorter(this, names, sortticket); } else { SignalFinishedSort(sortticket); } }