Ejemplo n.º 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.ExersiceGrouplayout);

            db = new exerciseRepository();

            listGroup = db.Where(p => p.IsExercise == false).ToList();;

            ListView         = FindViewById <ListView>(Resource.Id.lstExersiceGroup);
            ListView.Adapter = new ExersiceGroupAdapter(this, listGroup);

            ListView.ItemClick += ListView_ItemClick;
            // Create your application here
        }
Ejemplo n.º 2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.AddExerciselayout);

            db  = new exerciseRepository();
            dbb = new ScheduleRepository();

            Id      = Intent.GetIntExtra("id", 0);
            day     = Intent.GetIntExtra("day", 0);
            program = Intent.GetIntExtra("program", 0);

            exercise = db.Find(p => p.Id == Id);

            TextView lblShowExercise = FindViewById <TextView>(Resource.Id.lblShowExercise);

            txtSet         = FindViewById <EditText>(Resource.Id.txtSet);
            txtCount       = FindViewById <EditText>(Resource.Id.txtCount);
            txtMin         = FindViewById <EditText>(Resource.Id.txtMin);
            btnAddExersice = FindViewById <Button>(Resource.Id.btnAddExersice);

            LinearLayout liner1 = FindViewById <LinearLayout>(Resource.Id.liner1);
            LinearLayout liner2 = FindViewById <LinearLayout>(Resource.Id.liner2);

            if (exercise.cardio)
            {
                liner1.Visibility = ViewStates.Invisible;
            }
            else
            {
                liner2.Visibility = ViewStates.Invisible;
            }

            lblShowExercise.Text  = exercise.name;
            btnAddExersice.Click += BtnAddExersice_Click;
            // Create your application here
        }
Ejemplo n.º 3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Exerciselayout);

            var program = Intent.GetIntExtra("program", 0);
            var day     = Intent.GetIntExtra("day", 0);
            var type    = Intent.GetIntExtra("type", 0);

            db = new exerciseRepository();

            TextView lblNameGroup = FindViewById <TextView>(Resource.Id.lblNameGroup);

            lblNameGroup.Text = Intent.GetStringExtra("namegroup");

            listGroup = db.Where(p => p.IsExercise == true & p.type == type).ToList();;

            ListView         = FindViewById <ListView>(Resource.Id.lstShowExercise);
            ListView.Adapter = new ExersiceGroupAdapter(this, listGroup);

            ListView.ItemClick += ListView_ItemClick;
            int x = 0;
            // Create your application here
        }
Ejemplo n.º 4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Splash);


            db = new exerciseRepository();
            var t = db.GetAllExercise().Count();

            if (t == 234)
            {
                Toast.MakeText(this, "Hello ", ToastLength.Long).Show();
                StartActivity(typeof(DaysActivity));
            }
            else
            {
                DeleteAllExercise();
                AddExercise();
                Toast.MakeText(this, "ADD ", ToastLength.Long).Show();
                StartActivity(typeof(DaysActivity));
            }
            // Create your application here
        }