Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
esb_agent
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
원종진
esb_agent
Commits
2cd93421
Commit
2cd93421
authored
Nov 05, 2019
by
원종진
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
..
parent
de45aaad
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
126 additions
and
22 deletions
+126
-22
ESB_Agent.dpr
+1
-0
InnoSeup Script/ESB_Agent.iss
+25
-0
InnoSeup Script/Output/Setup.zip
+0
-0
frmMainUnit.dfm
+10
-0
frmMainUnit.pas
+38
-6
frmResultUnit.dfm
+12
-10
frmResultUnit.pas
+40
-6
No files found.
ESB_Agent.dpr
View file @
2cd93421
...
...
@@ -44,6 +44,7 @@ begin
hMutex := CreateMutex(nil, True, C_MUTEX_NAME);
Application.Initialize;
Application.ShowMainForm := false;
Application.CreateForm(TfrmMain, frmMain);
Application.CreateForm(TfrmResult, frmResult);
...
...
InnoSeup Script/ESB_Agent.iss
0 → 100644
View file @
2cd93421
; -- 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";
InnoSeup Script/Output/Setup.zip
0 → 100644
View file @
2cd93421
File added
frmMainUnit.dfm
View file @
2cd93421
...
...
@@ -11,6 +11,7 @@ object frmMain: TfrmMain
Font.Name = #44404#47548#52404
Font.Style = []
OldCreateOrder = False
OnActivate = FormActivate
OnClose = FormClose
OnHide = FormHide
OnShow = FormShow
...
...
@@ -34,6 +35,15 @@ 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
...
...
frmMainUnit.pas
View file @
2cd93421
...
...
@@ -23,6 +23,7 @@ type
N10
:
TMenuItem
;
Button1
:
TButton
;
Button2
:
TButton
;
Button3
:
TButton
;
procedure
RxTrayIcon1DblClick
(
Sender
:
TObject
);
procedure
actTerminateAppExecute
(
Sender
:
TObject
);
procedure
FormShow
(
Sender
:
TObject
);
...
...
@@ -32,8 +33,11 @@ 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
...
...
@@ -70,7 +74,6 @@ var
Icon
:
TIcon
;
begin
inherited
;
// Scanner initialization
Open_Zebra
;
Discover_Zebra
;
...
...
@@ -202,11 +205,11 @@ begin
aEncodeStr
:=
AES128EncodeString
(
HexStrToStr
(
aHexStr
),
aAESKey
);
RstStr
:=
ReqDCInfo
(
aEncodeStr
);
with
frmResult
do
begin
SetResult
(
RstStr
);
Show
;
RstStr
:=
ReqDCInfo
(
aEncodeStr
);
SetResult
(
RstStr
);
end
;
end
;
...
...
@@ -214,11 +217,12 @@ procedure TfrmMain.Button1Click(Sender: TObject);
var
RstStr
:
String
;
begin
RstStr
:=
ReqDCInfo
(
'aa'
);
with
frmResult
do
begin
SetResult
(
RstStr
);
Show
;
RstStr
:=
ReqDCInfo
(
'aa'
);
SetResult
(
RstStr
);
end
;
end
;
...
...
@@ -226,12 +230,40 @@ 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
.
frmResultUnit.dfm
View file @
2cd93421
object frmResult: TfrmResult
Left = 8
89
Top =
189
Left = 8
91
Top =
225
BorderStyle = bsDialog
Caption = 'frmResult'
ClientHeight = 247
ClientHeight = 644
ClientWidth = 348
Color = clBtnFace
Font.Charset = ANSI_CHARSET
...
...
@@ -14,18 +13,21 @@ object frmResult: TfrmResult
FormStyle = fsStayOnTop
KeyPreview = True
OldCreateOrder = False
Position = poDefault
OnActivate = FormActivate
OnKeyPress = FormKeyPress
OnResize = FormResize
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 12
object ListBox1: TListBox
Left =
0
Top = 0
Width =
348
Height =
247
Left =
104
Top =
4
0
Width =
220
Height =
175
Style = lbOwnerDrawFixed
Align = alClient
BevelEdges = []
BevelInner = bvNone
BevelOuter = bvNone
BorderStyle = bsNone
Ctl3D = False
ExtendedSelect = False
...
...
frmResultUnit.pas
View file @
2cd93421
...
...
@@ -12,7 +12,11 @@ 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
;
...
...
@@ -22,6 +26,7 @@ type
destructor
Destroy
;
override
;
procedure
SetResult
(
const
aData
:
String
);
procedure
ClearData
;
end
;
var
...
...
@@ -44,6 +49,9 @@ var
begin
inherited
;
fResultList
:=
TQueryResultList
.
Create
;
Self
.
Color
:=
clWhite
;
icon
:=
TIcon
.
Create
;
try
Icon
.
Handle
:=
LoadIcon
(
hInstance
,
'ActiveIcon'
);
...
...
@@ -63,8 +71,7 @@ var
pDetailItem
:
PRecResultDetail
;
JSONArrIter
:
TSuperObjectIter
;
begin
fResultList
.
Clear
;
ListBox1
.
Items
.
Clear
;
ClearData
;
SuperObj
:=
SO
(
aData
);
aAESKey
:=
g_FacilityID
+
'scn2019x'
;
...
...
@@ -109,7 +116,6 @@ begin
ObjectFindClose
(
JSONArrIter
);
end
;
end
;
Self
.
Caption
:=
name
;
end
;
end
;
...
...
@@ -131,6 +137,7 @@ 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
;
...
...
@@ -138,7 +145,7 @@ begin
ValueStr
:=
PRecResultDetail
(
fResultList
.
Items
[
Index
])^.
Value
;
with
TListbox
(
Control
).
Canvas
do
begin
begin
if
odSelected
in
State
then
begin
Brush
.
Color
:=
$
00238
AFF
;
...
...
@@ -152,18 +159,45 @@ 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
.
원종진
@comternet
mentioned in commit
18f02537
Nov 05, 2019
mentioned in commit
18f02537
mentioned in commit 18f02537ca2b4637cd7be755ac7f8c932091d7ab
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment