Beispiel #1
0
        public ProfilePage(HomeDrawerPage _rootPage)
        {
            InitializeComponent();
            RootPage = _rootPage;

            NavigationPage.SetHasNavigationBar(this, false);
            Background.BackgroundColor = Color.FromHex("#b7C7E1F5");


            MessagingCenter.Subscribe <CarouselPageIdiomas>(this, "finished_picking", (sender) =>
            {
                SetStackIdiomas();
            });


            ImageSourceChanged = () =>
            {
                if (LastView is FFImageLoading.Forms.CachedImage)
                {
                    (LastView as FFImageLoading.Forms.CachedImage).Source = Source;
                }

                _imageView.Source = Source;
            };
        }
Beispiel #2
0
 public SocialMediaPage(HomeDrawerPage _rootPage)
 {
     InitializeComponent();
     RootPage = _rootPage;
     showPage();
     NavigationPage.SetHasNavigationBar(this, false);
 }
 public EventsView(HomeDrawerPage _rootPage)
 {
     InitializeComponent();
     RootPage = _rootPage;
     NavigationPage.SetHasNavigationBar(this, false);
     ListView.ItemsSource = _itemsList;
 }
        public MasterHomePage(HomeDrawerPage _rootPage)
        {
            InitializeComponent();
            RootPage = _rootPage;

            NavigationPage.SetHasNavigationBar(this, false);

            var      user        = PropertiesManager.GetUserInfo();
            int      fechainicio = Int32.Parse(DateTime.Parse(user.data.datos_usuario.fecha_nacimiento).ToString("yyyy"));
            DateTime date        = DateTime.Today;
            int      fechaactual = Int32.Parse(DateTime.Parse(date.ToString()).ToString("yyyy"));

            edad = fechaactual - fechainicio;
            if (edad >= 30)
            {
                _codigoText.Text       = "Regiones";
                _codigoText2.Text      = "";
                _imagecodigo.Source    = "regionesmenu.png";
                _imagepromocion.Source = "notificacionmenu";
                _promocionText.Text    = "Notificaciones";
            }
            InitViews();

            UpdateView();
        }
        public ChatPage(HomeDrawerPage _rootPage)
        {
            InitializeComponent();
            RootPage = _rootPage;


            IntiViews();

            NavigationPage.SetHasNavigationBar(this, false);
        }
