Пример #1
0
        // handle the weight input
        void Handle_Weight(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            double value = Math.Round(weight.Value, 0);

            weightValue.Text         = value.ToString() + " lbs";
            currentAssessment.Weight = (value);
        }
Пример #2
0
        void Stepper_ValueChanged(System.Object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            double _interests = e.NewValue;

            numOfInterests.Text = string.Format("{0}", _interests);
            _numOfInterests     = _interests;
        }
Пример #3
0
        void naMudancaDeValorDoSlider(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            int    posicao      = Convert.ToInt32(slider_blaster.Value);
            string valordalabel = lista[posicao].ToString();

            label_uf.Text = valordalabel;
        }
        private void sliderValue_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            var obj = (Slider)sender;

            if (obj.Value >= 0 && obj.Value <= 30)
            {
                obj.Value = 30;
            }
            else if (obj.Value >= 31 && obj.Value <= 60)
            {
                obj.Value = 60;
            }
            else if (obj.Value >= 61 && obj.Value <= 90)
            {
                obj.Value = 90;
            }
            else if (obj.Value >= 91 && obj.Value <= 120)
            {
                obj.Value = 120;
            }
            else
            {
                obj.Value = 180;
            }
        }
Пример #5
0
        private void Handle_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            var zoomLevel      = double.Parse(e.NewValue.ToString()) * 18.0;
            var latlongdegrees = 360 / (Math.Pow(2, zoomLevel));

            this.MyMap.MoveToRegion(new MapSpan(this.MyMap.VisibleRegion.Center, latlongdegrees, latlongdegrees));
        }
Пример #6
0
        // Handle the number of reps on the third set of the curve input
        void Handle_ThirdSet(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            double value = Math.Round(thirdSet.Value, 0);

            third.Text = value.ToString() + " reps";
            currentAssessment.ThirdSetReps = (value);
        }
        void Handle_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            var zoomLevel      = e.NewValue;        // between 1 and 18
            var latlongdegrees = 360 / (Math.Pow(2, zoomLevel));

            map.MoveToRegion(new MapSpan(map.VisibleRegion.Center, latlongdegrees, latlongdegrees));
        }
Пример #8
0
        void Handle_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            label_roda.Rotation = slider_roda.Value;
            int valorLabel = Convert.ToInt32(slider_roda.Value);

            label_ValorDoSlider.Text = slider_roda.Value.ToString();
        }
Пример #9
0
 void OnPositionSliderValueChanged(System.Object sender, Xamarin.Forms.ValueChangedEventArgs e)
 {
     polling = false;
     mediaElement.Position = positionSlider.Position;
     positionLabel.Text    = mediaElement.Position.ToString("hh\\:mm\\:ss");
     polling = true;
 }
 void cambiar_valor_rotacion(object sender, Xamarin.Forms.ValueChangedEventArgs e)
 {
     lbl_rot_x.Text = "Rotar en X " + sl_rot_x.Value.ToString("###") + " grados";
     box.RotationX  = (sl_rot_x.Value);
     lbl_rot_y.Text = "Rotar en Y " + sl_rot_y.Value.ToString("###") + " grados";
     box.RotationY  = (sl_rot_y.Value);
 }
Пример #11
0
        void Slider_ValueChanged(System.Object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            Slider slider = sender as Slider;
            int    value  = (int)slider.Value;

            viewModel.SliderValue = value;
        }
Пример #12
0
        void timerValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            if (!Preferences.ContainsKey("timerValue"))
            {
                Preferences.Set("timerValue", (int)0);
            }
            else if (firstTimerStart)
            {
                timerValue      = (int)Preferences.Get("timerValue", 0);
                firstTimerStart = false;
            }
            else
            {
                Preferences.Set("timerValue", (int)timeSlider.Value);
            }
            double value = e.NewValue;

            timerText.Text = timeToString((int)e.NewValue);
            timerValue     = (int)(e.NewValue);
            if (!isTimerRunning)
            {
                setEventButtons(isTimerRunning);
            }
            setPickAndDropButtons();
        }
