?? urecordcenter.pas
字號:
unit uRecordcenter;
interface
uses DjBase,SysUtils;
type
TRecordCenter = class
private
CountNum:array[0..MaxChannel-1] of integer;
protected
public
RecordPath:string;
constructor Create;
destructor Destroy;override;
function GetRecordFileName(ChnlID:integer):string;
end;
var
RecordCenter:TRecordCenter ;
implementation
{ TRecordCenter }
constructor TRecordCenter.Create;
var
i:integer;
begin
for i := low(CountNum) to high(CountNum) do
CountNum[i] := 0;
end;
destructor TRecordCenter.Destroy;
begin
inherited;
end;
function TRecordCenter.GetRecordFileName(ChnlID: integer): string;
var
FilePath:string;
FileName:string;
begin
Result := '';
FilePath := RecordPath + IntToStr(ChnlID);
if not DirectoryExists(FilePath) then
CreateDir(FilePath);
FilePath := FilePath + '\' + FormatDateTime('YYYY',now) ;
if not DirectoryExists(FilePath) then
CreateDir(FilePath) ;
FilePath := FilePath + '\' + FormatDateTime('MM',now) ;
if not DirectoryExists(FilePath) then
CreateDir(FilePath) ;
inc(CountNum[ChnlID]);
FileName := FormatDateTime('YYMMDDHHNNSS',now)+'_'+IntToStr(ChnlID) +'_'+ IntToStr(CountNum[ChnlID])+'.pcm';
Result := FilePath + '\' + FileName ;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -