Exemple #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
            _flipper = FindViewById <ViewFlipper>(Resource.Id.viewFlipper);

            btnNext = FindViewById <Button>(Resource.Id.btnNext);
            btnPrev = FindViewById <Button>(Resource.Id.btnPrev);

            // Use button clicks to cycle through views
            btnNext.Click += (sender, e) => {
                // Use custom animations
                _flipper.SetOutAnimation(this, Resource.Animation.slideout_left);
                _flipper.SetInAnimation(this, Resource.Animation.slidein_right);
                // Use Android built-in animations
                //_flipper.SetInAnimation(this, Android.Resource.Animation.SlideInLeft);
                //_flipper.SetOutAnimation(this, Android.Resource.Animation.SlideOutRight);
                _flipper.ShowNext();
            };
            btnPrev.Click += (sender, e) => {
                // Use custom animations
                _flipper.SetOutAnimation(this, Resource.Animation.slideout_right);
                _flipper.SetInAnimation(this, Resource.Animation.slidein_left);
                // Use Android built-in animations
                //_flipper.SetInAnimation(this, Android.Resource.Animation.SlideInLeft);
                //_flipper.SetOutAnimation(this, Android.Resource.Animation.SlideOutRight);
                _flipper.ShowPrevious();
            };
        }
Exemple #2
0
        private void FlipView(bool trash = false)
        {
            var index       = flipper.DisplayedChild;
            var InAnimation = (index > 0)
                ? Resource.Animation.slide_in_from_left
                : Resource.Animation.appear_from_top_right;
            var OutAnimation = (index > 0)
                ? Resource.Animation.dissapear_to_top_right
                : Resource.Animation.slide_out_to_left;

            if (trash)
            {
                OutAnimation = Resource.Animation.dissapear_to_bottom_right;
            }

            flipper.SetInAnimation(this, InAnimation);
            flipper.SetOutAnimation(this, OutAnimation);
            if (index > 0)
            {
                flipper.ShowPrevious();
            }
            else
            {
                flipper.ShowNext();
            }
        }
Exemple #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.simple_flipper);

            flippy = FindViewById <ViewFlipper>(Resource.Id.flippy);
            var buttony = FindViewById <Button>(Resource.Id.buttony);

            buttony.SetOnClickListener(this);

            flippy.SetInAnimation(this, R.Animation.SlideInLeft);
            flippy.SetOutAnimation(this, R.Animation.SlideOutRight);
        }
Exemple #4
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.simple_flipper);

            flippy = FindViewById<ViewFlipper>(Resource.Id.flippy);
            var buttony = FindViewById<Button>(Resource.Id.buttony);

            buttony.SetOnClickListener(this);

            flippy.SetInAnimation(this, R.Animation.SlideInLeft);
            flippy.SetOutAnimation(this, R.Animation.SlideOutRight);
        }
Exemple #5
0
        public bool FlipView()
        {
            int index        = viewFlipper.DisplayedChild;
            int InAnimation  = (index > 0) ? Resource.Animation.slide_in_from_left : Resource.Animation.slide_in_from_right;
            int OutAnimation = (index > 0) ? Resource.Animation.slide_out_to_right : Resource.Animation.slide_out_to_left;

            viewFlipper.SetInAnimation(this, InAnimation);
            viewFlipper.SetOutAnimation(this, OutAnimation);
            if (index > 0)
            {
                viewFlipper.ShowPrevious();
            }
            else
            {
                ViewHelper.ToggleMenu(menu, true);
                viewFlipper.ShowNext();
            }
            return(true);
        }
