private async void DownloadQuestionsButton_Tap(object sender, System.Windows.Input.GestureEventArgs e) { if (DeviceOpStatus.IsInternetConnected() == true) { progressIndicator = new ProgressIndicator(); progressIndicator.IsVisible = true; progressIndicator.Text = "Λήψη Ερωτήσεων. Παρακαλώ περιμένετε..."; progressIndicator.IsIndeterminate = true; SystemTray.SetProgressIndicator(this, progressIndicator); try { if (await QuestionsService.UpdateQuestions() == true) { MessageBox.Show("Επιτυχής λήψη νέων ερωτήσεων"); QuestionsCountText.Text = "Σύνολο ερωτήσεων " + QuestionsService.CountQuestions().ToString(); } else { MessageBox.Show("Δεν βρέθηκαν νέες ερωτήσεις"); } } catch (Exception exp) { MessageBox.Show("Σφάλμα κατα τον συγχρονισμό. Παρακαλώ δοκιμάστε αργότερα"); } progressIndicator.IsVisible = false; progressIndicator.IsIndeterminate = false; } else { MessageBox.Show("Δεν βρέθηκε σύνδεση στο ίντερνετ. Παρακαλώ δοκιμάστε αργότερα"); } }
public SettingsPage() { InitializeComponent(); GetSoundSettings(); GetUpdateSettings(); QuestionsCountText.Text = "Σύνολο ερωτήσεων " + QuestionsService.CountQuestions().ToString(); }