Exemplo n.º 1
0
        private void OnBatchDeleteXmlRPCCompleted(object sender, XMLRPCCompletedEventArgs <Comment> args)
        {
            DeleteCommentsRPC rpc = sender as DeleteCommentsRPC;

            rpc.Completed -= OnBatchDeleteXmlRPCCompleted;

            ApplicationBar.IsVisible = true;
            App.WaitIndicationService.HideIndicator();

            UpdateDisplay();
        }
Exemplo n.º 2
0
        private void BatchDeleteComments(IList comments)
        {
            if (null == comments || 0 == comments.Count)
            {
                return;
            }

            string           comment_label = (1 == comments.Count) ? _localizedStrings.Prompts.Comment : _localizedStrings.Prompts.Comments;
            string           prompt        = string.Format(_localizedStrings.Prompts.ConfirmDeleteCommentsFormat, comments.Count, comment_label);
            MessageBoxResult result        = MessageBox.Show(prompt, _localizedStrings.Prompts.Confirm, MessageBoxButton.OKCancel);

            if (result == MessageBoxResult.OK)
            {
                DeleteCommentsRPC rpc = new DeleteCommentsRPC();
                rpc.Comments   = ConvertList(comments);
                rpc.Completed += OnBatchDeleteXmlRPCCompleted;
                rpc.ExecuteAsync();

                ApplicationBar.IsVisible = false; //hide the application bar
                App.WaitIndicationService.ShowIndicator(_localizedStrings.Messages.DeletingComments);
            }
        }