public void setSliderImgLocFromInput(decimal input) { if (input >= 0m && input <= 1m) { SLoc = Math.Round(input, 3); this.input.Text = SLoc.ToString(); chev.Left = (int)(SLoc * (Width - 1) + SliderLinesOffset - SliderChevRadius); } }
private void setSliderLocFromSliderImgLoc() { SLoc = Math.Round((decimal)(chev.Left - SliderLinesOffset + SliderChevRadius) / (Width - 1), 3); input.Text = SLoc.ToString(); }