Exemple #6
0
        public void InitializeLayoutParadigm(View view)
        {
            primaryWebview   = view.FindViewById <ObservableWebView>(Resource.Id.primaryWebView);
            secondaryWebview = view.FindViewById <ObservableWebView>(Resource.Id.secondaryWebView);
            flipper          = view.FindViewById <ViewFlipper>(Resource.Id.view_flipper);
            text             = view.FindViewById <TextView>(Resource.Id.chapterTitle);
            gridView         = view.FindViewById <HeaderFooterGridView>(Resource.Id.chapterGridView);

            flipper.SetInAnimation(Activity, Resource.Animation.push_down_in_no_alpha);
            flipper.SetOutAnimation(Activity, Resource.Animation.push_down_out_no_alpha);

            // Style views
            Typeface face = Typeface.CreateFromAsset(Activity.Assets, "fonts/Roboto-Regular.ttf");

            text.SetTypeface(face, TypefaceStyle.Normal);

            // WebView setup
            InitializeWebView(primaryWebview);
            InitializeWebView(secondaryWebview);

            primaryWebview.Tag   = "primary";
            secondaryWebview.Tag = "secondary";

            ((LinearLayout)primaryWebview.Parent).LayoutParameters   = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.MatchParent, App.STATE.WebviewWeights[0]);
            ((LinearLayout)secondaryWebview.Parent).LayoutParameters = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.MatchParent, App.STATE.WebviewWeights[1]);

            if (App.STATE.WebviewWeights[0] == 0)
            {
                primaryWebview.IsDeflated = true;
            }
            if (App.STATE.WebviewWeights[1] == 0)
            {
                secondaryWebview.IsDeflated = true;
            }

            // GridView setup
            if (Build.VERSION.SdkInt >= BuildVersionCodes.Honeycomb)
            {
                gridView.ChoiceMode = ChoiceMode.Single;
            }

            gridView.ItemClick += SelectChapter;
        }
