protected virtual void OnRangedChanged(RangeSliderEventArgs e) { if (RangeChanged != null) { RangeChanged(this, e); } }
private void ColorModelRangeSlider2_RangeChanged(object sender, RangeSliderEventArgs e) { m_rangeUpper2 = (ushort)((float)e.Maximum / 100.0f * (float)m_maxPixelValue); m_rangeLower2 = (ushort)((float)e.Minimum / 100.0f * (float)m_maxPixelValue); if (m_vm.bitmap2 != null && m_imageTool != null) { m_imageTool.Convert_GrayscaleToColor(m_rangeLower2, m_rangeUpper2); m_imageTool.Download_ColorImage(out m_colorImageData2, m_vm.width2, m_vm.height2); // display the image Int32Rect displayRect = new Int32Rect(0, 0, m_vm.width2, m_vm.height2); m_vm.bitmap2.Lock(); m_vm.bitmap2.WritePixels(displayRect, m_colorImageData2, m_vm.width2 * 4, 0); m_vm.bitmap2.Unlock(); } }
private void UpperSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e) { RangeSliderEventArgs e1 = new RangeSliderEventArgs(LowerSlider.Value, UpperSlider.Value); OnRangedChanged(e1); }