private void Search() { generator.InitialFrame = minFrame; generator.MaxResults = maxFrame; for (uint hour = minHour; hour <= maxHour; ++hour) { for (uint minute = minMinute; minute <= maxMinute; ++minute) { waitHandle.WaitOne(); DateTime time = seedDate.AddHours(hour).AddMinutes(minute); uint seed = Functions.CalculateSeedGen3(time); generator.InitialSeed = seed; List <Frame> frames = generator.Generate(frameCompare, id, sid); progressSearched += maxFrame; progressFound += (ulong)frames.Count; progressTotal += (ulong)frames.Count * maxFrame; lock (threadLock) { foreach (Frame frame in frames) { frame.DisplayPrep(); captureFrames.Add(new Gen3CapFrame(frame, hour, minute)); } } refreshQueue = true; } } }