Exemplo n.º 1
0
        private async void LinearBlock2OnClick(object sender, EventArgs e)
        {
            try
            {
                if (Methods.CheckConnectivity())
                {
                    Toast.MakeText(Context, Context.GetText(Resource.String.Lbl_Blocked_successfully), ToastLength.Long).Show();

                    var(apiStatus, respond) = await RequestsAsync.Global.BlockUnBlockUserAsync(IdChannel).ConfigureAwait(false);

                    if (apiStatus != 200)
                    {
                        Methods.DisplayReportResult(Activity, respond);
                    }

                    GlobalContext.FragmentNavigatorBack();
                }
                else
                {
                    Toast.MakeText(Context, Context.GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short).Show();
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
Exemplo n.º 2
0
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Android.Resource.Id.Home:
                try
                {
                    GlobalContext.FragmentNavigatorBack();
                }
                catch (Exception exception)
                {
                    Console.WriteLine(exception);
                }

                return(true);
            }
            return(base.OnOptionsItemSelected(item));
        }