private string GetString(int seconds, object parameter) { var param = parameter as string; if (param.Equals("short")) { //if (seconds >= 1 && seconds < 21) //{ // return seconds.ToString(); //} //return ((seconds / 5) + 16).ToString(); return(seconds.ToString()); } if (seconds >= 1 && seconds < 21) { return(LocaleHelper.FormatTTLString(seconds)); } return(LocaleHelper.FormatTTLString((seconds - 16) * 5)); }
public object Convert(object value, Type targetType, object parameter, string language) { return(LocaleHelper.FormatTTLString(System.Convert.ToInt32(value))); }