Пример #1
0
        public override async void ViewDidLoad()
        {
            base.ViewDidLoad();
            ScrollViewMeeting.ContentSize = new CoreGraphics.CGSize(0, View.Frame.Height + 100);
            buttonMeetingSend.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);
            this.View.AddGestureRecognizer(new UITapGestureRecognizer(tap =>
            {
                View.EndEditing(true);
            })
            {
                NumberOfTapsRequired = 1
            });
            IsInternetConnectionAvailable = SharedFunctions.CheckInternetConnection();
            if (IsInternetConnectionAvailable == true)
            {
                try
                {
                    var bounds = UIScreen.MainScreen.Bounds;
                    loadingIndicator = new LoadingIndicator(bounds, "Cargando contenido...");
                    View.Add(loadingIndicator);
                    await Task.Delay(10);

                    iOSFunctions.LoadUILabelText(UILabelMeetingTitle, "SOLICITAR CITA");
                    Constants        constants      = new Constants();
                    List <Proyectos> listaProyectos = service.HttpGet <List <Proyectos> >(constants.Url, constants.ProyectoController, constants.ProyectoMethod, string.Empty);
                    ServiceLines.Add("Seleccionar opción");
                    if (listaProyectos != null && listaProyectos.Count > 0)
                    {
                        foreach (var item in listaProyectos)
                        {
                            ServiceLines.Add(item.Nombre);
                        }
                    }
                    else
                    {
                        throw new Exception("No se encontraron registros.");
                    }
                    var picker = new UIPickerViewServiceLinesModel(ServiceLines);
                    pickerViewMeetingServiceLiness.Model = picker;
                    picker.ValueChanged += (sender, e) =>
                    {
                        BusinessLine = picker.SelectedValue.ToString();
                    };
                    loadingIndicator.Hide();
                }
                catch (Exception ex)
                {
                    ExceptionAlert("Alerta", ex.Message);
                }
            }
            else
            {
                var okCancelAlertController = UIAlertController.Create("Alerta", "Por favor verifique su conexión a internet e intenta nuevamente", UIAlertControllerStyle.Alert);
                okCancelAlertController.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Cancel, alert => Environment.Exit(0)));
                PresentViewController(okCancelAlertController, true, null);
            }
        }
Пример #2
0
        private async void ButtonEventHandler(object sender, EventArgs e)
        {
            Constants constants = new Constants();

            if (sender == buttonMeetingSend)
            {
                if (SharedFunctions.IsEmptyOrNullString(textFieldMeetingUser.Text) == true || SharedFunctions.IsEmptyOrNullString(textFileldMeetingBusinessName.Text) == true || SharedFunctions.IsEmptyOrNullString(textFieldMeetingPhoneNumber.Text) == true || SharedFunctions.IsEmptyOrNullString(textFieldMeetingMessage.Text) == true)
                {
                    SimpleAlert("Notificación", "Debe completar los campos");
                }
                else if (BusinessLine == "Seleccionar opción" || BusinessLine == null)
                {
                    SimpleAlert("Notificación", "Debe seleccionar una línea de negocio");
                }
                else
                {
                    if (switchMeetingAcceptConditionState == true)
                    {
                        IsInternetConnectionAvailable = SharedFunctions.CheckInternetConnection();
                        if (IsInternetConnectionAvailable == true)
                        {
                            string MailState = string.Empty;
                            var    bounds    = UIScreen.MainScreen.Bounds;
                            loadingIndicator = new LoadingIndicator(bounds, "Enviando mensaje...");
                            View.Add(loadingIndicator);
                            await Task.Delay(100);

                            Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=06");
                            MailState = SharedFunctions.SendEmail("Solicitamos cita para: " + BusinessLine, "Favor agendar cita a nombre de:  " + textFieldMeetingUser.Text + Environment.NewLine + "Funcionario de la empresa: " + textFileldMeetingBusinessName.Text + Environment.NewLine + "Nos pueden contactar via Email: " + textFieldMeetingMail.Text + Environment.NewLine + "Teléfono: " + textFieldMeetingPhoneNumber.Text + Environment.NewLine + "Mensaje: " + textFieldMeetingMessage.Text + Environment.NewLine + Environment.NewLine, lineas.Email, lineas.EmailRemitente, lineas.Clave, lineas.Smtp);
                            loadingIndicator.Hide();
                            SimpleAlert("Notificación", MailState);
                            textFieldMeetingUser.Text          = "";
                            textFieldMeetingMail.Text          = "";
                            textFieldMeetingMessage.Text       = "";
                            textFieldMeetingPhoneNumber.Text   = "";
                            textFileldMeetingBusinessName.Text = "";
                        }
                        else
                        {
                        }
                    }
                    else
                    {
                        SimpleAlert("Notificación", "Antes de continuar debe aceptar las políticas de tratamiento de datos personales");
                    }
                }
            }
        }
