/// <summary> /// Need another function because Xamarin generates an Invalid IL if used inline above /// </summary> private async Task CommitThis(EditSourceViewModel viewModel, LiteComposer composer, string content, string message) { try { await this.DoWorkAsync("Commiting...", () => viewModel.Commit(content, message)); NavigationController.DismissViewController(true, null); } catch (Exception ex) { AlertDialogService.ShowAlert("Error", ex.Message); composer.EnableSendButton = true; } }
public EditSourceView() { ViewModel = new EditSourceViewModel(); EdgesForExtendedLayout = UIRectEdge.None; Title = "Edit"; _textView = new UITextView { Font = UIFont.FromName("Courier", UIFont.PreferredBody.PointSize), SpellCheckingType = UITextSpellCheckingType.No, AutocorrectionType = UITextAutocorrectionType.No, AutocapitalizationType = UITextAutocapitalizationType.None, AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight }; }