unit DAipParserMain; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TDlgAipParserMain = class(TForm) edPath: TEdit; btnParser: TButton; mmInfo: TMemo; procedure btnParserClick(Sender: TObject); private { Private declarations } public { Public declarations } end; var DlgAipParserMain: TDlgAipParserMain; implementation uses Tocsg.AIP, Tocsg.Path, Tocsg.Convert, System.TimeSpan, System.DateUtils; {$R *.dfm} procedure TDlgAipParserMain.btnParserClick(Sender: TObject); var sExt, sLName: String; bIsEnc: Boolean; begin mmInfo.Clear; edPath.Text := Trim(edPath.Text); if not FileExists(edPath.Text) then begin MessageBox(Handle, PChar('Á¸ÀçÇÏÁö ¾Ê´Â ÆÄÀÏÀÔ´Ï´Ù.'), PChar(Caption), MB_ICONWARNING or MB_OK); exit; end; ShowMessage(BooleanToStr(IsAipEncryted(edPath.Text), 'AIP ¾ÏȣȭµÊ', '¾ÈµÊ')); exit; sLName := 'None'; bIsEnc := false; sExt := GetFileExt(edPath.Text).ToUpper; if sExt = 'PDF' then begin sLName := GetAipLabelNameFromPDF(edPath.Text); bIsEnc := IsAipEncrytedPDF(edPath.Text); end else if (sExt = 'DOC') or (sExt = 'XLS') or (sExt = 'PPT') then begin sLName := GetAipLabelNameFromOldOfficeDoc(edPath.Text); bIsEnc := IsAipEncrytedOldOfficeDoc(edPath.Text, ''); end else if (sExt = 'DOCX') or (sExt = 'XLSX') or (sExt = 'PPTX') or (sExt = 'ZIP') then begin sLName := GetAipLabelNameFromOfficeDoc(edPath.Text); bIsEnc := IsAipEncrytedOfficeDoc(edPath.Text, ''); end; mmInfo.Lines.Add('LabelName : ' + sLName); if bIsEnc then MessageBox(Handle, PChar('¾Ïȣȭ°¡ Àû¿ëµÇ¾î ÀÖ½À´Ï´Ù.'), PChar(Caption), MB_ICONINFORMATION or MB_OK) else MessageBox(Handle, PChar('ÀÏ¹Ý ÆÄÀÏ ÀÔ´Ï´Ù.'), PChar(Caption), MB_ICONWARNING or MB_OK); end; end.