Пример #3
0
        public override async void ViewDidLoad()
        {
            base.ViewDidLoad();
            System.Text.Encoding.GetEncoding(1252);
            ScrollViewAbout.ContentSize = new CGSize(0, View.Frame.Height + 1000);
            UIButtonPactiaCom.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);
            UIButtonContactSend.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);
            UIButtonAccepConditions.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);
            UIButtonCallUs.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);

            #region Gestures
            UITapGestureRecognizer UIViewBusiness0Tap = new UITapGestureRecognizer(() =>
            {
                VideoViewController viewController = this.Storyboard.InstantiateViewController("VideoViewControllerId") as VideoViewController;
                this.NavigationController.PushViewController(viewController, true);
            });
            UIImageViewPactiaVideo.UserInteractionEnabled = true;
            UIImageViewPactiaVideo.AddGestureRecognizer(UIViewBusiness0Tap);

            UITapGestureRecognizer UIViewFacebookTap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://www.facebook.com/pactiaoficial/");
            });
            UIImageViewFacebook.UserInteractionEnabled = true;
            UIImageViewFacebook.AddGestureRecognizer(UIViewFacebookTap);

            UITapGestureRecognizer UIViewInstagramTap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://www.instagram.com/pactiaoficial/");
            });
            UIImageViewInstagram.UserInteractionEnabled = true;
            UIImageViewInstagram.AddGestureRecognizer(UIViewInstagramTap);

            UITapGestureRecognizer UIViewLinkedlnTap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://www.linkedin.com/company/pactia");
            });
            UIImageViewLinkedln.UserInteractionEnabled = true;
            UIImageViewLinkedln.AddGestureRecognizer(UIViewLinkedlnTap);

            UITapGestureRecognizer UIViewYoutubeTap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://www.youtube.com/channel/UCFH_l8cOLR-1FiS021ena2Q");
            });
            UIImageViewYoutube.UserInteractionEnabled = true;
            UIImageViewYoutube.AddGestureRecognizer(UIViewYoutubeTap);

            UITapGestureRecognizer UIViewBusiness2Tap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/comercio/");
            });
            UIViewBusiness2.UserInteractionEnabled = true;
            UIViewBusiness2.AddGestureRecognizer(UIViewBusiness2Tap);

            UITapGestureRecognizer UIViewBusiness3Tap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/oficinas/");
            });
            UIViewBusiness3.UserInteractionEnabled = true;
            UIViewBusiness3.AddGestureRecognizer(UIViewBusiness3Tap);
            UITapGestureRecognizer UIViewBusiness4Tap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/autoalmacenamiento/");
            });
            UIViewBusiness4.UserInteractionEnabled = true;
            UIViewBusiness4.AddGestureRecognizer(UIViewBusiness4Tap);
            UITapGestureRecognizer UIViewBusiness5Tap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/hoteles/");
            });
            UIViewBusiness5.UserInteractionEnabled = true;
            UIViewBusiness5.AddGestureRecognizer(UIViewBusiness5Tap);
            UITapGestureRecognizer UIViewBusiness6Tap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/multifamily/");
            });
            UIViewBusiness6.UserInteractionEnabled = true;
            UIViewBusiness6.AddGestureRecognizer(UIViewBusiness6Tap);

            UITapGestureRecognizer UIViewBusiness7Tap = new UITapGestureRecognizer(() =>
            {
                BusinessLineContectViewController viewController = this.Storyboard.InstantiateViewController("BusinessLineContectViewControllerId") as BusinessLineContectViewController;
                viewController.BusinessName = "Logistica";
                viewController.Latitude     = "4.760737";
                viewController.Longitude    = "-74.165095";
                this.NavigationController.PushViewController(viewController, true);
            });
            UIViewBusiness1.UserInteractionEnabled = true;
            UIViewBusiness1.AddGestureRecognizer(UIViewBusiness7Tap);



            this.View.AddGestureRecognizer(new UITapGestureRecognizer(tap =>
            {
                View.EndEditing(true);
            })
            {
                NumberOfTapsRequired = 1
            });
            #endregion

            IsInternetConnectionAvailable = SharedFunctions.CheckInternetConnection();
            if (IsInternetConnectionAvailable == true)
            {
                try
                {
                    var bounds = UIScreen.MainScreen.Bounds;
                    loadingIndicator = new LoadingIndicator(bounds, "Cargando contenido...");
                    View.Add(loadingIndicator);
                    await Task.Delay(10);

                    LoadUILabelText(UILabelPactiaTitle, "CONÓCENOS");
                    UIImageViewPactiaVideo.Image = UIImage.FromFile("videobackground.jpg");

                    Galeria galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=01");
                    ImageService.Instance.LoadUrl(galeria.Url).Into(UIImageViewBusiness1);
                    Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
                    LoadUILabelText(UILabelBusiness1Title, lineas.Nombre);
                    LoadUILabelText(UILabelBusiness1Description, lineas.Texto2);
                    UIImageViewBusiness1Logo.Image = UIImage.FromFile("logikalogo.png");

                    galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=02");
                    ImageService.Instance.LoadUrl(galeria.Url).Into(UIImageViewBusiness2);
                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=02");
                    LoadUILabelText(UILabelBusiness2Title, lineas.Nombre);
                    LoadUILabelText(UILabelBusiness2Description, lineas.Texto2);
                    UIImageViewBusiness2Logo.Image = UIImage.FromFile("logogranplaza.png");

                    galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=03");
                    ImageService.Instance.LoadUrl(galeria.Url).Into(UIImageViewBusiness3);
                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=03");
                    LoadUILabelText(UILabelBusiness3Title, lineas.Nombre);
                    LoadUILabelText(UILabelBusiness3Description, lineas.Texto2);
                    UIImageViewBusiness3Logo.Image = UIImage.FromFile("burologo.png");

                    galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=77");
                    ImageService.Instance.LoadUrl(galeria.Url).Into(UIImageViewBusiness4);
                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=05");
                    LoadUILabelText(UILabelBusiness4Title, lineas.Nombre);
                    LoadUILabelText(UILabelBusiness4Description, lineas.Texto2);
                    UIImageViewBusiness4Logo.Image = UIImage.FromFile("ustoragelogo.png");

                    galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=04");
                    ImageService.Instance.LoadUrl(galeria.Url).Into(UIImageViewBusiness5);
                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=04");
                    LoadUILabelText(UILabelBusiness5Title, lineas.Nombre);
                    LoadUILabelText(UILabelBusiness5Description, lineas.Texto2);

                    galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=78");
                    ImageService.Instance.LoadUrl(galeria.Url).Into(UIImageViewBusiness6);
                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=07");
                    LoadUILabelText(UILabelBusiness6Title, lineas.Nombre);
                    LoadUILabelText(UILabelBusiness6Description, lineas.Texto2);
                    UIButtonPactiaCom.Hidden = false;

                    var Panama      = new MKPointAnnotation();
                    var PanamaCoord = new CLLocationCoordinate2D(9.131443, -79.681025);
                    Panama.Title      = "Panamá";
                    Panama.Coordinate = PanamaCoord;

                    var Colombia      = new MKPointAnnotation();
                    var ColombiaCoord = new CLLocationCoordinate2D(5.156853, -74.039258);
                    Colombia.Title      = "Colombia";
                    Colombia.Coordinate = ColombiaCoord;

                    var Usa      = new MKPointAnnotation();
                    var UsaCoord = new CLLocationCoordinate2D(40.343302, -102.066399);
                    Usa.Title      = "Estados Unidos";
                    Usa.Coordinate = UsaCoord;

                    MKPointAnnotation[] CoordArray = new MKPointAnnotation[3];
                    CoordArray[0] = Panama;
                    CoordArray[1] = Colombia;
                    CoordArray[2] = Usa;
                    MKMapViewAbout.AddAnnotations(CoordArray);

                    var locationCoordinate = new CLLocationCoordinate2D(25.688297, -100.324346);
                    var coordinateSpan     = new MKCoordinateSpan(50, 80);
                    var coordinateRegion   = new MKCoordinateRegion(locationCoordinate, coordinateSpan);
                    MKMapViewAbout.SetRegion(coordinateRegion, true);
                    loadingIndicator.Hide();
                }
                catch (Exception ex)
                {
                    ExceptionAlert("Alerta", ex.Message);
                }
            }
            else
            {
                var okCancelAlertController = UIAlertController.Create("Alerta", "Por favor verifique su conexión a internet e intenta nuevamente", UIAlertControllerStyle.Alert);
                okCancelAlertController.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Cancel, alert => Environment.Exit(0)));
                PresentViewController(okCancelAlertController, true, null);
            }
            float scrollViewHeight = 0.0f;
            float scrollViewWidth  = 0.0f;
            foreach (UIView view in ScrollViewAbout.Subviews)
            {
                scrollViewWidth  += (float)view.Frame.Size.Width;
                scrollViewHeight += (float)view.Frame.Size.Height;
            }
            ScrollViewAbout.ContentSize = new CGSize(0, scrollViewHeight + View.Frame.Height + 1500);
        }
Пример #4
0
        private async void ButtonEventHandler(object sender, EventArgs e)
        {
            if (sender == UIButtonPactiaCom)
            {
                iOSFunctions.OpenUrl(@"http://pactia.com");
            }
            else if (sender == UIButtonCallUs)
            {
                Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=06");
                iOSFunctions.CallPhone("tel:" + lineas.Telefono);
            }
            else if (sender == UIButtonAccepConditions)
            {
                iOSFunctions.OpenUrl(@"http://pactia.com/wp-content/uploads/2017/10/politica-proteccion_datos.pdf");
            }
            else if (sender == UIButtonContactSend)
            {
                if (SharedFunctions.IsEmptyOrNullString(UITextFileldContactEmail.Text) == true || SharedFunctions.IsEmptyOrNullString(UITextFieldContactUser.Text) == true || SharedFunctions.IsEmptyOrNullString(UITextFileldContactBusinessName.Text) == true || SharedFunctions.IsEmptyOrNullString(UITextFileldContactMessage.Text) == true || SharedFunctions.IsEmptyOrNullString(UITextFileldContactPhoneNumber.Text) == true)
                {
                    SimpleAlert("Notificación", "Debe completar los campos");
                }
                else
                {
                    if (SwitchContactAcceptConditionState == true)
                    {
                        IsInternetConnectionAvailable = SharedFunctions.CheckInternetConnection();
                        if (IsInternetConnectionAvailable == true)
                        {
                            try
                            {
                                string MailState = string.Empty;
                                var    bounds    = UIScreen.MainScreen.Bounds;
                                loadingIndicator = new LoadingIndicator(bounds, "Enviando mensaje...");
                                View.Add(loadingIndicator);
                                await Task.Delay(100);

                                Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=06");
                                MailState = SharedFunctions.SendEmail("Información sobre portafolio ", "Nombre:  " + UITextFieldContactUser.Text + Environment.NewLine + "Funcionario de la empresa: " + UITextFileldContactBusinessName.Text + Environment.NewLine + "Nos pueden contactar via Email: " + UITextFileldContactEmail.Text + Environment.NewLine + "Teléfono: " + UITextFileldContactPhoneNumber.Text + Environment.NewLine + "Mensaje: " + UITextFileldContactMessage.Text + Environment.NewLine + Environment.NewLine, lineas.Email, lineas.EmailRemitente, lineas.Clave, lineas.Smtp);
                                loadingIndicator.Hide();
                                SimpleAlert("Notificación", MailState);
                                UITextFieldContactUser.Text          = "";
                                UITextFileldContactBusinessName.Text = "";
                                UITextFileldContactMessage.Text      = "";
                                UITextFileldContactEmail.Text        = "";
                                UITextFileldContactPhoneNumber.Text  = "";
                            }
                            catch (Exception ex)
                            {
                                ExceptionAlert("Alerta", ex.Message);
                            }
                        }
                        else
                        {
                            SimpleAlert("Alerta", "Por favor verifique su conexión a internet e intenta nuevamente");
                        }
                    }
                    else
                    {
                        SimpleAlert("Notificación", "Antes de continuar debe aceptar las políticas de tratamiento de datos personales");
                    }
                }
            }
        }
