public override string GetRatioString(double ratio) { int r = (int)(ratio * 100 * 2); if (r > MAXRATIO) { return(STR_MAPPING.ElementAt(MAXRATIO + DELTA).ToString()); } else if (r < MINRATIO) { return(STR_MAPPING.ElementAt(MINRATIO + DELTA).ToString()); } else { return(STR_MAPPING.ElementAt(r + DELTA).ToString()); } }
public override string GetRatioString(double ratio) { double val = ((ratio * 100) / StepChar_); int r = (int)Math.Round(val); delta_ = maxRatio_; if (r > maxRatio_) { return(STR_MAPPING.ElementAt(maxRatio_ + delta_).ToString()); } else if (r < minRatio_) { return(STR_MAPPING.ElementAt(minRatio_ + delta_).ToString()); } else { return(STR_MAPPING.ElementAt(r + delta_).ToString()); } }