Exemple #7
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Main);

            ImageButton Boton1  = FindViewById <ImageButton>(Resource.Id.imageButton1);
            ImageButton Boton2  = FindViewById <ImageButton>(Resource.Id.imageButton2);
            ImageButton Boton3  = FindViewById <ImageButton>(Resource.Id.imageButton3);
            ImageButton Boton4  = FindViewById <ImageButton>(Resource.Id.imageButton4);
            ImageButton Boton5  = FindViewById <ImageButton>(Resource.Id.imageButton5);
            ImageButton Boton6  = FindViewById <ImageButton>(Resource.Id.imageButton6);
            ImageButton Boton7  = FindViewById <ImageButton>(Resource.Id.imageButton7);
            ImageButton Boton8  = FindViewById <ImageButton>(Resource.Id.imageButton8);
            ImageButton Boton9  = FindViewById <ImageButton>(Resource.Id.imageButton9);
            ImageButton Boton10 = FindViewById <ImageButton>(Resource.Id.imageButton10);
            ImageButton Boton11 = FindViewById <ImageButton>(Resource.Id.imageButton11);

            Imagen = FindViewById <ViewFlipper>(Resource.Id.ImagenesCar);

            fade_in  = AnimationUtils.LoadAnimation(this, Resource.Animation.Fade_in);
            fade_put = AnimationUtils.LoadAnimation(this, Resource.Animation.Fade_put);

            Imagen.SetInAnimation(ApplicationContext, Resource.Animation.Fade_in);
            Imagen.SetOutAnimation(ApplicationContext, Resource.Animation.Fade_put);
            Imagen.SetFlipInterval(5000);
            Imagen.StartFlipping();

            Boton1.Click += delegate {
                try
                {
                    Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine();
                    DataSet Con = new DataSet();
                    Con = Ser.BuscarPeli("Donnie Darko");
                    DataRow Renglon;
                    Renglon = Con.Tables["Informacion"].Rows[0];
                    Titu    = Renglon["Nombre"].ToString();
                    Gene    = Renglon["Genero"].ToString();
                    Clasi   = Renglon["Clasificacion"].ToString();
                    Dura    = Renglon["Duracion"].ToString();
                    Dire    = Renglon["Director"].ToString();
                    Acto    = Renglon["Actores"].ToString();
                    Sino    = Renglon["Sinopsis"].ToString();
                    Fe      = Renglon["Fecha"].ToString();
                    Cargar();
                }
                catch (System.Exception)
                {
                    try
                    {
                        Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service();
                        DataSet Con = new DataSet();
                        Con = Ser.Consultar("Donnie Darko");
                        DataRow Renglon;
                        Renglon = Con.Tables["Informacion"].Rows[0];
                        Titu    = Renglon["Nombre"].ToString();
                        Gene    = Renglon["Genero"].ToString();
                        Clasi   = Renglon["Clasificacion"].ToString();
                        Dura    = Renglon["Duracion"].ToString();
                        Dire    = Renglon["Director"].ToString();
                        Acto    = Renglon["Actores"].ToString();
                        Sino    = Renglon["Sinopsis"].ToString();
                        Fe      = Renglon["Fecha_Estreno"].ToString();
                        Cargar();
                    }
                    catch (Exception)
                    {
                        Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show();
                    }
                }
            };

            Boton2.Click += delegate
            {
                try
                {
                    Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine();
                    DataSet Con = new DataSet();
                    Con = Ser.BuscarPeli("El efecto mariposa");
                    DataRow Renglon;
                    Renglon = Con.Tables["Informacion"].Rows[0];
                    Titu    = Renglon["Nombre"].ToString();
                    Gene    = Renglon["Genero"].ToString();
                    Clasi   = Renglon["Clasificacion"].ToString();
                    Dura    = Renglon["Duracion"].ToString();
                    Dire    = Renglon["Director"].ToString();
                    Acto    = Renglon["Actores"].ToString();
                    Sino    = Renglon["Sinopsis"].ToString();
                    Fe      = Renglon["Fecha"].ToString();
                    Cargar();
                }
                catch (System.Exception)
                {
                    try
                    {
                        Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service();
                        DataSet Con = new DataSet();
                        Con = Ser.Consultar("El efecto mariposa");
                        DataRow Renglon;
                        Renglon = Con.Tables["Informacion"].Rows[0];
                        Titu    = Renglon["Nombre"].ToString();
                        Gene    = Renglon["Genero"].ToString();
                        Clasi   = Renglon["Clasificacion"].ToString();
                        Dura    = Renglon["Duracion"].ToString();
                        Dire    = Renglon["Director"].ToString();
                        Acto    = Renglon["Actores"].ToString();
                        Sino    = Renglon["Sinopsis"].ToString();
                        Fe      = Renglon["Fecha_Estreno"].ToString();
                        Cargar();
                    }
                    catch (Exception)
                    {
                        Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show();
                    }
                }
            };
            Boton3.Click += delegate
            {
                try
                {
                    Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine();
                    DataSet Con = new DataSet();
                    Con = Ser.BuscarPeli("El exorcista");
                    DataRow Renglon;
                    Renglon = Con.Tables["Informacion"].Rows[0];
                    Titu    = Renglon["Nombre"].ToString();
                    Gene    = Renglon["Genero"].ToString();
                    Clasi   = Renglon["Clasificacion"].ToString();
                    Dura    = Renglon["Duracion"].ToString();
                    Dire    = Renglon["Director"].ToString();
                    Acto    = Renglon["Actores"].ToString();
                    Sino    = Renglon["Sinopsis"].ToString();
                    Fe      = Renglon["Fecha"].ToString();
                    Cargar();
                }
                catch (System.Exception)
                {
                    try
                    {
                        Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service();
                        DataSet Con = new DataSet();
                        Con = Ser.Consultar("El exorcista");
                        DataRow Renglon;
                        Renglon = Con.Tables["Informacion"].Rows[0];
                        Titu    = Renglon["Nombre"].ToString();
                        Gene    = Renglon["Genero"].ToString();
                        Clasi   = Renglon["Clasificacion"].ToString();
                        Dura    = Renglon["Duracion"].ToString();
                        Dire    = Renglon["Director"].ToString();
                        Acto    = Renglon["Actores"].ToString();
                        Sino    = Renglon["Sinopsis"].ToString();
                        Fe      = Renglon["Fecha_Estreno"].ToString();
                        Cargar();
                    }
                    catch (Exception)
                    {
                        Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show();
                    }
                }
            };
            Boton4.Click += delegate
            {
                try
                {
                    Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine();
                    DataSet Con = new DataSet();
                    Con = Ser.BuscarPeli("El increible castillo vagabundo");
                    DataRow Renglon;
                    Renglon = Con.Tables["Informacion"].Rows[0];
                    Titu    = Renglon["Nombre"].ToString();
                    Gene    = Renglon["Genero"].ToString();
                    Clasi   = Renglon["Clasificacion"].ToString();
                    Dura    = Renglon["Duracion"].ToString();
                    Dire    = Renglon["Director"].ToString();
                    Acto    = Renglon["Actores"].ToString();
                    Sino    = Renglon["Sinopsis"].ToString();
                    Fe      = Renglon["Fecha"].ToString();
                    Cargar();
                }
                catch (System.Exception)
                {
                    try
                    {
                        Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service();
                        DataSet Con = new DataSet();
                        Con = Ser.Consultar("El increible castillo vagabundo");
                        DataRow Renglon;
                        Renglon = Con.Tables["Informacion"].Rows[0];
                        Titu    = Renglon["Nombre"].ToString();
                        Gene    = Renglon["Genero"].ToString();
                        Clasi   = Renglon["Clasificacion"].ToString();
                        Dura    = Renglon["Duracion"].ToString();
                        Dire    = Renglon["Director"].ToString();
                        Acto    = Renglon["Actores"].ToString();
                        Sino    = Renglon["Sinopsis"].ToString();
                        Fe      = Renglon["Fecha_Estreno"].ToString();
                        Cargar();
                    }
                    catch (Exception)
                    {
                        Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show();
                    }
                }
            };
            Boton5.Click += delegate
            {
                try
                {
                    Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine();
                    DataSet Con = new DataSet();
                    Con = Ser.BuscarPeli("Intouchables");
                    DataRow Renglon;
                    Renglon = Con.Tables["Informacion"].Rows[0];
                    Titu    = Renglon["Nombre"].ToString();
                    Gene    = Renglon["Genero"].ToString();
                    Clasi   = Renglon["Clasificacion"].ToString();
                    Dura    = Renglon["Duracion"].ToString();
                    Dire    = Renglon["Director"].ToString();
                    Acto    = Renglon["Actores"].ToString();
                    Sino    = Renglon["Sinopsis"].ToString();
                    Fe      = Renglon["Fecha"].ToString();
                    Cargar();
                }
                catch (System.Exception)
                {
                    try
                    {
                        Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service();
                        DataSet Con = new DataSet();
                        Con = Ser.Consultar("Intouchables");
                        DataRow Renglon;
                        Renglon = Con.Tables["Informacion"].Rows[0];
                        Titu    = Renglon["Nombre"].ToString();
                        Gene    = Renglon["Genero"].ToString();
                        Clasi   = Renglon["Clasificacion"].ToString();
                        Dura    = Renglon["Duracion"].ToString();
                        Dire    = Renglon["Director"].ToString();
                        Acto    = Renglon["Actores"].ToString();
                        Sino    = Renglon["Sinopsis"].ToString();
                        Fe      = Renglon["Fecha_Estreno"].ToString();
                        Cargar();
                    }
                    catch (Exception)
                    {
                        Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show();
                    }
                }
            };
            Boton6.Click += delegate
            {
                try
                {
                    Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine();
                    DataSet Con = new DataSet();
                    Con = Ser.BuscarPeli("La naranja mecanica");
                    DataRow Renglon;
                    Renglon = Con.Tables["Informacion"].Rows[0];
                    Titu    = Renglon["Nombre"].ToString();
                    Gene    = Renglon["Genero"].ToString();
                    Clasi   = Renglon["Clasificacion"].ToString();
                    Dura    = Renglon["Duracion"].ToString();
                    Dire    = Renglon["Director"].ToString();
                    Acto    = Renglon["Actores"].ToString();
                    Sino    = Renglon["Sinopsis"].ToString();
                    Fe      = Renglon["Fecha"].ToString();
                    Cargar();
                }
                catch (System.Exception)
                {
                    try
                    {
                        Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service();
                        DataSet Con = new DataSet();
                        Con = Ser.Consultar("La naranja mecanica");
                        DataRow Renglon;
                        Renglon = Con.Tables["Informacion"].Rows[0];
                        Titu    = Renglon["Nombre"].ToString();
                        Gene    = Renglon["Genero"].ToString();
                        Clasi   = Renglon["Clasificacion"].ToString();
                        Dura    = Renglon["Duracion"].ToString();
                        Dire    = Renglon["Director"].ToString();
                        Acto    = Renglon["Actores"].ToString();
                        Sino    = Renglon["Sinopsis"].ToString();
                        Fe      = Renglon["Fecha_Estreno"].ToString();
                        Cargar();
                    }
                    catch (Exception)
                    {
                        Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show();
                    }
                }
            };
            Boton7.Click += delegate
            {
                try
                {
                    Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine();
                    DataSet Con = new DataSet();
                    Con = Ser.BuscarPeli("Las ventajas de ser invisible");
                    DataRow Renglon;
                    Renglon = Con.Tables["Informacion"].Rows[0];
                    Titu    = Renglon["Nombre"].ToString();
                    Gene    = Renglon["Genero"].ToString();
                    Clasi   = Renglon["Clasificacion"].ToString();
                    Dura    = Renglon["Duracion"].ToString();
                    Dire    = Renglon["Director"].ToString();
                    Acto    = Renglon["Actores"].ToString();
                    Sino    = Renglon["Sinopsis"].ToString();
                    Fe      = Renglon["Fecha"].ToString();
                    Cargar();
                }
                catch (System.Exception)
                {
                    try
                    {
                        Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service();
                        DataSet Con = new DataSet();
                        Con = Ser.Consultar("Las ventajas de ser invisible");
                        DataRow Renglon;
                        Renglon = Con.Tables["Informacion"].Rows[0];
                        Titu    = Renglon["Nombre"].ToString();
                        Gene    = Renglon["Genero"].ToString();
                        Clasi   = Renglon["Clasificacion"].ToString();
                        Dura    = Renglon["Duracion"].ToString();
                        Dire    = Renglon["Director"].ToString();
                        Acto    = Renglon["Actores"].ToString();
                        Sino    = Renglon["Sinopsis"].ToString();
                        Fe      = Renglon["Fecha_Estreno"].ToString();
                        Cargar();
                    }
                    catch (Exception)
                    {
                        Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show();
                    }
                }
            };
            Boton8.Click += delegate
            {
                try
                {
                    Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine();
                    DataSet Con = new DataSet();
                    Con = Ser.BuscarPeli("Requiem por un sueno");
                    DataRow Renglon;
                    Renglon = Con.Tables["Informacion"].Rows[0];
                    Titu    = Renglon["Nombre"].ToString();
                    Gene    = Renglon["Genero"].ToString();
                    Clasi   = Renglon["Clasificacion"].ToString();
                    Dura    = Renglon["Duracion"].ToString();
                    Dire    = Renglon["Director"].ToString();
                    Acto    = Renglon["Actores"].ToString();
                    Sino    = Renglon["Sinopsis"].ToString();
                    Fe      = Renglon["Fecha"].ToString();
                    Cargar();
                }
                catch (System.Exception)
                {
                    try
                    {
                        Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service();
                        DataSet Con = new DataSet();
                        Con = Ser.Consultar("Requiem por un sueno");
                        DataRow Renglon;
                        Renglon = Con.Tables["Informacion"].Rows[0];
                        Titu    = Renglon["Nombre"].ToString();
                        Gene    = Renglon["Genero"].ToString();
                        Clasi   = Renglon["Clasificacion"].ToString();
                        Dura    = Renglon["Duracion"].ToString();
                        Dire    = Renglon["Director"].ToString();
                        Acto    = Renglon["Actores"].ToString();
                        Sino    = Renglon["Sinopsis"].ToString();
                        Fe      = Renglon["Fecha_Estreno"].ToString();
                        Cargar();
                    }
                    catch (Exception)
                    {
                        Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show();
                    }
                }
            };
            Boton9.Click += delegate
            {
                try
                {
                    Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine();
                    DataSet Con = new DataSet();
                    Con = Ser.BuscarPeli("Straight Outta Compton");
                    DataRow Renglon;
                    Renglon = Con.Tables["Informacion"].Rows[0];
                    Titu    = Renglon["Nombre"].ToString();
                    Gene    = Renglon["Genero"].ToString();
                    Clasi   = Renglon["Clasificacion"].ToString();
                    Dura    = Renglon["Duracion"].ToString();
                    Dire    = Renglon["Director"].ToString();
                    Acto    = Renglon["Actores"].ToString();
                    Sino    = Renglon["Sinopsis"].ToString();
                    Fe      = Renglon["Fecha"].ToString();
                    Cargar();
                }
                catch (System.Exception)
                {
                    try
                    {
                        Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service();
                        DataSet Con = new DataSet();
                        Con = Ser.Consultar("Straight outta compton");
                        DataRow Renglon;
                        Renglon = Con.Tables["Informacion"].Rows[0];
                        Titu    = Renglon["Nombre"].ToString();
                        Gene    = Renglon["Genero"].ToString();
                        Clasi   = Renglon["Clasificacion"].ToString();
                        Dura    = Renglon["Duracion"].ToString();
                        Dire    = Renglon["Director"].ToString();
                        Acto    = Renglon["Actores"].ToString();
                        Sino    = Renglon["Sinopsis"].ToString();
                        Fe      = Renglon["Fecha_Estreno"].ToString();
                        Cargar();
                    }
                    catch (Exception)
                    {
                        Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show();
                    }
                }
            };
            Boton10.Click += delegate
            {
                try
                {
                    Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine();
                    DataSet Con = new DataSet();
                    Con = Ser.BuscarPeli("Wolverine inmortal");
                    DataRow Renglon;
                    Renglon = Con.Tables["Informacion"].Rows[0];
                    Titu    = Renglon["Nombre"].ToString();
                    Gene    = Renglon["Genero"].ToString();
                    Clasi   = Renglon["Clasificacion"].ToString();
                    Dura    = Renglon["Duracion"].ToString();
                    Dire    = Renglon["Director"].ToString();
                    Acto    = Renglon["Actores"].ToString();
                    Sino    = Renglon["Sinopsis"].ToString();
                    Fe      = Renglon["Fecha"].ToString();
                    Cargar();
                }
                catch (System.Exception)
                {
                    try
                    {
                        Practica4ParcialUYS.ServiCineSql.Service Ser = new Practica4ParcialUYS.ServiCineSql.Service();
                        DataSet Con = new DataSet();
                        Con = Ser.Consultar("Wolverine Inmortal");
                        DataRow Renglon;
                        Renglon = Con.Tables["Informacion"].Rows[0];
                        Titu    = Renglon["Nombre"].ToString();
                        Gene    = Renglon["Genero"].ToString();
                        Clasi   = Renglon["Clasificacion"].ToString();
                        Dura    = Renglon["Duracion"].ToString();
                        Dire    = Renglon["Director"].ToString();
                        Acto    = Renglon["Actores"].ToString();
                        Sino    = Renglon["Sinopsis"].ToString();
                        Fe      = Renglon["Fecha_Estreno"].ToString();
                        Cargar();
                    }
                    catch (Exception)
                    {
                        Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show();
                    }
                }
            };
            Boton11.Click += delegate
            {
                try
                {
                    Practica4ParcialUYS.SitioCine.ServiCine Ser = new Practica4ParcialUYS.SitioCine.ServiCine();
                    DataSet Con = new DataSet();
                    Con = Ser.BuscarPeli("Comunidad");
                    DataRow Renglon;
                    Renglon = Con.Tables["Informacion"].Rows[0];
                    Titu    = Renglon["Nombre"].ToString();
                    Gene    = Renglon["Genero"].ToString();
                    Clasi   = Renglon["Clasificacion"].ToString();
                    Dura    = Renglon["Duracion"].ToString();
                    Dire    = Renglon["Director"].ToString();
                    Acto    = Renglon["Actores"].ToString();
                    Sino    = Renglon["Sinopsis"].ToString();
                    Fe      = Renglon["Fecha"].ToString();
                    Cargar();
                }
                catch (System.Exception)
                {
                    Toast.MakeText(this, "Erro Al Busca La Peli", ToastLength.Long).Show();
                }
            };
        }
 public void Flip(View view)
 {
     viewFlipper.SetInAnimation(this, Resource.Animation.slide_in_from_right);
     viewFlipper.SetOutAnimation(this, Resource.Animation.slide_out_to_left);
     viewFlipper.ShowNext();
 }
