private void HandleUserLoaded(object sender, EventArgs e) { IsLoading = false; mainThread.Enqueue(() => OnLoadedCallback?.Invoke()); if (AutoPlayAfterLoaded && !loadingAfterPlay) { Play(); } loadingAfterPlay = false; }
public void LoadSync(OnLoadedCallback onLoadedCallback) { _random = new Random(DateTime.Now.Millisecond); string[] lines = Regex.Split(file.text, "[\r\n]+"); foreach (string word in lines) { AddCountWordLength(word); AddGetFirstLetter(word); AddQwerty5Word(word); } onLoadedCallback?.Invoke(); }