Commit 18f02537 by 원종진

Revert ".."

This reverts commit 2cd93421.
parent 2cd93421
...@@ -44,7 +44,6 @@ begin ...@@ -44,7 +44,6 @@ begin
hMutex := CreateMutex(nil, True, C_MUTEX_NAME); hMutex := CreateMutex(nil, True, C_MUTEX_NAME);
Application.Initialize; Application.Initialize;
Application.ShowMainForm := false; Application.ShowMainForm := false;
Application.CreateForm(TfrmMain, frmMain); Application.CreateForm(TfrmMain, frmMain);
Application.CreateForm(TfrmResult, frmResult); 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 ...@@ -11,7 +11,6 @@ object frmMain: TfrmMain
Font.Name = #44404#47548#52404 Font.Name = #44404#47548#52404
Font.Style = [] Font.Style = []
OldCreateOrder = False OldCreateOrder = False
OnActivate = FormActivate
OnClose = FormClose OnClose = FormClose
OnHide = FormHide OnHide = FormHide
OnShow = FormShow OnShow = FormShow
...@@ -35,15 +34,6 @@ object frmMain: TfrmMain ...@@ -35,15 +34,6 @@ object frmMain: TfrmMain
TabOrder = 1 TabOrder = 1
OnClick = Button2Click OnClick = Button2Click
end end
object Button3: TButton
Left = 24
Top = 152
Width = 97
Height = 57
Caption = 'Button3'
TabOrder = 2
OnClick = Button3Click
end
object ActionManager1: TActionManager object ActionManager1: TActionManager
Left = 400 Left = 400
Top = 72 Top = 72
......
...@@ -23,7 +23,6 @@ type ...@@ -23,7 +23,6 @@ type
N10: TMenuItem; N10: TMenuItem;
Button1: TButton; Button1: TButton;
Button2: TButton; Button2: TButton;
Button3: TButton;
procedure RxTrayIcon1DblClick(Sender: TObject); procedure RxTrayIcon1DblClick(Sender: TObject);
procedure actTerminateAppExecute(Sender: TObject); procedure actTerminateAppExecute(Sender: TObject);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
...@@ -33,11 +32,8 @@ type ...@@ -33,11 +32,8 @@ type
procedure actShowConfigFormExecute(Sender: TObject); procedure actShowConfigFormExecute(Sender: TObject);
procedure Button1Click(Sender: TObject); procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject); procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
protected protected
procedure ScannerBarcodeEvent(ASender: TObject; eventType: Smallint; var pscanData: WideString); procedure ScannerBarcodeEvent(ASender: TObject; eventType: Smallint; var pscanData: WideString);
procedure CreateParams(var Params: TCreateParams); override;
private private
{ Private declarations } { Private declarations }
private private
...@@ -74,6 +70,7 @@ var ...@@ -74,6 +70,7 @@ var
Icon : TIcon; Icon : TIcon;
begin begin
inherited; inherited;
// Scanner initialization // Scanner initialization
Open_Zebra; Open_Zebra;
Discover_Zebra; Discover_Zebra;
...@@ -205,11 +202,11 @@ begin ...@@ -205,11 +202,11 @@ begin
aEncodeStr := AES128EncodeString(HexStrToStr(aHexStr), aAESKey); aEncodeStr := AES128EncodeString(HexStrToStr(aHexStr), aAESKey);
RstStr := ReqDCInfo(aEncodeStr);
with frmResult do with frmResult do
begin begin
SetResult(RstStr);
Show; Show;
RstStr := ReqDCInfo(aEncodeStr);
SetResult(RstStr);
end; end;
end; end;
...@@ -217,12 +214,11 @@ procedure TfrmMain.Button1Click(Sender: TObject); ...@@ -217,12 +214,11 @@ procedure TfrmMain.Button1Click(Sender: TObject);
var var
RstStr : String; RstStr : String;
begin begin
RstStr := ReqDCInfo('aa');
with frmResult do with frmResult do
begin begin
Show;
RstStr := ReqDCInfo('aa');
SetResult(RstStr); SetResult(RstStr);
Show;
end; end;
end; end;
...@@ -230,40 +226,12 @@ procedure TfrmMain.Button2Click(Sender: TObject); ...@@ -230,40 +226,12 @@ procedure TfrmMain.Button2Click(Sender: TObject);
var var
RstStr : String; RstStr : String;
begin begin
RstStr := ReqDCInfo('VGuPMlIvv+qjao/YXKDe5A==');
with frmResult do with frmResult do
begin begin
Show;
RstStr := ReqDCInfo('VGuPMlIvv+qjao/YXKDe5A==');
SetResult(RstStr); SetResult(RstStr);
end;
end;
procedure TfrmMain.Button3Click(Sender: TObject);
var
aAESKey : String;
RstStr : String;
begin
aAESKey := g_FacilityID + 'scn2019x';
with frmResult do
begin
Show; Show;
RstStr := ReqDCInfo(AES128EncodeString('', aAESKey));
SetResult(RstStr);
end; end;
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. end.
object frmResult: TfrmResult object frmResult: TfrmResult
Left = 891 Left = 889
Top = 225 Top = 189
BorderStyle = bsDialog BorderStyle = bsDialog
ClientHeight = 644 Caption = 'frmResult'
ClientHeight = 247
ClientWidth = 348 ClientWidth = 348
Color = clBtnFace Color = clBtnFace
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
...@@ -13,21 +14,18 @@ object frmResult: TfrmResult ...@@ -13,21 +14,18 @@ object frmResult: TfrmResult
FormStyle = fsStayOnTop FormStyle = fsStayOnTop
KeyPreview = True KeyPreview = True
OldCreateOrder = False OldCreateOrder = False
OnActivate = FormActivate Position = poDefault
OnKeyPress = FormKeyPress OnKeyPress = FormKeyPress
OnResize = FormResize
OnShow = FormShow OnShow = FormShow
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 12 TextHeight = 12
object ListBox1: TListBox object ListBox1: TListBox
Left = 104 Left = 0
Top = 40 Top = 0
Width = 220 Width = 348
Height = 175 Height = 247
Style = lbOwnerDrawFixed Style = lbOwnerDrawFixed
BevelEdges = [] Align = alClient
BevelInner = bvNone
BevelOuter = bvNone
BorderStyle = bsNone BorderStyle = bsNone
Ctl3D = False Ctl3D = False
ExtendedSelect = False ExtendedSelect = False
......
...@@ -12,11 +12,7 @@ type ...@@ -12,11 +12,7 @@ type
procedure FormKeyPress(Sender: TObject; var Key: Char); procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure ListBox1DrawItem(Control: TWinControl; Index: Integer; procedure ListBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState); Rect: TRect; State: TOwnerDrawState);
procedure FormResize(Sender: TObject);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure FormActivate(Sender: TObject);
protected
procedure CreateParams(var Params: TCreateParams); override;
private private
{ Private declarations } { Private declarations }
fResultList : TQueryResultList; fResultList : TQueryResultList;
...@@ -26,7 +22,6 @@ type ...@@ -26,7 +22,6 @@ type
destructor Destroy; override; destructor Destroy; override;
procedure SetResult(const aData : String); procedure SetResult(const aData : String);
procedure ClearData;
end; end;
var var
...@@ -49,9 +44,6 @@ var ...@@ -49,9 +44,6 @@ var
begin begin
inherited; inherited;
fResultList := TQueryResultList.Create; fResultList := TQueryResultList.Create;
Self.Color := clWhite;
icon := TIcon.Create; icon := TIcon.Create;
try try
Icon.Handle := LoadIcon(hInstance, 'ActiveIcon'); Icon.Handle := LoadIcon(hInstance, 'ActiveIcon');
...@@ -71,7 +63,8 @@ var ...@@ -71,7 +63,8 @@ var
pDetailItem : PRecResultDetail; pDetailItem : PRecResultDetail;
JSONArrIter : TSuperObjectIter; JSONArrIter : TSuperObjectIter;
begin begin
ClearData; fResultList.Clear;
ListBox1.Items.Clear;
SuperObj := SO(aData); SuperObj := SO(aData);
aAESKey := g_FacilityID + 'scn2019x'; aAESKey := g_FacilityID + 'scn2019x';
...@@ -116,6 +109,7 @@ begin ...@@ -116,6 +109,7 @@ begin
ObjectFindClose(JSONArrIter); ObjectFindClose(JSONArrIter);
end; end;
end; end;
Self.Caption := name; Self.Caption := name;
end; end;
end; end;
...@@ -137,7 +131,6 @@ procedure TfrmResult.ListBox1DrawItem(Control: TWinControl; Index: Integer; ...@@ -137,7 +131,6 @@ procedure TfrmResult.ListBox1DrawItem(Control: TWinControl; Index: Integer;
var var
KeyStr, ValueStr : String; KeyStr, ValueStr : String;
begin begin
inherited;
if Index < 0 then exit; if Index < 0 then exit;
if Index > fResultList.Count-1 then exit; if Index > fResultList.Count-1 then exit;
...@@ -145,7 +138,7 @@ begin ...@@ -145,7 +138,7 @@ begin
ValueStr := PRecResultDetail(fResultList.Items[Index])^.Value; ValueStr := PRecResultDetail(fResultList.Items[Index])^.Value;
with TListbox(Control).Canvas do with TListbox(Control).Canvas do
begin begin
if odSelected in State then if odSelected in State then
begin begin
Brush.Color := $00238AFF; Brush.Color := $00238AFF;
...@@ -159,45 +152,18 @@ begin ...@@ -159,45 +152,18 @@ begin
Rectangle(Rect); Rectangle(Rect);
Font.Style := [fsBold]; 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(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); DrawTextEx(Handle, PChar(ValueStr), Length(ValueStr), Rect, DT_VCENTER or DT_SINGLELINE or DT_RIGHT, nil);
end; end;
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); procedure TfrmResult.FormShow(Sender: TObject);
begin begin
Self.Height := 683;
Self.Left := Screen.Width - Self.Width; Self.Left := Screen.Width - Self.Width;
Self.Top := Screen.Height - Self.Height - 45; Self.Top := Screen.Height - Self.Height - 45;
end; 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. 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