Пример #13
0
        // handle max pullup
        void Handle_Max_PullUp(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            double value = Math.Round(maxPull.Value, 0);

            pullupValue.Text            = value.ToString() + " lbs";
            currentAssessment.MaxPullUp = (value);
        }
 public void PlayerSlider_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
 {
     if (sliderPositionAudio.Value != player.Duration)
     {
         player.Seek(sliderPositionAudio.Value);
     }
 }
Пример #15
0
        void Handle_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            var value = (int)Math.Round(e.NewValue);

            //SliderValueChanged?.Invoke(this, value);

            MessagingCenter.Send(this, Events.SliderValueChanged, value);
        }
Пример #16
0
 async void YearSlider_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
 {
     if (BindingContext != null)
     {
         AwardsViewModel viewModel = (AwardsViewModel)BindingContext;
         await viewModel.LoadCategories();
     }
 }
Пример #17
0
 void PositionSlider_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
 {
     // Update the player position only on manual ( > 1 ) slider changes.
     if (Math.Abs(e.NewValue - Player.Position.TotalSeconds) > 1)
     {
         Player.Position = TimeSpan.FromSeconds(e.NewValue);
     }
 }
Пример #18
0
        private void frequency_slider_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            double stepValue = 0.2;

            var newStep = Math.Round(e.NewValue / stepValue);

            (sender as Slider).Value = newStep * stepValue;
        }
        // Určení posuvníku použe na cvelá čísla a aktualizování jeho číselníku
        void OnSliderValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            var newStep = Math.Round(e.NewValue / 1.0);

            RatingSlider.Value = newStep * 1.0;

            NumberDisplay.Text = RatingSlider.Value.ToString() + "%";
        }
Пример #20
0
        void Handle_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            int posicao = Convert.ToInt32(slider_val.Value);

            string val_label = lista[posicao].ToString();

            label_uf.Text = val_label;
        }
        private void MySlider_ValueChanged(object sender, ValueChangedEventArgs e)
        {
            // Display the rotation value in the Label formatted nicely with degree symbol.
            MyLabel.Text = string.Format("{0:0}°", MySlider.Value);

            // Set the MapView rotation to that of the Slider.
            MyMapView.SetViewpointRotationAsync(e.NewValue);
        }
Пример #22
0
 void defenseSlider_Updated(System.Object sender, Xamarin.Forms.ValueChangedEventArgs e)
 {
     gotDefended.Value = Math.Round(gotDefended.Value);
     didDefense.Value  = Math.Round(didDefense.Value);
     Entry.gotDefended = (int)gotDefended.Value;
     Entry.didDefense  = (int)didDefense.Value;
     onParamUpdate();
 }
 void cambiar_valor_color(object sender, Xamarin.Forms.ValueChangedEventArgs e)
 {
     lbl_r.Text          = "R " + sl_r.Value.ToString("###");
     lbl_g.Text          = "G " + sl_g.Value.ToString("###");
     lbl_b.Text          = "B " + sl_b.Value.ToString("###");
     colorCuadro         = new Color(sl_r.Value / 255d, sl_g.Value / 255d, sl_b.Value / 255d);
     box.BackgroundColor = colorCuadro;
 }
Пример #24
0
        void Slider_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            var newStep = Math.Round(e.NewValue / 100);

            mySlider.Value = newStep * 100;
            lblText.Text   = mySlider.Value.ToString();
            lblText.TranslateTo(mySlider.Value * ((mySlider.Width - 40) / mySlider.Maximum), 0, 100);
        }
        void Handle_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            //throw new NotImplementedException();
            //   Result1.Text = string.Format("Value: {0:f2}", Slider1.Value);
            //  Slider1.Value = 0.5;

            //   if (Slider1.Value >= 1)
            //       DisplayAlert("Good", "max", "Ok");
        }
        private void HandleSliderChangedEvent(object sender, ValueChangedEventArgs e)
        {
            syncSlider.Value = ((int)Math.Round (e.NewValue / 25.0)) * 25;

            if (SyncValueChanged != null) {
                var changes = new ValueChangedEventArgs (e.OldValue, syncSlider.Value);
                SyncValueChanged.Invoke (this, changes);
            }
        }
        private void Slider_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            var newStep = Math.Round(e.NewValue / 100);

            mySlider.Value = newStep * 100;
            infoText.TranslateTo(mySlider.Value * ((mySlider.Width - infoText.ColumnDefinitions[0].Width.Value) / mySlider.Maximum), 0, 10);
            lblText.Text = mySlider.Value.ToString();
            SliderValueChanged?.Invoke(sender, e);
        }
