public async Task StartActivity(ActivityData activity, Station station, DeviceIdentifier identifier)
 {
     var dto = new Activity
     {
         Difficulty = activity.Difficulty,
         Type = activity.Type,
         ConnectedBeacon = Serializer.Serialize(identifier)
     };
     await service.StartActivity(dto, station.Id);
 }
Ejemplo n.º 2
0
 public static Android.Graphics.Drawables.Drawable GetNormalBackground(Resources res, Station station)
 {
     switch (station.UsedActivityType)
     {
         case ActivityType.Dumbbells:
             return res.GetDrawable(Resource.Drawable.bg_dumbbells_normal);
         case ActivityType.Rowing:
             return res.GetDrawable(Resource.Drawable.bg_rowing_normal);
         case ActivityType.Cycling:
             return res.GetDrawable(Resource.Drawable.bg_rowing_normal);
         case ActivityType.BenchPress:
         case ActivityType.Undefined:
         default:
             return res.GetDrawable(Resource.Drawable.bg_normal);
     }
 }
 public async Task StopActivity(Station station, DeviceIdentifier identifier)
 {
     await service.StopActivity(station.Id);
 }
Ejemplo n.º 4
0
        private void InitBackrounds(Station station)
        {
            var sessionMain = FindViewById<LinearLayout>(Resource.Id.sessionMain);
            sessionMain.SetBackgroundDrawable(ImageHelper.GetNormalBackground(this.Resources, station));


            if (station.UsedActivityType == Contracts.Localization.ActivityType.Cycling ||
                station.UsedActivityType == Contracts.Localization.ActivityType.Rowing)
            {
                var demoImageView = FindViewById<TextView>(Resource.Id.demoImageView);
                demoImageView.Text = "Select difficulty";


                var selectedWeight = FindViewById<TextView>(Resource.Id.selectedWeight);
                currentWeight = 7;
                selectedWeight.Text = currentWeight.ToString();


                var weightUnit = FindViewById<TextView>(Resource.Id.weightUnit);
                weightUnit.Visibility = ViewStates.Gone;
            }

        }