Пример #5
0
        public async override void ViewDidLoad()
        {
            base.ViewDidLoad();
            buttonContactSend.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);
            this.View.AddGestureRecognizer(new UITapGestureRecognizer(tap =>
            {
                View.EndEditing(true);
            })
            {
                NumberOfTapsRequired = 1
            });
            IsInternetConnectionAvailable = SharedFunctions.CheckInternetConnection();
            if (IsInternetConnectionAvailable == true)
            {
                try
                {
                    var bounds = UIScreen.MainScreen.Bounds;
                    loadingIndicator = new LoadingIndicator(bounds, "Cargando contenido...");
                    View.Add(loadingIndicator);
                    await Task.Delay(10);

                    LoadUILabelText(UILabelContactTitle, "ESCRÍBENOS " + SubBusinessLine);
                    if (BusinessLine != string.Empty)
                    {
                        pickerViewContactServiceLines.UserInteractionEnabled = false;
                    }
                    else
                    {
                        constants = new Constants();
                        List <Proyectos> listaProyectos = service.HttpGet <List <Proyectos> >(constants.Url, constants.ProyectoController, constants.ProyectoMethod, string.Empty);
                        if (listaProyectos != null && listaProyectos.Count > 0)
                        {
                            foreach (var item in listaProyectos)
                            {
                                ServiceLines.Add(item.Nombre);
                            }
                        }
                        else
                        {
                            throw new Exception("No se encontraron registros");
                        }
                        var picker = new UIPickerViewServiceLinesModel(ServiceLines);
                        pickerViewContactServiceLines.Model = picker;
                        picker.ValueChanged += (sender, e) =>
                        {
                            BusinessLine = picker.SelectedValue.ToString();
                        };
                    }

                    loadingIndicator.Hide();
                }
                catch (Exception)
                {
                    var okCancelAlertController = UIAlertController.Create("Alerta", "El servicio no está disponible en el momento, intente de nuevo más tarde", UIAlertControllerStyle.Alert);
                    okCancelAlertController.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Cancel, alert => Environment.Exit(0)));
                    PresentViewController(okCancelAlertController, true, null);
                }
            }
            else
            {
                var okCancelAlertController = UIAlertController.Create("Alerta", "Por favor verifique su conexión a internet e intenta nuevamente", UIAlertControllerStyle.Alert);
                okCancelAlertController.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Cancel, alert => Environment.Exit(0)));
                PresentViewController(okCancelAlertController, true, null);
            }
        }
Пример #6
0
        public override async void ViewDidLoad()
        {
            base.ViewDidLoad();

            #region Gestures
            UITapGestureRecognizer UIViewBusiness1Tap = new UITapGestureRecognizer(() =>
            {
                try
                {
                    BusinessLineContectViewController viewController = this.Storyboard.InstantiateViewController("BusinessLineContectViewControllerId") as BusinessLineContectViewController;
                    viewController.BusinessName = "Logistica";
                    viewController.Latitude     = "4.760737";
                    viewController.Longitude    = "-74.165095";
                    this.NavigationController.PushViewController(viewController, true);
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                }
            });
            UIViewPortfolioBusiness1.UserInteractionEnabled = true;
            UIViewPortfolioBusiness1.AddGestureRecognizer(UIViewBusiness1Tap);

            UITapGestureRecognizer UIViewBusiness2Tap = new UITapGestureRecognizer(() =>
            {
                try
                {
                    iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/comercio/");
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                }
            });
            UIViewPortfolioBusiness2.UserInteractionEnabled = true;
            UIViewPortfolioBusiness2.AddGestureRecognizer(UIViewBusiness2Tap);

            UITapGestureRecognizer UIViewBusiness3Tap = new UITapGestureRecognizer(() =>
            {
                try
                {
                    iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/oficinas/");
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                }
            });
            UIViewPortfolioBusiness3.UserInteractionEnabled = true;
            UIViewPortfolioBusiness3.AddGestureRecognizer(UIViewBusiness3Tap);

            UITapGestureRecognizer UIViewBusiness4Tap = new UITapGestureRecognizer(() =>
            {
                try
                {
                    iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/autoalmacenamiento/");
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                }
            });
            UIViewPortfolioBusiness4.UserInteractionEnabled = true;
            UIViewPortfolioBusiness4.AddGestureRecognizer(UIViewBusiness4Tap);

            UITapGestureRecognizer UIViewBusiness5Tap = new UITapGestureRecognizer(() =>
            {
                try
                {
                    iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/hoteles/");
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                }
            });
            UIViewPortfolioBusiness5.UserInteractionEnabled = true;
            UIViewPortfolioBusiness5.AddGestureRecognizer(UIViewBusiness5Tap);

            UITapGestureRecognizer UIViewBusiness6Tap = new UITapGestureRecognizer(() =>
            {
                try
                {
                    iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/multifamily/");
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                }
            });
            UIViewPortfolioBusiness6.UserInteractionEnabled = true;
            UIViewPortfolioBusiness6.AddGestureRecognizer(UIViewBusiness6Tap);
            #endregion

            ScrollViewPortfolio.ContentSize = new CoreGraphics.CGSize(0, View.Frame.Height);
            IsInternetConnectionAvailable   = SharedFunctions.CheckInternetConnection();
            if (IsInternetConnectionAvailable == true)
            {
                Constants constants = new Constants();
                var       bounds    = UIScreen.MainScreen.Bounds;
                loadingIndicator = new LoadingIndicator(bounds, "Cargando contenido...");
                View.Add(loadingIndicator);
                await Task.Delay(10);

                try
                {
                    LoadUILabelText(UILabelPortfolioTitle, "PORTAFOLIO");
                    Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
                    LoadUILabelText(UILabelPortfolioBusinessTitle1, lineas.Nombre);
                    LoadUILabelText(UILabelPortfolioBusinessContent1, lineas.Texto2);

                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=02");
                    LoadUILabelText(UILabelPortfolioBusinessTitle2, lineas.Nombre);
                    LoadUILabelText(UILabelPortfolioBusinessContent2, lineas.Texto2);

                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=03");
                    LoadUILabelText(UILabelPortfolioBusinessTitle3, lineas.Nombre);
                    LoadUILabelText(UILabelPortfolioBusinessContent3, lineas.Texto2);

                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=05");
                    LoadUILabelText(UILabelPortfolioBusinessTitle4, lineas.Nombre);
                    LoadUILabelText(UILabelPortfolioBusinessContent4, lineas.Texto2);

                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=04");
                    LoadUILabelText(UILabelPortfolioBusinessTitle5, lineas.Nombre);
                    LoadUILabelText(UILabelPortfolioBusinessContent5, lineas.Texto2);

                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=07");
                    LoadUILabelText(UILabelPortfolioBusinessTitle6, lineas.Nombre);
                    LoadUILabelText(UILabelPortfolioBusinessContent6, lineas.Texto2);
                }
                catch (Exception)
                {
                    var okCancelAlertController = UIAlertController.Create("Alerta", "El servicio no está disponible en el momento, intente de nuevo mas tarde", UIAlertControllerStyle.Alert);
                    okCancelAlertController.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Cancel, alert => Environment.Exit(0)));
                    PresentViewController(okCancelAlertController, true, null);
                }
                loadingIndicator.Hide();
            }
            else
            {
                var okCancelAlertController = UIAlertController.Create("Alerta", "Por favor verifique su conexión a internet e intenta nuevamente", UIAlertControllerStyle.Alert);
                okCancelAlertController.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Cancel, alert => Environment.Exit(0)));
                PresentViewController(okCancelAlertController, true, null);
            }
        }
