コード例 #1
0
ファイル: InfCMFragment.cs プロジェクト: jhondiaz/Poraka
        public override void OnViewCreated(View view, Bundle savedInstanceState)
        {
            Product = _DatosUser.GetDatosProduct ();

            var ImgPro = view.FindViewById<ImageView> (Resource.Id.ImgPro);
            var TxtProduct = view.FindViewById<TextView> (Resource.Id.TxtProduct);
            var TxtSale = view.FindViewById<TextView> (Resource.Id.TxtSale);
            var TxtLike = view.FindViewById<TextView> (Resource.Id.TxtLike);

            TxtProduct.Text = Product.Name;
            TxtSale.Text = Product.Sales.ToString();
            TxtLike.Text = Product.LikeValue.ToString();

            var TxtCelular = view.FindViewById<TextView> (Resource.Id.TxtCelular);

            var BtnCall = view.FindViewById<Button> (Resource.Id.BtnCall);

            var BtnNavegar = view.FindViewById<Button> (Resource.Id.BtnNavegar);

            TxtCelular.Click += (sender, e) => {
                Intent intent = new Intent (Intent.ActionCall, Android.Net.Uri.Parse ("tel:962849347"));
                this.Activity.StartActivity (intent);

            };

            BtnCall.Click += (sender, e) => {

                Intent intent = new Intent (Intent.ActionCall, Android.Net.Uri.Parse ("tel:962849347"));
                this.Activity.StartActivity (intent);

            };

            BtnNavegar.Click += (sender, e) => {

                var geo = string.Format ("google.navigation:q={0},{1}", "4.614102669338081", "-74.12763388903807");

                Intent intent = new Intent (Intent.ActionView, Android.Net.Uri.Parse (geo));
                this.Activity.StartActivity (intent);

            //				Intent i = new Intent(Intent.ActionView,Android.Net.Uri.Parse("geo:37.827500,-122.481670"));
            //				i.SetClassName("com.google.android.apps.maps","com.google.android.maps.MapsActivity");
            //				this.Activity.StartActivity(i);

            };

            if (!string.IsNullOrEmpty (Product.UrlImg)) {

                var img = new DownloadAsync ();
                img.DownloadHistory (ImgPro,Product.UrlImg);

            }

            base.OnViewCreated (view, savedInstanceState);
        }
コード例 #2
0
ファイル: SubastaFragment.cs プロジェクト: jhondiaz/Poraka
        public override void OnViewCreated(View view, Bundle savedInstanceState)
        {
            Product = _DatosUser.GetDatosProduct ();

            var BtnPrecios = view.FindViewById<Button> (Resource.Id.ImgVPro);

            ImgPro = view.FindViewById<ImageView> (Resource.Id.ImgPro);
            TxtProduct = view.FindViewById<TextView> (Resource.Id.TxtProduct);
            var TxtSale = view.FindViewById<TextView> (Resource.Id.TxtSale);
            var TxtLike = view.FindViewById<TextView> (Resource.Id.TxtLike);

            ListVOfertas = view.FindViewById<ListView> (Resource.Id.ListVOfertas);

            ListVOfertas.ItemClick+= (sender, e) => {
                ConfirCompra();

            };

            TxtProduct.Text = Product.Name;
            TxtSale.Text = Product.Sales.ToString();
            TxtLike.Text = Product.LikeValue.ToString();
            LoadDatos ();
            base.OnViewCreated (view, savedInstanceState);
        }
コード例 #3
0
ファイル: DatosUser.cs プロジェクト: jhondiaz/Poraka
 public void SetDatosProduct(Products datos)
 {
     SharedPreferencesEditor.PutString (PackageName + "Products", JsonConvert.SerializeObject (datos));
     SharedPreferencesEditor.Commit ();
 }