Exemple #9
0
        public void InitializeLayoutParadigm(View view)
        {
            // Set views
            primaryWebview   = view.FindViewById <ObservableWebView>(Resource.Id.primaryWebView);
            secondaryWebview = view.FindViewById <ObservableWebView>(Resource.Id.secondaryWebView);
            flipper          = view.FindViewById <ViewFlipper>(Resource.Id.view_flipper);
            gridViewTitle    = view.FindViewById <TextView>(Resource.Id.chapterTitle);
            gridView         = view.FindViewById <HeaderFooterGridView>(Resource.Id.chapterGridView);

            LayoutInflater layoutInflater = LayoutInflater.From(Activity);
            View           footerView     = layoutInflater.Inflate(Resource.Layout.FooterWebView, null);

            gridViewFooterWebview = footerView.FindViewById <ObservableWebView>(Resource.Id.footerWebView);

            // ViewFlipper animations
            flipper.SetInAnimation(Activity, Resource.Animation.push_down_in_no_alpha);
            flipper.SetOutAnimation(Activity, Resource.Animation.push_down_out_no_alpha);

            // Style views
            Typeface face = Typeface.CreateFromAsset(Activity.Assets, "fonts/Roboto-Regular.ttf");

            gridViewTitle.SetTypeface(face, TypefaceStyle.Normal);

            // WebView setup
            InitializeWebView(primaryWebview);
            InitializeWebView(secondaryWebview);
            InitializeWebView(gridViewFooterWebview);

            primaryWebview.Tag   = "primary";
            secondaryWebview.Tag = "secondary";

            ((LinearLayout)primaryWebview.Parent).LayoutParameters = new LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MatchParent,
                LinearLayout.LayoutParams.MatchParent,
                App.STATE.WebviewWeights[0]);
            ((LinearLayout)secondaryWebview.Parent).LayoutParameters = new LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MatchParent,
                LinearLayout.LayoutParams.MatchParent,
                App.STATE.WebviewWeights[1]);

            if (App.STATE.WebviewWeights[0] == 0)
            {
                primaryWebview.IsDeflated = true;
            }
            if (App.STATE.WebviewWeights[1] == 0)
            {
                secondaryWebview.IsDeflated = true;
            }

            if (Build.VERSION.SdkInt >= BuildVersionCodes.Honeycomb)
            {
                gridView.ChoiceMode = ChoiceMode.Single;
            }

            gridView.ItemClick += SelectChapter;

            if (library == Library.Bible)
            {
                gridView.DoSetHeight = false;

                gridViewTitle.Click += text_Click;
                gridViewTitle.SetCompoundDrawablesWithIntrinsicBounds(Resource.Drawable.ic_outline, 0, 0, 0);

                // Set Bible book outline
                NavStruct outline = new NavStruct()
                {
                    Book    = 0,
                    Chapter = SelectedArticle.Book,
                    Verse   = 0
                };
                OutlineContents = JwStore.QueryArticle("outline", outline, LibraryStorehouse.English).ArticleContent;
                gridView.AddFooterView(footerView);
                gridViewFooterWebview.LoadDataWithBaseURL("file:///android_asset/", OutlineContents, "text/html", "utf-8", null);
            }
        }
