捐赠 | 广告 | 注册 | 发布 | 上传 | 关于我们    
  沪ICP备05001939号 DELPHI盒子 | 盒子论坛 | 盒子文章 | 盒子问答悬赏 | 最新更新 | 论坛检索 | 下载中心 | 高级搜索    
  精品专区 | 繁體中文 | 奖励公告栏 | 直通车账号登陆 | 关闭GOOGLE广告 | 临时留言    
 
广告
评论:LRC歌词文件解析单元
aping08 36078 2008/11/6 21:28:43
formatstr
这个有没有呀?
aping08 36077 2008/11/6 21:19:07
好东西
itisgood 33528 2008/4/1 16:53:36
是啊,给个演示,怎么调用
whsbk 31901 2007/11/21 10:25:31
兄弟给个使用该类的演示程序吧,谢了
jack011 24762 2006/7/4 15:33:37
这个程序,在多个时间列表的时候,好象没有分开吧!

比如  [03:31.52][02:58.62][01:25.67]何必一再说慌
      [03:34.52][03:01.85][01:28.70]来帮美梦化装
      [03:04.83][01:31.70]沉醉但醉醒更长

说错了,请大虾见谅
luckywangxw 19178 2005/11/14 9:47:40
函数
//转化时间(毫秒) 为 时间字符串
//   RestTime: 是否为 剩余时间
//   AutoHour: 是否 小时 为自动显示模式(有小时则显示,否则不显示)
//   ShowMS  : 是否 显示毫秒
//   UseColon : 中间用冒号 隔开,否则 用 "时、分、秒"
function ConvertTimeToTimestr(aTimePos,aTimeLen:longInt;RestTime,AutoHour,ShowMS,UseColon:boolean):string;

function ConvertTimeToTimestr(aTimePos,aTimeLen:longInt;RestTime,AutoHour,ShowMS,UseColon:boolean):string;
var
   vHou,vMin,vSec:integer;
   vSecR:real;
   sHou,sMin,sSec:string;

   isFu:boolean;//该时间 是否为负

   lbstr:string;
begin
    vHou:=0;
    isFu:= ( aTimePos<0) ;
    lbStr:=';
    if isFu and Not RestTime then
    begin
       aTimePos:=-aTimePos;
       lbStr:='-';
    end;

    if not RestTime then
      begin
        if aTimePos> 3600000 then begin
          vHou:=trunc(aTimePos / 3600000) ;
          vMin:=trunc((aTimePos-vHou*3600000) / 60000);
          vSec:=trunc((aTimePos-vHou*3600000-vMin*60000) / 1000);
          vSecR:=(aTimePos-vHou*3600000-vMin*60000) / 1000;
        end
        else
        begin
          vMin:=trunc(aTimePos / 60000);
          vSec:=trunc((aTimePos-vMin*60000) / 1000);
          vSecR:=(aTimePos-vMin*60000) / 1000;
        end;
      end
    else          // 剩余时间
      begin
        if aTimeLen-aTimePos > 3600000 then begin
          vHou:=trunc((aTimeLen-aTimePos) / 3600000) ;
          vMin:=trunc(((aTimeLen-aTimePos)-vHou*3600000) / 60000);
          vSec:=trunc(((aTimeLen-aTimePos)-vHou*3600000-vMin*60000) / 1000);
          vSecR:=((aTimeLen-aTimePos)-vHou*3600000-vMin*60000) / 1000;
        end
        else
        begin
          vMin:=trunc((aTimeLen-aTimePos) / 60000);
          vSec:=trunc(((aTimeLen-aTimePos)-vMin*60000) / 1000);
          vSecR:=((aTimeLen-aTimePos)-vMin*60000) / 1000;
        end;
    end;

  if vHou<>0 then
    sHou:=  formatstr(inttostr(vHou),2,true,false)
  else
    sHou:=';

  sMin:=  formatstr(inttostr(vMin),2,true,false);

  if ShowMS then   //是否显示 毫秒
    sSec:= formatfloat('00.000',vSecR)
  else
    sSec:=  formatstr(inttostr(vSec),2,true,false);

  if UseColon then begin
      if AutoHour then begin
        if shou<>' then
          result:=lbStr + sHou+':'+sMin+':'+sSec
        else
          result:=lbStr + sMin+':'+sSec
      end
      else
        result:=lbStr + sHou+':'+sMin+':'+sSec;
    end
  else
    begin
      if AutoHour then begin
        if shou<>' then
          result:=lbStr + inttostr(strtoInt(sHou))+'时'+inttostr(strtoInt(sMin))+'分'+inttostr(strtoInt(sSec))+'秒'
        else
          result:=lbStr + inttostr(strtoInt(sMin))+'分'+inttostr(strtoInt(sSec))+'秒'
      end
      else
        result:=lbStr + inttostr(strtoInt(sHou))+'时'+inttostr(strtoInt(sMin))+'分'+inttostr(strtoInt(sSec))+'秒';
    end;

  if RestTime then
      Result:='-'+Result;
end;
luckywangxw 18773 2005/10/31 8:42:22
ConvertTimeToTimestr函数,我忘记发了,是在别的单元内,目前手边没有,大家可以用datetimetostr或简单一点函数来代替,以后有机会我一定发上来
w3k 18613 2005/10/23 8:59:52
不全的代码转上来做什么?做人要厚道嘛!
sail2000 18607 2005/10/22 18:26:56
缺少ConvertTimeToTimestr()函數;
mygod007 18593 2005/10/22 9:17:55
很好,我很喜欢。。。
第一页 上一页 下一页 最后页 有 10 条纪录 共1页 1 - 10
 用户名:
 密 码:
自动登陆(30天有效)
 
  DELPHI盒子版权所有 1999-2023 V4.01 粤ICP备10103342号-1 更新RSS列表