private Tizen.NUI.CommonUI.Slider CreateDA(string style, int posX, int posY, int w, int h, int curValue, Tizen.NUI.CommonUI.Slider.DirectionType dir) { Tizen.NUI.CommonUI.Slider source = new Tizen.NUI.CommonUI.Slider(style); source.Name = style; source.Direction = dir; root.Add(source); source.Focusable = true; source.MinValue = MIN_VALUE; source.MaxValue = MAX_VALUE; source.ValueChangedEvent += OnValueChanged; source.Position2D = new Position2D(posX, posY); source.Size2D = new Size2D(w, h); source.CurrentValue = curValue; return(source); }
private void OnStateChanged(object sender, Tizen.NUI.CommonUI.Slider.StateChangedArgs args) { Console.WriteLine("args.CurrentState = " + args.CurrentState); if (sender is Tizen.NUI.CommonUI.Slider) { Tizen.NUI.CommonUI.Slider slider = sender as Tizen.NUI.CommonUI.Slider; if (slider != null) { //if (args.CurrentState == States.Normal) //{ // slider_sr[0].ThumbImageURL = "*DemoRes*/images/FH3/9. Controller/controller_btn_slide_handler_normal.png"; //} //else if (args.CurrentState == States.Focused || args.CurrentState == States.Pressed) //{ // slider_sr[0].ThumbImageURL = "*DemoRes*/images/FH3/9. Controller/controller_btn_slide_handler_press.png"; //} } } }
private void OnValueChanged(object sender, Tizen.NUI.CommonUI.Slider.ValueChangedArgs args) { Console.WriteLine("args.CurrentValue = " + args.CurrentValue); if (sender is Tizen.NUI.CommonUI.Slider) { Tizen.NUI.CommonUI.Slider slider = sender as Tizen.NUI.CommonUI.Slider; if (slider != null) { inforText.Text = "name = " + slider.Name + ", currentValue = " + args.CurrentValue; } } else if (sender is Tizen.NUI.CommonUI.Slider) { Tizen.NUI.CommonUI.Slider slider = sender as Tizen.NUI.CommonUI.Slider; if (slider != null) { inforText.Text = "name = " + slider.Name + ", currentValue = " + args.CurrentValue; } } }