Exemple #10
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.FourthPage);

            // Prefix
            var resourcePrefix = "Math_App.Droid.";

            // Create stream with path
            var assembly = typeof(MainActivity).GetTypeInfo().Assembly;
            Stream stream = assembly.GetManifestResourceStream(resourcePrefix + "Strategies.xml");

            // get title from bundle
            Intent intent = this.Intent;
            string title = intent.GetStringExtra("title");

            // Read Xml file & create strategy object
            StrategyXmlObject strat = new StrategyXmlObject();
            strat = ReaderXml.ReadFile(stream, title);
            Console.WriteLine(title);

            // create flipper
            _flipper = FindViewById<ViewFlipper>(Resource.Id.viewFlipper);

            // create buttons
            btnNext = FindViewById<Button>(Resource.Id.btnNext);
            btnPrev = FindViewById<Button>(Resource.Id.btnPrev);

            // different views flipper
            titel = FindViewById<TextView>(Resource.Id.nameAndLevel);
            titel.Text = strat.Level1.title;
            info = FindViewById<TextView>(Resource.Id.explanation);
            info.Text = strat.Level1.text;

            //image = FindViewById<ImageView>(Resource.Id.img);
            //int id = Resources.GetIdentifier(strat.Level2.image, "drawable", "Math_App.Droid");
            //image.SetImageResource(id);

            titel2 = FindViewById<TextView>(Resource.Id.nameAndLevel2);
            titel2.Text = strat.Level2.title;
            info2 = FindViewById<TextView>(Resource.Id.explanation2);
            info2.Text = strat.Level2.text;

            //image2 = FindViewById<ImageView>(Resource.Id.img2);
            //int id2 = Resources.GetIdentifier(strat.Level2.image, "drawable", "Math_App.Droid");
            //image2.SetImageResource(id2);

            titel3 = FindViewById<TextView>(Resource.Id.nameAndLevel3);
            titel3.Text = strat.Level3.title;
            info3 = FindViewById<TextView>(Resource.Id.explanation3);
            info3.Text = strat.Level3.text;

            //image3 = FindViewById<ImageView>(Resource.Id.img3);
            //int id3 = Resources.GetIdentifier(strat.Level3.image, "drawable", "Math_App.Droid");
            //image3.SetImageResource(id3);

            titel4 = FindViewById<TextView>(Resource.Id.nameAndLevel4);
            titel4.Text = strat.Level4.title;
            info4 = FindViewById<TextView>(Resource.Id.explanation4);
            info4.Text = strat.Level4.text;

            //image4 = FindViewById<ImageView>(Resource.Id.img4);
            //int id4 = Resources.GetIdentifier(strat.Level4.image, "drawable", "Math_App.Droid");
            //image4.SetImageResource(id4);


            // Use button clicks to cycle through views
            btnNext.Click += (sender, e) => {
                // Use custom animations
                _flipper.SetOutAnimation(this, Resource.Layout.Slideout_top);
                _flipper.SetInAnimation(this, Resource.Layout.Slidein_bot);
                // Use Android built-in animations
                //_flipper.SetInAnimation(this, Android.Resource.Animation.SlideInLeft);      
                //_flipper.SetOutAnimation(this, Android.Resource.Animation.SlideOutRight);
                _flipper.ShowNext();
            };
            btnPrev.Click += (sender, e) => {
                // Use custom animations
                _flipper.SetOutAnimation(this, Resource.Layout.Slideout_bot);
                _flipper.SetInAnimation(this, Resource.Layout.Slidein_top);
                // Use Android built-in animations
                //_flipper.SetInAnimation(this, Android.Resource.Animation.SlideInLeft);
                //_flipper.SetOutAnimation(this, Android.Resource.Animation.SlideOutRight);
                _flipper.ShowPrevious();
            };

        }
