Commit 18f02537 by 원종진

Revert ".."

This reverts commit 2cd93421.
parent 2cd93421
......@@ -44,7 +44,6 @@ begin
hMutex := CreateMutex(nil, True, C_MUTEX_NAME);
Application.Initialize;
Application.ShowMainForm := false;
Application.CreateForm(TfrmMain, frmMain);
Application.CreateForm(TfrmResult, frmResult);
......
; -- Example1.iss --
; Demonstrates copying 3 files and creating an icon.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
[Setup]
AppName="ESB Agent"
AppVersion=0.1
WizardStyle=modern
DefaultDirName="{autopf}\Hisco\ESB Agent"
DefaultGroupName="ESB Agent"
UninstallDisplayIcon={app}\esb_agent.exe
Compression=lzma2
SolidCompression=yes
OutputDir=.\Output
OutputBaseFilename=Setup
[Files]
Source: "..\bin\ESB_Agent.exe"; DestDir: "{app}"
Source: "..\bin\ESB_Agent.ini"; DestDir: "{app}"
Source: "..\bin\FMCUtils.dll"; DestDir: "{app}"
[Icons]
Name: "{group}\ESB Agent"; Filename: "{app}\Esb_Agent.exe";
Name: "{commonstartup}\ESB Agent"; Filename: "{app}\Esb_Agent.exe";
......@@ -11,7 +11,6 @@ object frmMain: TfrmMain
Font.Name = #44404#47548#52404
Font.Style = []
OldCreateOrder = False
OnActivate = FormActivate
OnClose = FormClose
OnHide = FormHide
OnShow = FormShow
......@@ -35,15 +34,6 @@ object frmMain: TfrmMain
TabOrder = 1
OnClick = Button2Click
end
object Button3: TButton
Left = 24
Top = 152
Width = 97
Height = 57
Caption = 'Button3'
TabOrder = 2
OnClick = Button3Click
end
object ActionManager1: TActionManager
Left = 400
Top = 72
......
......@@ -23,7 +23,6 @@ type
N10: TMenuItem;
Button1: TButton;
Button2: TButton;
Button3: TButton;
procedure RxTrayIcon1DblClick(Sender: TObject);
procedure actTerminateAppExecute(Sender: TObject);
procedure FormShow(Sender: TObject);
......@@ -33,11 +32,8 @@ type
procedure actShowConfigFormExecute(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
protected
procedure ScannerBarcodeEvent(ASender: TObject; eventType: Smallint; var pscanData: WideString);
procedure CreateParams(var Params: TCreateParams); override;
private
{ Private declarations }
private
......@@ -74,6 +70,7 @@ var
Icon : TIcon;
begin
inherited;
// Scanner initialization
Open_Zebra;
Discover_Zebra;
......@@ -205,11 +202,11 @@ begin
aEncodeStr := AES128EncodeString(HexStrToStr(aHexStr), aAESKey);
RstStr := ReqDCInfo(aEncodeStr);
with frmResult do
begin
SetResult(RstStr);
Show;
RstStr := ReqDCInfo(aEncodeStr);
SetResult(RstStr);
end;
end;
......@@ -217,12 +214,11 @@ procedure TfrmMain.Button1Click(Sender: TObject);
var
RstStr : String;
begin
RstStr := ReqDCInfo('aa');
with frmResult do
begin
Show;
RstStr := ReqDCInfo('aa');
SetResult(RstStr);
Show;
end;
end;
......@@ -230,40 +226,12 @@ procedure TfrmMain.Button2Click(Sender: TObject);
var
RstStr : String;
begin
RstStr := ReqDCInfo('VGuPMlIvv+qjao/YXKDe5A==');
with frmResult do
begin
Show;
RstStr := ReqDCInfo('VGuPMlIvv+qjao/YXKDe5A==');
SetResult(RstStr);
end;
end;
procedure TfrmMain.Button3Click(Sender: TObject);
var
aAESKey : String;
RstStr : String;
begin
aAESKey := g_FacilityID + 'scn2019x';
with frmResult do
begin
Show;
RstStr := ReqDCInfo(AES128EncodeString('', aAESKey));
SetResult(RstStr);
end;
end;
procedure TfrmMain.FormActivate(Sender: TObject);
begin
SetWindowLong(Handle, GWL_EXSTYLE,
GetWindowLong(Handle, GWL_EXSTYLE) or
WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);
ShowWindow(Application.Handle, SW_HIDE);
end;
procedure TfrmMain.CreateParams(var Params: TCreateParams);
begin
inherited;
end;
end.
object frmResult: TfrmResult
Left = 891
Top = 225
Left = 889
Top = 189
BorderStyle = bsDialog
ClientHeight = 644
Caption = 'frmResult'
ClientHeight = 247
ClientWidth = 348
Color = clBtnFace
Font.Charset = ANSI_CHARSET
......@@ -13,21 +14,18 @@ object frmResult: TfrmResult
FormStyle = fsStayOnTop
KeyPreview = True
OldCreateOrder = False
OnActivate = FormActivate
Position = poDefault
OnKeyPress = FormKeyPress
OnResize = FormResize
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 12
object ListBox1: TListBox
Left = 104
Top = 40
Width = 220
Height = 175
Left = 0
Top = 0
Width = 348
Height = 247
Style = lbOwnerDrawFixed
BevelEdges = []
BevelInner = bvNone
BevelOuter = bvNone
Align = alClient
BorderStyle = bsNone
Ctl3D = False
ExtendedSelect = False
......
......@@ -12,11 +12,7 @@ type
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure ListBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
procedure FormResize(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormActivate(Sender: TObject);
protected
procedure CreateParams(var Params: TCreateParams); override;
private
{ Private declarations }
fResultList : TQueryResultList;
......@@ -26,7 +22,6 @@ type
destructor Destroy; override;
procedure SetResult(const aData : String);
procedure ClearData;
end;
var
......@@ -49,9 +44,6 @@ var
begin
inherited;
fResultList := TQueryResultList.Create;
Self.Color := clWhite;
icon := TIcon.Create;
try
Icon.Handle := LoadIcon(hInstance, 'ActiveIcon');
......@@ -71,7 +63,8 @@ var
pDetailItem : PRecResultDetail;
JSONArrIter : TSuperObjectIter;
begin
ClearData;
fResultList.Clear;
ListBox1.Items.Clear;
SuperObj := SO(aData);
aAESKey := g_FacilityID + 'scn2019x';
......@@ -116,6 +109,7 @@ begin
ObjectFindClose(JSONArrIter);
end;
end;
Self.Caption := name;
end;
end;
......@@ -137,7 +131,6 @@ procedure TfrmResult.ListBox1DrawItem(Control: TWinControl; Index: Integer;
var
KeyStr, ValueStr : String;
begin
inherited;
if Index < 0 then exit;
if Index > fResultList.Count-1 then exit;
......@@ -145,7 +138,7 @@ begin
ValueStr := PRecResultDetail(fResultList.Items[Index])^.Value;
with TListbox(Control).Canvas do
begin
begin
if odSelected in State then
begin
Brush.Color := $00238AFF;
......@@ -159,45 +152,18 @@ begin
Rectangle(Rect);
Font.Style := [fsBold];
Pen.Color := clBlack;
Pen.Width := 1;
DrawTextEx(Handle, PChar(KeyStr), Length(KeyStr), Rect, DT_VCENTER or DT_SINGLELINE or DT_LEFT, nil);
DrawTextEx(Handle, PChar(ValueStr), Length(ValueStr), Rect, DT_VCENTER or DT_SINGLELINE or DT_RIGHT, nil);
end;
end;
procedure TfrmResult.ClearData;
begin
fResultList.Clear;
ListBox1.Items.Clear;
end;
procedure TfrmResult.FormResize(Sender: TObject);
begin
ListBox1.Left := 5;
ListBox1.Width := Self.Width - 17;
ListBox1.Top := 5;
ListBox1.Height := Self.Height - 10;
end;
procedure TfrmResult.FormShow(Sender: TObject);
begin
Self.Height := 683;
Self.Left := Screen.Width - Self.Width;
Self.Top := Screen.Height - Self.Height - 45;
end;
procedure TfrmResult.FormActivate(Sender: TObject);
begin
SetWindowLong(Handle, GWL_EXSTYLE,
GetWindowLong(Handle, GWL_EXSTYLE) or
WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);
ShowWindow(Application.Handle, SW_HIDE);
end;
procedure TfrmResult.CreateParams(var Params: TCreateParams);
begin
inherited;
end;
end.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment