protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (!isTouched) { return; } if (e.LeftButton == MouseButtonState.Released) { isTouched = false; return; } Point pt = e.GetPosition(this); int num = (int)((pt.X - Mar) / marAndWidth); if (num < 0) { num = 0; } else if (num >= MaxLedNum) { num = MaxLedNum; } SliderValueChanged?.Invoke(this, num); }
protected override void StartTouch(PTouch args) { if (Contains(args)) { SliderValueChanged?.Invoke(ValueFromPoint(args.Position)); } }
private void UpdateSlice(double value) { value /= 100; SliderPercentage = value; SliderValueChanged.Raise(this); if (DataContext == null) { return; } var dataSource3D = (IUniformDataSource3D <Vector3D>)DataContext; var slice = CreateSection(dataSource3D, value); plotter.DataContext = slice; isoline.DataSource = slice.GetMagnitudeDataSource(); }
protected override void OnMouseWheel(MouseWheelEventArgs e) { base.OnMouseWheel(e); if (!this.IsFocused) { return; } int num = LedNum + e.Delta / 120; if (num < 0) { num = 0; } else if (num >= MaxLedNum) { num = MaxLedNum; } SliderValueChanged?.Invoke(this, num); }
protected override void OnMouseDown(MouseButtonEventArgs e) { this.Focus(); this.CaptureMouse(); Point pt = e.GetPosition(this); int num = (int)((pt.X - Mar) / marAndWidth); if (pt.X >= (num * marAndWidth /*+ Mar*/) && pt.X < this.ActualWidth - Mar /*((num + 1) * marAndWidth)*/) { if (num < 0) { num = 0; } else if (num >= MaxLedNum) { num = MaxLedNum; } isTouched = true; SliderValueChanged?.Invoke(this, num); } }
private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e) { SliderValueChanged?.Invoke(sender, e); }
public CSettingsSlider(SliderValueChanged valueChangeDelegate) { if (< > f__am$cache8 == null) {
private void slider_ValueChanged(object sender, EventArgs e) { this.SliderValue = this.slider.Value; SliderValueChanged?.Invoke(sender, e); }
private void OnSliderValueChange(EventArgs e) { SliderValueChanged?.Invoke(this, e); }
void Handle_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e) { SliderValueChanged?.Invoke(this, e.NewValue); }