📄 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 + -