Пример #1
0
        private double GetBoxValue(TextBox box, RealSlider track)
        {
            double oldValue = (double)track.Value;

            if (double.TryParse(box.Text, out oldValue))
            {
                return(oldValue * Math.Pow(10, realSlider.Decimals));
            }

            return(oldValue);
        }
Пример #2
0
        private void SetBoxValue(TextBox box, RealSlider track)
        {
            double value = track.DoubleValue;

            box.Text = String.Format("{0:0.##}", value);
        }