private void Txt_userSuitcase_TextChanged(object sender, EventArgs e) { if (!_runTextHandler) { return; } string text = txt_userSuitcase.Text; int suitcase = -1; if (!String.IsNullOrEmpty(text)) { try { if (text.Length != 4) { return; } suitcase = SH2Exe.GetSuitcaseCodeIndex(text); if (suitcase == -1) { return; } } catch { return; } } StopPreviousUpdate(); _currentInputs.suitcase = suitcase; UpdateResultList(); }
private void Bgw_listUpdate_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker worker = sender as BackgroundWorker; SH2Exe.SimulateRandomInitialisedFrom(_currentInputs, _settings, _resultsStack, worker); }