Пример #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
 public void CancelRequestAccessDialog()
 {
     if (CurrentDialog != null && CurrentDialog.DialogShown)
     {
         MpDialog diag = CurrentDialog.Dialog;
         if (diag.AvailableActions.Contains("cancel"))
         {
             MessageDialogAction action = new MessageDialogAction()
             {
                 ActionType = "cancel", DialogId = diag.DialogId, DialogType = diag.DialogType
             };
             SendCommand(action);
         }
     }
 }
Пример #3
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;
            }
        }