Пример #7
0
        public async override void ViewDidLoad()
        {
            base.ViewDidLoad();
            ScrollViewEvents.ContentSize = new CoreGraphics.CGSize(0, View.Frame.Height + 1800);
            buttonNewsEvent1Content.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);
            buttonNewsEvent2Content.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);
            buttonNewsEvent3Content.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);
            buttonNewsEvent4Content.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);
            buttonNewsEvent5Content.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);
            IsInternetConnectionAvailable = SharedFunctions.CheckInternetConnection();
            if (IsInternetConnectionAvailable == true)
            {
                var bounds = UIScreen.MainScreen.Bounds;
                loadingIndicator = new LoadingIndicator(bounds, "Cargando contenido...");
                View.Add(loadingIndicator);
                await Task.Delay(10);

                try
                {
                    Constants constants = new Constants();
                    LoadUILabelText(UILabelNewsTitle, "NOTICIAS");
                    Eventos eventos = service.HttpGet <Eventos>(constants.Url, constants.EventoController, constants.EventoMethod, "idEvent=1");

                    UILabelNewsEvent1Title.Text    = eventos.TituloEvento;
                    UILabelNewsEvent1Date.Text     = "Fecha: " + eventos.Fecha.ToString("dd-MM-yyyy");
                    UILabelNewsEvent1Content.Text  = eventos.Texto;
                    UILabelNewsEvent1Hour.Text     = "Hora: " + eventos.Hora.ToString("hh:mm");
                    UILabelNewsEvent1Location.Text = "Lugar: " + eventos.Direccion;
                    UILabelNewsEvent1City.Text     = "Ciudad: " + eventos.Ciudad.Nombre;
                    buttonNewsEvent1Content.Hidden = false;

                    eventos = service.HttpGet <Eventos>(constants.Url, constants.EventoController, constants.EventoMethod, "idEvent=2");
                    UILabelNewsEvent2Title.Text    = eventos.TituloEvento;
                    UILabelNewsEvent2Date.Text     = "Fecha: " + eventos.Fecha.ToString("dd-MM-yyyy");
                    UILabelNewsEvent2Content.Text  = eventos.Texto;
                    UILabelNewsEvent2Hour.Text     = "Hora: " + eventos.Hora.ToString("hh:mm");
                    UILabelNewsEvent2Location.Text = "Lugar: " + eventos.Direccion;
                    UILabelNewsEvent2City.Text     = "Ciudad: " + eventos.Ciudad.Nombre;
                    buttonNewsEvent2Content.Hidden = false;

                    eventos = service.HttpGet <Eventos>(constants.Url, constants.EventoController, constants.EventoMethod, "idEvent=3");
                    UILabelNewsEvent3Title.Text    = eventos.TituloEvento;
                    UILabelNewsEvent3Date.Text     = "Fecha: " + eventos.Fecha.ToString("dd-MM-yyyy");
                    UILabelNewsEvent3Content.Text  = eventos.Texto;
                    UILabelNewsEvent3Hour.Text     = "Hora: " + eventos.Hora.ToString("hh:mm");
                    UILabelNewsEvent3Location.Text = "Lugar: " + eventos.Direccion;
                    UILabelNewsEvent3City.Text     = "Ciudad: " + eventos.Ciudad.Nombre;
                    buttonNewsEvent3Content.Hidden = false;

                    eventos = service.HttpGet <Eventos>(constants.Url, constants.EventoController, constants.EventoMethod, "idEvent=5");
                    UILabelNewsEvent4Title.Text    = eventos.TituloEvento;
                    UILabelNewsEvent4Date.Text     = "Fecha: " + eventos.Fecha.ToString("dd-MM-yyyy");
                    UILabelNewsEvent4Content.Text  = eventos.Texto;
                    UILabelNewsEvent4Hour.Text     = "Hora: " + eventos.Hora.ToString("hh:mm");
                    UILabelNewsEvent4Location.Text = "Lugar: " + eventos.Direccion;
                    UILabelNewsEvent4City.Text     = "Ciudad: " + eventos.Ciudad.Nombre;
                    buttonNewsEvent4Content.Hidden = false;

                    eventos = service.HttpGet <Eventos>(constants.Url, constants.EventoController, constants.EventoMethod, "idEvent=4"); UILabelNewsEvent5Title.Text = eventos.TituloEvento;
                    UILabelNewsEvent5Date.Text     = "Fecha: " + eventos.Fecha.ToString("dd-MM-yyyy");
                    UILabelNewsEvent5Content.Text  = eventos.Texto;
                    UILabelNewsEvent5Hour.Text     = "Hora: " + eventos.Hora.ToString("hh:mm");
                    UILabelNewsEvent5Location.Text = "Lugar: " + eventos.Direccion;
                    UILabelNewsEvent5City.Text     = "Ciudad: " + eventos.Ciudad.Nombre;
                    buttonNewsEvent5Content.Hidden = false;
                    loadingIndicator.Hide();
                }
                catch (Exception ex)
                {
                    ExceptionAlert("Alerta", ex.Message);
                }
            }
            else
            {
                var okCancelAlertController = UIAlertController.Create("Alerta", "Por favor verifique su conexión a internet e intenta nuevamente", UIAlertControllerStyle.Alert);
                okCancelAlertController.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Cancel, alert => Environment.Exit(0)));
                PresentViewController(okCancelAlertController, true, null);
            }
        }
