Exemplo n.º 1
0
 private void ShowCommentComposer(int line)
 {
     var composer = new MarkdownComposerViewController();
     composer.NewComment(this, async (text) => {
         try
         {
             await composer.DoWorkAsync("Commenting...", () => ViewModel.PostComment(text, line));
             composer.CloseComposer();
         }
         catch (Exception e)
         {
             AlertDialogService.ShowAlert("Unable to Comment", e.Message);
             composer.EnableSendButton = true;
         }
     });
 }
Exemplo n.º 2
0
        void AddCommentTapped()
        {
            var composer = new MarkdownComposerViewController();
			composer.NewComment(this, async (text) => {
                try
                {
					await composer.DoWorkAsync("Commenting...".t(), () => ViewModel.AddComment(text));
					composer.CloseComposer();
                }
                catch (Exception e)
                {
					MonoTouch.Utilities.ShowAlert("Unable to post comment!", e.Message);
                }
                finally
                {
                    composer.EnableSendButton = true;
                }
            });
        }