void solutionWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) { if (isCanceling || _stopReporting) { return; } progressBar.Value = e.ProgressPercentage; lblProgressText.Content = e.ProgressPercentage.ToString() + "/" + maxSteps; bestSoFar = (HashSet <ushort>)(e.UserState); lblBestResult.Content = string.Format(L10n.Plural("Best result so far: {0} additional point spent", "Best result so far: {0} additional points spent", (uint)bestSoFar.Count), bestSoFar.Count); tree.HighlightedNodes = new HashSet <ushort>(bestSoFar.Concat(tree.SkilledNodes)); tree.DrawNodeBaseSurroundHighlight(); }
void solutionWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) { progressBar.Value = e.ProgressPercentage; lblProgressText.Content = e.ProgressPercentage.ToString() + "/" + maxSteps; bestSoFar = (HashSet <ushort>)(e.UserState); lblBestResult.Content = "Best result so far: " + bestSoFar.Count + " additional points spent."; tree.HighlightedNodes = new HashSet <ushort>(bestSoFar.Concat(tree.SkilledNodes)); tree.DrawNodeBaseSurroundHighlight(); }