82 lines
2.5 KiB
Plaintext
82 lines
2.5 KiB
Plaintext
unit DKvFilterMain;
|
|
|
|
interface
|
|
|
|
uses
|
|
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
|
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
|
|
|
|
type
|
|
TDlgKvFilterMain = class(TForm)
|
|
Button1: TButton;
|
|
edPath: TEdit;
|
|
procedure Button1Click(Sender: TObject);
|
|
private
|
|
{ Private declarations }
|
|
public
|
|
{ Public declarations }
|
|
end;
|
|
|
|
var
|
|
DlgKvFilterMain: TDlgKvFilterMain;
|
|
|
|
implementation
|
|
|
|
uses
|
|
Tocsg.KvFilter, Tocsg.Safe, Tocsg.KvFilter.types, Tocsg.KvFilter.adinfo,
|
|
Tocsg.KvFilter.Kwautdef, Tocsg.Path;
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure TDlgKvFilterMain.Button1Click(Sender: TObject);
|
|
var
|
|
kv: TKvFilter;
|
|
StrList: TStringList;
|
|
sModuleDir: String;
|
|
begin
|
|
edPath.Text := Trim(edPath.Text);
|
|
|
|
if edPath.Text = '' then
|
|
begin
|
|
MessageBox(Handle, PChar('파일을 입력해 주십시오.'), PChar(Caption), MB_ICONWARNING or MB_OK);
|
|
exit;
|
|
end;
|
|
|
|
if not FileExists(edPath.Text) then
|
|
begin
|
|
MessageBox(Handle, PChar('존재하지 않는 파일입니다.'), PChar(Caption), MB_ICONWARNING or MB_OK);
|
|
exit;
|
|
end;
|
|
|
|
sModuleDir := 'C:\taskToCSG\eCrmHE\OUT_Debug - Win64\bin';
|
|
if not DirectoryExists(sModuleDir) then
|
|
sModuleDir := GetRunExePathDir + '\bin';
|
|
|
|
Guard(kv, TKvFilter.Create(sModuleDir));
|
|
kv.FilterFile(edPath.Text, edPath.Text + '.txt');
|
|
|
|
// ShowMessage(IntToStr(SizeOf(TKvSummaryInfoEx)));
|
|
//exit;
|
|
// Guard(kv, TKvFilter.Create('C:\taskToCSG\eCrmHE\OUT_Debug - Win32\bin\'));
|
|
// Guard(StrList, TStringList.Create);
|
|
// kv.FilterFile('C:\Users\tocsg\Desktop\20220415_주간보고_김구진_DCS팀.xlsx',
|
|
// 'C:\Users\tocsg\Desktop\20220415_주간보고_김구진_DCS팀.xlsx.txt');
|
|
// kv.FilterFile('C:\Users\tocsg\Desktop\(eCRM) 2022년 제품로드맵.pptx',
|
|
// 'C:\Users\tocsg\Desktop\(eCRM) 2022년 제품로드맵.pptx.txt');
|
|
// kv.FilterFile('C:\taskToCSG\Tocsg.Codesign\EV code 신청서.docx',
|
|
// 'C:\Users\tocsg\Desktop\EV code 신청서.docx.txt');
|
|
// kv.FilterFile('D:\DCS\1000. Team\1100. Internal Doc\1170. 사업정보모음\1. 2022년 글로벌IP스타기업 모집공고.hwp',
|
|
// 'C:\Users\tocsg\Desktop\1. 2022년 글로벌IP스타기업 모집공고.hwp.txt');
|
|
// kv.DoSummaryInfo('C:\Users\tocsg\Desktop\20220415_주간보고_김구진_DCS팀.xlsx', StrList);
|
|
// ShowMessage(StrList.Text);
|
|
// kv.DoSummaryInfo('C:\Users\tocsg\Desktop\(eCRM) 2022년 제품로드맵.pptx', StrList);
|
|
// ShowMessage(StrList.Text);
|
|
// kv.DoSummaryInfo('C:\taskToCSG\Tocsg.Codesign\EV code 신청서.docx', StrList);
|
|
// ShowMessage(StrList.Text);
|
|
// kv.AutoDetectFile('C:\Users\tocsg\Desktop\20220415_주간보고_김구진_DCS팀.xlsx');
|
|
|
|
|
|
end;
|
|
|
|
end.
|