예제 #1
0
        public static void logout(object sender, object e)
        {
            token    = null;
            loggedIn = false;

            MessageDialogAction msg = new MessageDialogAction();

            msg.Title   = "You successfully logged out!";
            msg.Content = "Please login if you want to use the application!";
            msg.Execute(sender, e);
        }
예제 #2
0
        private async void searchButton_Click(object sender, RoutedEventArgs e)
        {
            if (keywordField.Text.Length > 0)
            {
                await ViewModel.getSearchedResults(keywordField.Text);
            }
            else
            {
                return;
            }

            if (ViewModel.SearchResult.Count < 1)
            {
                MessageDialogAction msg = new MessageDialogAction();
                msg.Title   = "Not found!";
                msg.Content = "There is no matching user with keyword \'" + keywordField.Text + "\'";
                msg.Execute(sender, e);
            }
            else
            {
                searchListView.ItemsSource = ViewModel.SearchResult;
            }
        }