Пример #28
0
        void Handle_OpacityValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            var value = Convert.ToDouble(e.NewValue);

            //userSettings.Opacity = opacity;
            if (!vm.UserSettings.Opacity.Equals(value))
            {
                vm.UpdateSettings("Opacity", value);
            }
        }
Пример #29
0
        // handle the two-armed max hang value input
        void Handle_MaxHang(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            double value = Math.Round(max.Value, 0);

            maxValue.Text             = value.ToString() + " lbs";
            currentAssessment.MaxHang = (value);
            heavy.Text    = "85% of max : " + (value * 0.85).ToString() + " lbs";
            moderate.Text = "75% of max : " + (value * 0.75).ToString() + " lbs";
            light.Text    = "65% of max : " + (value * 0.65).ToString() + " lbs";
        }
Пример #30
0
        void CambiarColor(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            var   rojo    = sldRojo.Value;
            var   azul    = sldAzul.Value;
            var   verde   = sldVerde.Value;
            Color bgColor = new Color(rojo, verde, azul);

            boxColor.BackgroundColor = bgColor;
            lbDisplay.Text           = ColorToHex(bgColor);
        }
		void SliderHeight_ValueChanged (object sender, ValueChangedEventArgs e)
		{
			if (e.NewValue * 10 > rowHeightValue + .5 && rowHeightValue < 5) {
				rowHeightValue++;
			}
			if (e.NewValue * 10 < rowHeightValue - .5 && rowHeightValue > 1) {
				rowHeightValue--;
			}
			firstRow.Height = new GridLength (rowHeightValue, GridUnitType.Star);
		}
Пример #32
0
        /*
         * protected override void OnAppearing()
         * {
         *  if (isNewEntry == 1)
         *  {
         *      Vitals vitalsItem = (Vitals)BindingContext;
         *      vitalsItem.rectime = DateTime.Now;
         *  }
         *
         * }*/


        private void mySlider_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            var StepValue = 1.0;
            var newStep   = Math.Round(e.NewValue / StepValue);
            var newValue  = newStep * StepValue;

            //SliderMain.Value
            txtResult.Text = "Rating : " + newValue.ToString();

            //txtResult.Text = "Value : " + mySlider.Value;
        }
Пример #33
0
        void Handle_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e)
        {
            double zoomLevel = e.NewValue;

            if (myMap.VisibleRegion != null)
            {
                double meters = System.Math.Pow(3, zoomLevel);
                logger.Info($"new slider value={zoomLevel} meters={meters}");
                myMap.MoveToRegion(MapSpan.FromCenterAndRadius(myMap.VisibleRegion.Center, Distance.FromMeters(meters)));
            }
        }
        void OnSliderValueChanged(object sender, ValueChangedEventArgs args)
        {
            AbsoluteLayout.SetLayoutBounds(label1,
                new Rectangle(args.NewValue, 0.5, AbsoluteLayout.AutoSize,
                                                  AbsoluteLayout.AutoSize));
            AbsoluteLayout.SetLayoutBounds(label2,
                new Rectangle(args.NewValue, 0.5, AbsoluteLayout.AutoSize,
                                                  AbsoluteLayout.AutoSize));

            label1.Opacity = 1 - args.NewValue;
            label2.Opacity = args.NewValue;
        }
        void OnSliderValueChanged(object sender, ValueChangedEventArgs args)
        {
            if (sender == redSlider)
            {
                redLabel.Text = String.Format("Red = {0:X2}", (int)redSlider.Value);
            }
            else if (sender == greenSlider)
            {
                greenLabel.Text = String.Format("Green = {0:X2}", (int)greenSlider.Value);
            }
            else if (sender == blueSlider)
            {
                blueLabel.Text = String.Format("Blue = {0:X2}", (int)blueSlider.Value);
            }

            boxView.Color = Color.FromRgb((int)redSlider.Value,
                                          (int)greenSlider.Value,
                                          (int)blueSlider.Value);
        }
