예제 #1
0
        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));
        }
예제 #2
0
 public object Convert(object value, Type targetType, object parameter, string language)
 {
     return(LocaleHelper.FormatTTLString(System.Convert.ToInt32(value)));
 }