Пример #1
0
        public CrearReclamoPage()
        {
            InitializeComponent();

            stackMultimediaCausa.page = this;
            tapCurrent = new TapGestureRecognizer();

#if __IOS__
            tapCurrent.Tapped += async(object sender, EventArgs e) => { await map.GetCurrent(); };
#endif
#if __ANDROID__
            tapCurrent.Tapped += (sender, e) => { map.OnGetCurrentEvent(sender, e); };
#endif
            imgCurrent.GestureRecognizers.Add(tapCurrent);


            tapEnviar         = new TapGestureRecognizer();
            tapEnviar.Tapped += TapEnviar_Tapped;

            stkEnviar.GestureRecognizers.Add(tapEnviar);

            editorDescription.TextChanged += EditorDescription_TextChanged;
            txtTitulo.TextChanged         += Titulo_TextChanged;

            _reclamoService = new ReclamoService();
            stackMultimediaCausa.pageCrear = this;

            txtTelefono.TextChanged += GlobalHelpers.OnEntryTextChanged;
        }
Пример #2
0
        ///imagen_reclamo_compartir
        async Task LoadImagenCompartir()
        {
            await Task.Run(async() =>
            {
                var data = await ReclamoService.GetImagenParaCompartir(imagenAntes, imagenDespues);

                var datos = await ReclamoService.GetImagenParaCompartirData(imagenAntes, imagenDespues, data);

                Console.WriteLine("OK Imagen");
                Device.BeginInvokeOnMainThread(() =>
                {
                    if (data != null)
                    {
                        //imagenCompartir = data;
                        imagenCompartir = datos;
                    }

                    if (!String.IsNullOrEmpty(imagenCompartir))
                    {
                        if (CrossShare.IsSupported)
                        {
                            CrossShare.Current.Share(new ShareMessage
                            {
                                Text = reclamo.mensajeCompartir,
                                Url  = imagenCompartir
                            },
                                                     new ShareOptions
                            {
                                ChooserTitle            = null,
                                ExcludedUIActivityTypes = new[] {
                                    ShareUIActivityType.AirDrop,
                                    //ShareUIActivityType.Mail,
                                    ShareUIActivityType.OpenInIBooks,
                                    //ShareUIActivityType.PostToWeibo,
                                    ShareUIActivityType.PostToFlickr,
                                    ShareUIActivityType.CopyToPasteboard,
                                    //ShareUIActivityType.PostToTencentWeibo,
                                    //ShareUIActivityType.PostToVimeo,
                                    ShareUIActivityType.Print,
                                    //ShareUIActivityType.SaveToCameraRoll,
                                    ShareUIActivityType.AddToReadingList
                                }
                            });                        //new share options
                        }
                    }
                    Loading(false);
                });
            });
        }