Пример #8
0
        public async override void ViewDidLoad()
        {
            base.ViewDidLoad();
            UIScrollViewBusinessContent.ContentSize = new CoreGraphics.CGSize(0, View.Frame.Height + 5100);
            IsInternetConnectionAvailable           = SharedFunctions.CheckInternetConnection();
            if (IsInternetConnectionAvailable == true)
            {
                var bounds = UIScreen.MainScreen.Bounds;
                loadingIndicator = new LoadingIndicator(bounds, "Cargando contenido...");
                View.Add(loadingIndicator);
                await Task.Delay(15);

                if (BusinessName == "Logistica")
                {
                    Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
                    LoadUILabelText(UILabelBusinessContentTitle, lineas.Nombre);
                    LoadUILabelText(UILabelBusinessContentDescription, lineas.Texto2);
                    LoadUILabelText(UILabelBusinessContentSubTitle, "Parques Industriales");
                    UIImageViewBusinessContentLogo.Image      = UIImage.FromFile("logikalogo.png");
                    UIImageViewBusinessContentFacebook.Image  = UIImage.FromFile("facebook.png");
                    UIImageViewBusinessContentInstagram.Image = UIImage.FromFile("instagram.png");
                    UIImageViewBusinessContentLinkdln.Image   = UIImage.FromFile("linkedin.png");
                    UIImageViewBusinessContentYoutube.Image   = UIImage.FromFile("youtube.png");
                    List <Galeria> listaGaleria = service.HttpGet <List <Galeria> >(constants.Url, constants.GaleriaController, constants.GaleriaMethod1, "idProyecto=1&slider=1");
                    int            LoadNumber   = 0;
                    if (listaGaleria != null && listaGaleria.Count > 0)
                    {
                        foreach (var galeria in listaGaleria)
                        {
                            if (LoadNumber == 0)
                            {
                                LoadData("code=07", UIImageViewBusiness1, BusinessValues, ItemsList, UILabelBusiness1SubTitle1, UILabelBusiness1Skill1, UILabelBusiness1Skill2, UILabelBusiness1Skill3, UILabelBusiness1Skill4, galeria);
                                LoadNumber++;
                            }
                            else if (LoadNumber == 1)
                            {
                                LoadData("code=10", UIImageViewBusiness2, BusinessValues, ItemsList, UILabelBusiness2SubTitle1, UILabelBusiness2Skill1, UILabelBusiness2Skill2, UILabelBusiness2Skill3, UILabelBusiness2Skill4, galeria);
                                LoadNumber++;
                            }
                            else if (LoadNumber == 2)
                            {
                                LoadData("code=14", UIImageViewBusiness3, BusinessValues, ItemsList, UILabelBusiness3SubTitle1, UILabelBusiness3Skill1, UILabelBusiness3Skill2, UILabelBusiness3Skill3, UILabelBusiness3Skill4, galeria);
                                LoadNumber++;
                            }
                            else if (LoadNumber == 3)
                            {
                                LoadData("code=12", UIImageViewBusiness4, BusinessValues, ItemsList, UILabelBusiness4SubTitle1, UILabelBusiness4Skill1, UILabelBusiness4Skill2, UILabelBusiness4Skill3, UILabelBusiness4Skill4, galeria);
                                LoadNumber++;
                            }
                        }
                    }
                    else
                    {
                        throw new Exception("");
                    }
                    UITapGestureRecognizer UIImageViewTap1 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            iOSFunctions.OpenUrl(@"https://pactia.com/activo/logika-siberia-12/");
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar abrir el sitio web");
                        }
                    });

                    UITapGestureRecognizer UIViewFacebookTap = new UITapGestureRecognizer(() =>
                    {
                        iOSFunctions.OpenUrl(@"https://www.facebook.com/pactiaoficial/");
                    });
                    UIImageViewBusinessContentFacebook.UserInteractionEnabled = true;
                    UIImageViewBusinessContentFacebook.AddGestureRecognizer(UIViewFacebookTap);

                    UITapGestureRecognizer UIViewInstagramTap = new UITapGestureRecognizer(() =>
                    {
                        iOSFunctions.OpenUrl(@"https://www.instagram.com/pactiaoficial/");
                    });
                    UIImageViewBusinessContentInstagram.UserInteractionEnabled = true;
                    UIImageViewBusinessContentInstagram.AddGestureRecognizer(UIViewInstagramTap);

                    UITapGestureRecognizer UIViewLinkedlnTap = new UITapGestureRecognizer(() =>
                    {
                        iOSFunctions.OpenUrl(@"https://www.linkedin.com/company/pactia");
                    });
                    UIImageViewBusinessContentLinkdln.UserInteractionEnabled = true;
                    UIImageViewBusinessContentLinkdln.AddGestureRecognizer(UIViewLinkedlnTap);

                    UITapGestureRecognizer UIViewYoutubeTap = new UITapGestureRecognizer(() =>
                    {
                        iOSFunctions.OpenUrl(@"https://www.youtube.com/channel/UCFH_l8cOLR-1FiS021ena2Q");
                    });
                    UIImageViewBusinessContentYoutube.UserInteractionEnabled = true;
                    UIImageViewBusinessContentYoutube.AddGestureRecognizer(UIViewYoutubeTap);

                    UIImageViewBusiness1.UserInteractionEnabled = true;
                    UIImageViewBusiness1.AddGestureRecognizer(UIImageViewTap1);

                    UITapGestureRecognizer UIImageViewTap2 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            iOSFunctions.OpenUrl(@"https://pactia.com/activo/logika-siberia-12-2/");
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar abrir el enlace");
                        }
                    });
                    UIImageViewBusiness2.UserInteractionEnabled = true;
                    UIImageViewBusiness2.AddGestureRecognizer(UIImageViewTap2);

                    UITapGestureRecognizer UIImageViewTap3 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            iOSFunctions.OpenUrl(@"https://pactia.com/activo/parque-industrial-san-carlos-i/");
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar abrir el enlace");
                        }
                    });
                    UIImageViewBusiness3.UserInteractionEnabled = true;
                    UIImageViewBusiness3.AddGestureRecognizer(UIImageViewTap3);

                    UITapGestureRecognizer UIImageViewTap4 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            iOSFunctions.OpenUrl(@"https://pactia.com/activo/logika-via-40/");
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar abrir el enlace");
                        }
                    });
                    UIImageViewBusiness4.UserInteractionEnabled = true;
                    UIImageViewBusiness4.AddGestureRecognizer(UIImageViewTap4);

                    #region Gestures business1
                    UITapGestureRecognizer UIImageViewTap1Action1Business1 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            ContactViewController viewController = this.Storyboard.InstantiateViewController("ContactViewControllerId") as ContactViewController;
                            viewController.BusinessLine          = "Logística y almacenamiento";
                            viewController.SubBusinessLine       = "Lógika Siberia";
                            this.NavigationController.PushViewController(viewController, true);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction1Business1.UserInteractionEnabled = true;
                    UIImageViewAction1Business1.AddGestureRecognizer(UIImageViewTap1Action1Business1);

                    UITapGestureRecognizer UIImageViewTap2Action2Business1 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
                            iOSFunctions.CallPhone("tel:" + lineas.Telefono);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction2Business1.UserInteractionEnabled = true;
                    UIImageViewAction2Business1.AddGestureRecognizer(UIImageViewTap2Action2Business1);

                    UITapGestureRecognizer UIImageViewTap3Action3Business1 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            MapsViewController viewController = this.Storyboard.InstantiateViewController("MapsViewControllerId") as MapsViewController;
                            viewController.AnnotationTitle    = "Lógika Siberia";
                            viewController.LocationLatitude   = 4.760737;
                            viewController.LocationLongitude  = -74.165095;
                            this.NavigationController.PushViewController(viewController, true);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction3Business1.UserInteractionEnabled = true;
                    UIImageViewAction3Business1.AddGestureRecognizer(UIImageViewTap3Action3Business1);

                    UITapGestureRecognizer UIImageViewTap4Action4Business1 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            Galeria galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=07");
                            iOSFunctions.OpenUrl(galeria.Pdf);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar abrir el enlace");
                        }
                    });
                    UIImageViewAction4Business1.UserInteractionEnabled = true;
                    UIImageViewAction4Business1.AddGestureRecognizer(UIImageViewTap4Action4Business1);

                    UITapGestureRecognizer UIImageViewTap5Action5Business1 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            iOSFunctions.OpenUrl(@"https://logika.hauzd.com/logikasiberia");
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar abrir el enlace");
                        }
                    });
                    UIImageViewAction5Business1.UserInteractionEnabled = true;
                    UIImageViewAction5Business1.AddGestureRecognizer(UIImageViewTap5Action5Business1);

                    UITapGestureRecognizer UIImageViewTap6Action6Business1 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            PanoramaViewController viewController = this.Storyboard.InstantiateViewController("PanoramaViewControllerId") as PanoramaViewController;
                            viewController.SelectionNumber        = 0;
                            this.NavigationController.PushViewController(viewController, true);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction6Business1.UserInteractionEnabled = true;
                    UIImageViewAction6Business1.AddGestureRecognizer(UIImageViewTap6Action6Business1);
                    #endregion

                    #region Gestures business2
                    UITapGestureRecognizer UIImageViewTap1Action1Business2 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            ContactViewController viewController = this.Storyboard.InstantiateViewController("ContactViewControllerId") as ContactViewController;
                            viewController.BusinessLine          = "Logística y almacenamiento";
                            viewController.SubBusinessLine       = "Lógika Madrid";
                            this.NavigationController.PushViewController(viewController, true);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction1Business2.UserInteractionEnabled = true;
                    UIImageViewAction1Business2.AddGestureRecognizer(UIImageViewTap1Action1Business2);

                    UITapGestureRecognizer UIImageViewTap2Action2Business2 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
                            iOSFunctions.CallPhone("tel:" + lineas.Telefono);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction2Business2.UserInteractionEnabled = true;
                    UIImageViewAction2Business2.AddGestureRecognizer(UIImageViewTap2Action2Business2);

                    UITapGestureRecognizer UIImageViewTap3Action3Business2 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            MapsViewController viewController = this.Storyboard.InstantiateViewController("MapsViewControllerId") as MapsViewController;
                            viewController.AnnotationTitle    = "Lógika Madrid";
                            viewController.LocationLatitude   = 4.742864;
                            viewController.LocationLongitude  = -74.256246;
                            this.NavigationController.PushViewController(viewController, true);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction3Business2.UserInteractionEnabled = true;
                    UIImageViewAction3Business2.AddGestureRecognizer(UIImageViewTap3Action3Business2);

                    UITapGestureRecognizer UIImageViewTap4Action4Business2 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            Galeria galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=07");
                            iOSFunctions.OpenUrl(galeria.Pdf);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar abrir el enlace");
                        }
                    });
                    UIImageViewAction4Business2.UserInteractionEnabled = true;
                    UIImageViewAction4Business2.AddGestureRecognizer(UIImageViewTap4Action4Business2);

                    UITapGestureRecognizer UIImageViewTap5Action5Business2 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction5Business2.UserInteractionEnabled = true;
                    UIImageViewAction5Business2.AddGestureRecognizer(UIImageViewTap5Action5Business2);

                    UITapGestureRecognizer UIImageViewTap6Action6Business2 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            PanoramaViewController viewController = this.Storyboard.InstantiateViewController("PanoramaViewControllerId") as PanoramaViewController;
                            viewController.SelectionNumber        = 1;
                            this.NavigationController.PushViewController(viewController, true);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction6Business2.UserInteractionEnabled = true;
                    UIImageViewAction6Business2.AddGestureRecognizer(UIImageViewTap6Action6Business2);

                    #endregion

                    #region Gestures business3
                    UITapGestureRecognizer UIImageViewTap1Action1Business3 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            ContactViewController viewController = this.Storyboard.InstantiateViewController("ContactViewControllerId") as ContactViewController;
                            viewController.BusinessLine          = "Logística y almacenamiento";
                            viewController.SubBusinessLine       = "San Carlos I";
                            this.NavigationController.PushViewController(viewController, true);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction1Business3.UserInteractionEnabled = true;
                    UIImageViewAction1Business3.AddGestureRecognizer(UIImageViewTap1Action1Business3);

                    UITapGestureRecognizer UIImageViewTap2Action2Business3 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
                            iOSFunctions.CallPhone("tel:" + lineas.Telefono);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction2Business3.UserInteractionEnabled = true;
                    UIImageViewAction2Business3.AddGestureRecognizer(UIImageViewTap2Action2Business3);

                    UITapGestureRecognizer UIImageViewTap3Action3Business3 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            MapsViewController viewController = this.Storyboard.InstantiateViewController("MapsViewControllerId") as MapsViewController;
                            viewController.AnnotationTitle    = "San Carlos I";
                            viewController.LocationLatitude   = 4.700809;
                            viewController.LocationLongitude  = -74.184920;
                            this.NavigationController.PushViewController(viewController, true);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction3Business3.UserInteractionEnabled = true;
                    UIImageViewAction3Business3.AddGestureRecognizer(UIImageViewTap3Action3Business3);

                    UITapGestureRecognizer UIImageViewTap4Action4Business3 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            Galeria galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=07");
                            iOSFunctions.OpenUrl(galeria.Pdf);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar abrir el enlace");
                        }
                    });
                    UIImageViewAction4Business3.UserInteractionEnabled = true;
                    UIImageViewAction4Business3.AddGestureRecognizer(UIImageViewTap4Action4Business3);

                    UITapGestureRecognizer UIImageViewTap5Action5Business3 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction5Business3.UserInteractionEnabled = true;
                    UIImageViewAction5Business3.AddGestureRecognizer(UIImageViewTap5Action5Business3);

                    UITapGestureRecognizer UIImageViewTap6Action6Business3 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction6Business3.UserInteractionEnabled = true;
                    UIImageViewAction6Business3.AddGestureRecognizer(UIImageViewTap6Action6Business3);
                    #endregion

                    #region Gestures business4
                    UITapGestureRecognizer UIImageViewTap1Action1Business4 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            ContactViewController viewController = this.Storyboard.InstantiateViewController("ContactViewControllerId") as ContactViewController;
                            viewController.BusinessLine          = "Logística y almacenamiento";
                            viewController.SubBusinessLine       = "Vía 40";
                            this.NavigationController.PushViewController(viewController, true);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction1Business4.UserInteractionEnabled = true;
                    UIImageViewAction1Business4.AddGestureRecognizer(UIImageViewTap1Action1Business4);

                    UITapGestureRecognizer UIImageViewTap2Action2Business4 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
                            iOSFunctions.CallPhone("tel:" + lineas.Telefono);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction2Business4.UserInteractionEnabled = true;
                    UIImageViewAction2Business4.AddGestureRecognizer(UIImageViewTap2Action2Business4);

                    UITapGestureRecognizer UIImageViewTap3Action3Business4 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            MapsViewController viewController = this.Storyboard.InstantiateViewController("MapsViewControllerId") as MapsViewController;
                            viewController.AnnotationTitle    = "Vía 40";
                            viewController.LocationLatitude   = 11.033809;
                            viewController.LocationLongitude  = -74.815730;
                            this.NavigationController.PushViewController(viewController, true);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction3Business4.UserInteractionEnabled = true;
                    UIImageViewAction3Business4.AddGestureRecognizer(UIImageViewTap3Action3Business4);

                    UITapGestureRecognizer UIImageViewTap4Action4Business4 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                            Galeria galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=07");
                            iOSFunctions.OpenUrl(galeria.Pdf);
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar abrir el enlace");
                        }
                    });
                    UIImageViewAction4Business4.UserInteractionEnabled = true;
                    UIImageViewAction4Business4.AddGestureRecognizer(UIImageViewTap4Action4Business4);

                    UITapGestureRecognizer UIImageViewTap5Action5Business4 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction5Business4.UserInteractionEnabled = true;
                    UIImageViewAction5Business4.AddGestureRecognizer(UIImageViewTap5Action5Business4);

                    UITapGestureRecognizer UIImageViewTap6Action6Business4 = new UITapGestureRecognizer(() =>
                    {
                        try
                        {
                        }
                        catch (Exception)
                        {
                            SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                        }
                    });
                    UIImageViewAction6Business4.UserInteractionEnabled = true;
                    UIImageViewAction6Business4.AddGestureRecognizer(UIImageViewTap6Action6Business4);
                    #endregion
                }
                else
                {
                    var okCancelAlertController = UIAlertController.Create("Alerta", "El servicio no está disponible en el momento, intente de nuevo más tarde", UIAlertControllerStyle.Alert);
                    okCancelAlertController.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Cancel, alert => Environment.Exit(0)));
                    PresentViewController(okCancelAlertController, true, null);
                }
                loadingIndicator.Hide();
            }
            else
            {
                var okCancelAlertController = UIAlertController.Create("Alerta", "Por favor verifique su conexión a internet e intenta nuevamente", UIAlertControllerStyle.Alert);
                okCancelAlertController.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Cancel, alert => Environment.Exit(0)));
                PresentViewController(okCancelAlertController, true, null);
            }
        }