private void LanguagePickerCell_OnTapped(object sender, EventArgs e) { if (!(Device.RuntimePlatform == Device.UWP && Device.Idiom == TargetIdiom.Desktop)) { Device.BeginInvokeOnMainThread(() => { LanguagePicker.Focus(); }); } }
protected override async void OnAppearing() { _connection = DependencyService.Get <ISQLiteDb>().GetConnection(); await _connection.CreateTableAsync <Saved_Settings>(); var LoadNumbers = new Saved_Settings(); try { LoadNumbers = await _connection.GetAsync <Saved_Settings>(1); } catch (Exception) { Global.LanguagePickerIndex = 0; LanguagePicker.Focus(); var DefaultNumbers = new Saved_Settings() { StaticId = 1, Saved_Quantity = 10, Saved_Time = 90, LanguageId = Global.LanguageSelectedID, DownloadImages = true, }; await _connection.InsertOrReplaceAsync(DefaultNumbers); } LoadNumbers = await _connection.GetAsync <Saved_Settings>(1); Global.QuestionQuantity = LoadNumbers.Saved_Quantity; Global.CountDownTime = LoadNumbers.Saved_Time; Global.LanguageSelectedID = LoadNumbers.LanguageId; Global.DownloadImages = LoadNumbers.DownloadImages; enableButtons(); setLanguage(); MessagingCenter.Send(this, Global.LanguageSelectedID.ToString()); //set double tap to exit toaster message language MessagingCenter.Send(this, "CanExit"); //enable double tap to exit base.OnAppearing(); }
private void TapGestureRecognizer_Tapped(object sender, EventArgs e) { LanguagePicker.Focus(); }
private void OnLanguagePickerClicked(object sender, EventArgs args) { LanguagePicker.Focus(); }