Beispiel #6
0
 public AboutPage(HomeDrawerPage _rootPage)
 {
     InitializeComponent();
     RootPage = _rootPage;
     NavigationPage.SetHasNavigationBar(this, false);
     _queHacemos.Text = "En GUANAJOVEN fomentamos la creación y el desarrollo del proyecto de vida de los jóvenes guanajuatenses." +
                        " Trabajamos para que los apoyos del Gobierno del Estado dirigidos al sector joven de la población lleguen de manera correcta a cada uno de ellos.";
     _queHacemos.HorizontalTextAlignment = TextAlignment.Start;
     _logros.Text = "*GUANAJUATO el estado de la República Mexicana más beneficiado con recurso económico por el IMJUVE" +
                    " (Federación).\n*En 2016 el Lic. Miguel Márquez Márquez fue reconocido como 'El Gobernador de los Jóvenes' por" +
                    " la YABT.\n*Reconocimiento a nivel nacional por el IMJUVE como \"Mejor Operatividad en Centros Poder" +
                    " Joven\".\n*Logra GUANAJOVEN el GUINNESS WORLD RECORDS por 'Concentración de mayor número de catrines y catrinas en 2016'.";
     _logros.HorizontalTextAlignment = TextAlignment.Start;
 }
 public EmpresaPage(HomeDrawerPage _rootPage)
 {
     InitializeComponent();
     RootPage = _rootPage;
     NavigationPage.SetHasNavigationBar(this, false);
     _flowListView.FlowItemTapped += (sender, e) =>
     {
         //Empresa _next = null;
         //var empresas = e.Item;
         if (filter)
         {
             List <Empresa> pivot    = new List <Empresa>();
             var            index    = _flowListView.FlowItemsSource.IndexOf(e.Item);
             var            empresas = App.CurrentApp.RealmInstance.All <Empresa>().ToList().OrderBy(x => x.prioridad).ToList();
             foreach (var x in empresas)
             {
                 foreach (var y in EmpresasFilter)
                 {
                     if (x.id_empresa == y.id_empresa)
                     {
                         pivot.Add(x);
                     }
                 }
             }
             var item = pivot[index];
             if (item != null)
             {
                 //_next = App.CurrentApp.RealmInstance.All<Empresa>().Where(d => d.id_empresa == item.id_empresa).First();
                 filter            = false;
                 filterSearch.Text = "";
                 Navigation.PushAsync(new PromotionPage(item));
             }
         }
         else
         {
             var empresas = App.CurrentApp.RealmInstance.All <Empresa>().ToList().OrderBy(x => x.prioridad).ToList();
             var index    = _flowListView.FlowItemsSource.IndexOf(e.Item);
             var item     = empresas[index];
             if (item != null)
             {
                 //_next = App.CurrentApp.RealmInstance.All<Empresa>().Where(d => d.id_empresa == item.id_empresa).First();
                 Navigation.PushAsync(new PromotionPage(item));
             }
         }
     };
 }
        public GuanajovenCodePage(HomeDrawerPage _rootPage)
        {
            InitializeComponent();
            RootPage = _rootPage;
            var user = PropertiesManager.GetUserInfo();

            _background.Source = user.data.datos_usuario.ruta_imagen;
            _name.Text         = user.data.datos_usuario.nombre + " " + user.data.datos_usuario.apellido_paterno + " " + user.data.datos_usuario.apellido_materno;
            _email.Text        = user.data.email;
            _numero.Text       = user.data.codigo_guanajoven.id_usuario + "";
            var stream = DependencyService.Get <IBarcodeService>().ConvertImageStream(user.data.codigo_guanajoven.token);

            _qrImage.Source = ImageSource.FromStream(() => { return(stream); });
            _curpcode.Text  = user.data.datos_usuario.curp;
            _genre.Text     = user.data.datos_usuario.genero.nombre;
            _municipio.Text = user.data.datos_usuario.municipio.nombre;
            DateTime myDate = DateTime.Parse(user.data.datos_usuario.fecha_nacimiento);

            _fechanacimiento.Text      = myDate.ToString("dd/MM/yyyy");
            _estadonacimiento.Text     = user.data.datos_usuario.estado_nacimiento.nombre;
            Background.BackgroundColor = Color.FromHex("#b7C7E1F5");
            NavigationPage.SetHasNavigationBar(this, false);
        }
        public DrawerListPage(HomeDrawerPage rootPage)
        {
            _rootPage = rootPage;
            InitializeComponent();
            var user = PropertiesManager.GetUserInfo();

            if (user != null)
            {
                _imageView.Source = user.data.datos_usuario.ruta_imagen;
                _email.Text       = user.data.email;
                _nombre.Text      = user.data.datos_usuario.nombre;
                _score.Text       = user.data.puntaje + " Puntos";
                _podium.Text      = "Posición " + user.data.posicion;
            }

            Title = " ";

            ListView.ItemsSource = PageTypeGroup.All;

            ListView.ItemSelected += (sender, e) =>
            {
                if (e.SelectedItem == null)
                {
                    return;
                }
                var item = e.SelectedItem as ItemDrawer;
                if (PageSelected != null)
                {
                    PageSelected(item.Page);
                }

                /*foreach (var n in PageTypeGroup.All)
                 * {
                 *      n.Selected = false;
                 * }*/
                item.Selected         = true;
                ListView.ItemsSource  = PageTypeGroup.All;
                ListView.SelectedItem = null;
            };

            ImageSourceChanged = async() =>
            {
                if (LastView is FFImageLoading.Forms.CachedImage)
                {
                    (LastView as FFImageLoading.Forms.CachedImage).Source = Source;
                }

                _imageView.Source = Source;

                //await PostLastFoto();
            };


            //ImagesUploaded += (folio) =>
            //{
            //	ActualizarFotoCliente(folio);
            //};

            //MessagingCenter.Subscribe<PerfilPage>(this, "update_info_user", (sender) =>
            //{
            //		// do something whenever the "Hi" message is sent
            //		if (App.CurrentApp.User != null)
            //		_labelNombre.Text = App.CurrentApp.User.Nombre;
            //	GetFoto();
            //});

            GetFoto();
            AdvertisingUpdate();


            MessagingCenter.Subscribe <ProfilePage>(this, "Hi", (sender) =>
            {
                var usertmp = PropertiesManager.GetUserInfo();
                if (usertmp != null)
                {
                    _imageView.Source = usertmp.data.datos_usuario.ruta_imagen;
                }
            });


            MessagingCenter.Subscribe <DetailEventPage>(this, "Score", (sender) =>
            {
                var usertmp = PropertiesManager.GetUserInfo();
                if (usertmp != null)
                {
                    _score.Text  = usertmp.data.puntaje + " Puntos";
                    _podium.Text = "Posición " + usertmp.data.posicion;
                }
            });
        }
 public NotificationPage(HomeDrawerPage _rootPage)
 {
     InitializeComponent();
     RootPage = _rootPage;
     NavigationPage.SetHasNavigationBar(this, false);
 }