virtual public async void Choice() { TInfo.Text = ""; TInfo.MediaSource = null; TInfo.QuestionContentType = QuestionContentType.Text; TInfo.Sound = false; foreach (var item in _data.Players) { item.State = PlayerState.None; } var select = false; lock (_data.ChoiceLock) { lock (TInfo.RoundInfoLock) { if (_data.ThemeIndex > -1 && _data.ThemeIndex < TInfo.RoundInfo.Count && _data.QuestionIndex > -1 && _data.QuestionIndex < TInfo.RoundInfo[_data.ThemeIndex].Questions.Count) { select = true; } } } if (!select) { return; } try { await TInfo.PlaySimpleSelectionAsync(_data.ThemeIndex, _data.QuestionIndex); } catch (Exception exc) { _viewerActions.Client.CurrentServer.OnError(exc, false); } }
public void PlaySimpleSelection(int theme, int quest) => TInfo.PlaySimpleSelectionAsync(theme, quest);