예제 #1
0
        private async void GetEmails(string email)
        {
            emails = await EmailReader.Instance().GetEmailMessagesBySenderAsync(email);

            // Bind emails to ListView
            if (emails != null)
            {
                mailListView.DataContext = emails;
            }
            else
            {
                await Alert.Error("No emails found");
            }
        }
예제 #2
0
        private async void LoginButton_Click(object sender, RoutedEventArgs e)
        {
            // Show loading spinner
            VisualStateManager.GoToState(this, "LoadingState", false);

            // Initiate login popup
            var result = await EmailReader.Instance().AuthenticateOutlookClientAsync("Mail");

            if (result)
            {
                groupEmails = await EmailReader.Instance().GroupEmailsBySenderAsync();

                UpdateView();
            }
            else
            {
                await Alert.Error("Opps, could not signin. Please try again");
            }
        }