Exemple #1
0
        public static TdrError.ErrorType tdrTime2Str(ref TdrVisualBuf buf, uint time)
        {
            TdrTime time2 = new TdrTime();

            if (time2.parse(time) == TdrError.ErrorType.TDR_NO_ERROR)
            {
                object[] args = new object[] { time2.nHour, time2.bMin, time2.bSec };
                return(buf.sprintf("{0:d2}:{1:d2}:{2:d2}", args));
            }
            return(TdrError.ErrorType.TDR_ERR_INVALID_TDRTIME_VALUE);
        }
Exemple #2
0
        public static TdrError.ErrorType tdrTime2Str(ref TdrVisualBuf buf, uint time)
        {
            TdrTime tdrTime = new TdrTime();

            TdrError.ErrorType result;
            if (tdrTime.parse(time) == TdrError.ErrorType.TDR_NO_ERROR)
            {
                result = buf.sprintf("{0:d2}:{1:d2}:{2:d2}", new object[]
                {
                    tdrTime.nHour,
                    tdrTime.bMin,
                    tdrTime.bSec
                });
            }
            else
            {
                result = TdrError.ErrorType.TDR_ERR_INVALID_TDRTIME_VALUE;
            }
            return(result);
        }