Пример #36
0
		private void StepperValueChanged (object sender, ValueChangedEventArgs e)
		{
			Color color = Color.Lime;
			switch ((int)e.NewValue) {
			case 1:
				color = Color.Lime;
				break;
			case 2:
				color = Color.Blue;
				break;
			case 3:
				color = Color.Navy;
				break;
			case 4:
				color = Color.Purple;
				break;
			case 5:
				color = Color.Fuchsia;
				break;
			}

			boxView.BackgroundColor = color;
		}
 void OnSliderValueChanged(object sender, ValueChangedEventArgs args)
 {
     label.Text = String.Format("Slider = {0}", args.NewValue);
 }
Пример #38
0
		void onSliderChanged(object sender, ValueChangedEventArgs args){
			colorView.Color = Color.FromRgb ((int)rSlider.Value, (int)gSlider.Value, (int)bSlider.Value);
		}
Пример #39
0
 void StepperValueChanged (object sender, ValueChangedEventArgs e)
 {
     EventValue.Text = String.Format("Stepper value is {0:F1}", e.NewValue);
     PageValue.Text = TheStepper.Value.ToString();
 }
Пример #40
0
 void OnSldSleepValueChanged(object sender, ValueChangedEventArgs e)
 {
     var newStep = Math.Round(e.NewValue);
     vm.SleepHours = newStep * stepValue;
     //the following line makes it so the step changes are not smooth on the UI
     //sldSleep.Value = vm.SleepHours;
     lblSleep.Text = String.Format("slept {0} hours", vm.SleepHours);
 }
Пример #41
0
        private void OnSliderValueChanged(object sender, ValueChangedEventArgs e)
        {
            var newStep = Math.Round(e.NewValue / StepValue);

            Value = newStep * StepValue;
        }
 void labelSlider_ValueChanged(object sender, ValueChangedEventArgs e)
 {
     scale.LabelOffset = ((double)e.NewValue);
 }
 // Watch the slider to update the number in the header. CurrentUser.ConversationLimit is
 // updated automatically through two-way binding, but due to the Android nav bug we also
 // need to make sure the view model has its change flag set.
 async void SliderChanged(object sender, ValueChangedEventArgs e)
 {
     await viewModel.CheckChanges(enterState, ChangeCheckType.CategorySelection, false);
 }
Пример #44
0
		void OnValuesSliderValueChanged(object sender, ValueChangedEventArgs e)
		{
			if (urhoApp?.SelectedBar != null)
				urhoApp.SelectedBar.Value = (float)e.NewValue;
		}
 void OnSweepAngleChanged(object sender, ValueChangedEventArgs e)
 {
     SweepAngleLabel.Text = e.NewValue.ToString("N0");
 }
 void OnSliderValueChanged(object sender, 
                           ValueChangedEventArgs args)
 {
     valueLabel.Text = args.NewValue.ToString("F3");
 }
Пример #47
0
 void PreciseStepper_ValueChanged(object sender, ValueChangedEventArgs e)
 {
     if (Math.Abs(this.Value - 0) < 0.000000000001)
         this.Value = 0;
 }
 void slider_ValueChanged(object sender, ValueChangedEventArgs e)
 {
     if (map.VisibleRegion != null)
     {
         double dblZoom = e.NewValue;
         var lat = viewModel.Location.Latitude / (Math.Pow(2, dblZoom));
         var lon = viewModel.Location.Longitude / (Math.Pow(2, dblZoom));
         map.MoveToRegion(new MapSpan(map.VisibleRegion.Center, lat, lon));
     }
 }
