BrrrBayBay.PwmGUIControl.PwmChannelControl.updateSliderPosition C# (CSharp) Метод

updateSliderPosition() приватный Метод

Updates the slider position with the current duty cycle value
private updateSliderPosition ( ) : void
Результат void
        private void updateSliderPosition()
        {
            try
            {
                sliderProgrammaticallyChanged = true;
                double period = 1 / tmpFrequency;
                double percentage = (tmpDc / period) * 100;
                dutyCycleBar.Value = (int)Math.Round(percentage);
            }
            finally
            {
                sliderProgrammaticallyChanged = false;
            }
        }