Exemple #11
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Flipper);

            //set viewflipper to switch between pages
            flipper = FindViewById <ViewFlipper>(Resource.Id.simpleflipper);
            flipper.SetInAnimation(this, Android.Resource.Animation.FadeIn);
            flipper.SetOutAnimation(this, Android.Resource.Animation.FadeOut);

            //set up layouts actions
            var v = flipper.GetChildAt(0); //starting screen

            v.Touch += delegate
            {
                flipper.DisplayedChild = 1;
            };
            v        = flipper.GetChildAt(1); //welcome screen
            v.Touch += delegate
            {
                flipper.DisplayedChild = 2;
            };
            v        = flipper.GetChildAt(2); //connecting screen
            v.Touch += delegate
            {
                flipper.DisplayedChild = 3;
            };
            v        = flipper.GetChildAt(3); //connecting mobile screen
            v.Touch += delegate
            {
                ShowDrinkNotification();
                ShowWalkNotification();
                flipper.DisplayedChild = 4;
            };
            //for mainmenu screen, all the buttons has to lead somewhere
            v = flipper.GetChildAt(4);
            //fetch the button press animation from resource and set it to all the buttons

            //recycle var button for every button and set actions for them
            var button1 = FindViewById <ImageButton>(Resource.Id.mainmenu_button1_id); //taskbutton

            button1.Click += OnTaskButtonClicked;

            var button2 = FindViewById <ImageButton>(Resource.Id.mainmenu_button2_id); //gearbutton
            //button2.Click += OnTaskButtonClicked;

            var button3 = FindViewById <ImageButton>(Resource.Id.mainmenu_button3_id); //creepyguybutton
            //button3.Click += OnTaskButtonClicked;

            var button4 = FindViewById <ImageButton>(Resource.Id.mainmenu_button4_id); //helpbutton

            button4.Click += OnHelpButtonClicked;

            //in the tasks-screen, we make tasks dynamically based on what kind of- and how many tasks need to be done
            v = flipper.GetChildAt(5);

            var task_storage = FindViewById <LinearLayout>(Resource.Id.task_storage_layout);

            //add taks to the task storgae (Linearlayout)
            task_storage.AddView(CreateTask("jfdslkkkkjndfkjnfd fds ds df kfd hdf hfd f ddhf dfh fh hfd hd hdf hfd hfd hdf hffdh fdh fdhfdfdh dfh fdh fd df fsdeg ewdsf ds ss df sd sd sd sd fe ge  sd d er  werferw f er fer f er f erf er fe f re   r"));
            task_storage.AddView(CreateTask("moj"));

            //init heartrate related stuff
            heartRate       = 0;
            sensorManager   = (SensorManager)GetSystemService(SensorService);
            heartRateSensor = sensorManager.GetDefaultSensor(SensorType.HeartRate);
            sl = new SensorListener(this);

            //create and connect googleapi client
            _client = new GoogleApiClientBuilder(this, this, this).AddApi(WearableClass.Api).Build();
            _client.Connect();
        }