Пример #49
0
        void ScoresPerLegSliderOnValueChanged(object sender, ValueChangedEventArgs args)
        {
            Slider ScoresPerLegSlider = (Slider)sender; //Enables access to the elements of SetsSlider
            StepValue = 100.0;

            double currentValue = ScoresPerLegSlider.Value;
            double nextStep = Math.Round(currentValue / StepValue);
            ScoresPerLegSlider.Value = (nextStep * StepValue);
            double SliderValue = ScoresPerLegSlider.Value;

            if (SliderValue > 101.99)
            {
                SliderValue = SliderValue + 1;
            }

            var sliderValueText = (SliderValue).ToString();
            ScoresPerLegLabel.Text = String.Format("Score Per Leg = {0}", sliderValueText);
        }
 void OnStepperValueChanged(object sender, ValueChangedEventArgs e)
 {
     label.Text = String.Format("Stepper value is {0:F1}", e.NewValue);
 }
Пример #51
0
 private void AgeSlider_ValueChanged(object sender, ValueChangedEventArgs e)
 {
     ageLabel.Text = "Age: " + (int) ageSlider.Value;
 }
Пример #52
0
        void LegsSliderOnValueChanged(object sender,  ValueChangedEventArgs args)
        {
            Slider LegsSlider = (Slider)sender; //Enables access to the elements of LegsSlider
            StepValue = 1.0;

            double currentValue = LegsSlider.Value;
            double nextStep = Math.Round(currentValue / StepValue);
            LegsSlider.Value = (nextStep * StepValue);
            double SliderValue = LegsSlider.Value;

            var sliderValueText = (SliderValue).ToString();
            LegsLabel.Text = String.Format("Number of Legs to Win = {0}", sliderValueText);


        }
Пример #53
0
 void OnStepperValueChanged(object sender, ValueChangedEventArgs e)
 {
     double i = e.NewValue;
     var item = (TapandGo.Data.ItemsListData)BindingContext;
     int id = item.ItemId;
     string itemName = item.ListDataItemName;
     double itemPrice = item.ListDataItemPrice;
     string listName = item.ListName;
     string itemPicture = item.ListDataItemPicture;
     string itemPricestr = item.ListDataItemPriceString;
     Database.Database.GetDatabase().UpdateItemQuantity(i, id, itemName, itemPrice, listName, itemPicture, itemPricestr);
     itemQuantity.Text = i.ToString ( );
 }
 void OnSliderValueChanged(object sender, ValueChangedEventArgs args)
 {
     boxView.Color = new Color(redSlider.Value, greenSlider.Value, blueSlider.Value);
 }
 void tickSlider_ValueChanged(object sender, ValueChangedEventArgs e)
 {
     major.Offset = ((double)e.NewValue);
 }
 void GoodStepper_ValueChanged(object sender, ValueChangedEventArgs e)
 {
     GoodLabel.Text = e.NewValue.ToString("N0");
 }
 void pointerSlider_ValueChanged(object sender, ValueChangedEventArgs e)
 {
     needlePointer.Value = e.NewValue;
     rangePointer.Value = e.NewValue;
 }
 void TargetStepper_ValueChanged(object sender, ValueChangedEventArgs e)
 {
     TargetLabel.Text = e.NewValue.ToString("N0");
 }
Пример #59
0
        void PlayerSlider_OnValueChanged(object sender, ValueChangedEventArgs args)
        {
            
            StepValue = 1.0;

            double currentValue = PlayersSlider.Value;
            double nextStep = Math.Round(currentValue / StepValue);
            PlayersSlider.Value = (nextStep * StepValue);
            double SliderValue = PlayersSlider.Value;

            var sliderValueText = (SliderValue).ToString();
            numberOfPlayers.Text = String.Format("Number of Players = {0}", sliderValueText);
        }
Пример #60
0
        void SetsSliderOnValueChanged(object sender, ValueChangedEventArgs args)
        {
            Slider SetsSlider = (Slider)sender; //Enables access to the elements of SetsSlider
   
            StepValue = 2.0;

            double currentValue = SetsSlider.Value;
            double nextStep = Math.Round(currentValue / StepValue);
            SetsSlider.Value = (nextStep * StepValue);
            double SliderValue = SetsSlider.Value;

            if (SliderValue > 1.99)
            {
                SliderValue = SliderValue + 1;
            }

            var sliderValueText = (SliderValue).ToString();
            SetsLabel.Text = String.Format("Number of Sets to Win = {0}", sliderValueText);
        }