예제 #1
0
        private void SaveButtonOnClick(object sender, EventArgs eventArgs)
        {
            ViewModel.QuestViewModel.Title       = TitleEditText.Text;
            ViewModel.QuestViewModel.Description = DescriptionEditText.Text;

            ClarifiedResponse <int> validationResult = ViewModel.Validate();

            if (validationResult.IsSuccessful)
            {
                ViewModel.Action();
                this.Activity.SetResult(Result.Ok);
                this.Activity.Finish();
            }
            else
            {
                ValidationErrorsFragment errorsFragment = ValidationErrorsFragment.NewInstance(validationResult.Errors);
                errorsFragment.Show(FragmentManager, ValidationErrorsId);
            }
        }