From 23664f3362709c7c26e7898edb45501b75aed622 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sat, 16 Dec 2023 23:27:29 +0800 Subject: [PATCH] [exgui] Implementn Rcon procedures --- exgui/Rcon.dfm | Bin 1304 -> 968 bytes exgui/Rcon.pas | 33 +++++++++++++++++++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/exgui/Rcon.dfm b/exgui/Rcon.dfm index f44f4a94282b52cfbba08233f7371b01cbe3c8e6..a033bf2ea3ddfee0ddb4995d6b48fd9b68845164 100644 GIT binary patch literal 968 zcmdUu&5qMB5P+S8#%Wr0S6qMtC`aH>RU9~QYqO2E+O~v!%}eQ)~Y)_uhtv_MpWw=>`hsDU1(xWlach$X4xMv zy?3Z-dKsk`G2U)DTi_xD@pmTH0;;$_|qct+I!*ME6S)k r5A8Q^{dam>inFX%#QQKBee{}$1V}!#5o%#x0m(wn&fVX@4TR7y$vHEH literal 1304 zcmc(fU2obj6o&8jD}0ysq6jFWw9+mhB`PXk!l`;OO_NCu;MK8_W7_iXdybt1R&CnN zq+NjQ*Y^2%A3J9K6Eep(#VRxUj-_Gng|R7Y9Q(?;H@7%R%^t^{_6?3l#^zwTJ1RhJ zUEWKf%oZ17v3JsF6r&Xs#sQ0sE{%eS7L^3;9zbq)6!v;Rp@R4XWPn;?v}?sXVN0OH_v2*vG);fR55pB7r_F}u=P^<(y=ln zrAUk|{Mf5}XWlB2h7?7%%zt$kbT*SXQu7h)#;5sk!p)-Q$bFf*C>Q_+R;7n8m>b05iPjzM$&0oCEla{oMgwL|-3w{&}5h z{#Q)S-jWj8i_iDpIZdU8vc;X1dP{C!__7#_`0#GFWWRno*prh=x??L~!d(~fC4M9J rN9(^N-FCar!od_o(TXm8v_IU16^MMH)e*C%_7JY$+5I3OM4Emd!LWM} diff --git a/exgui/Rcon.pas b/exgui/Rcon.pas index c596ead..c8e8455 100644 --- a/exgui/Rcon.pas +++ b/exgui/Rcon.pas @@ -10,13 +10,16 @@ type TfmRcon = class(TForm) edInput: TEdit; moOutput: TMemo; - procedure edInputKeyPress(Sender: TObject; var Key: Char); procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure edInputKeyPress(Sender: TObject; var Key: Char); procedure FormShow(Sender: TObject); private { Private declarations } public - { Public declarations } + Host: String; + Password: String; + protected + procedure CreateParams(var Params: TCreateParams); override; end; var @@ -26,19 +29,37 @@ implementation {$R *.dfm} -procedure TfmRcon.edInputKeyPress(Sender: TObject; var Key: Char); +procedure Output(szOutput: PChar); stdcall; begin - // TODO: TfmRcon.edInputKeyPress + fmRcon.moOutput.Lines.Add(szOutput); +end; + +procedure TfmRcon.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle:= Params.ExStyle or WS_EX_APPWINDOW; + Params.WndParent:= GetDesktopWindow; end; procedure TfmRcon.FormClose(Sender: TObject; var Action: TCloseAction); begin - // TODO: TfmRcon.FormClose + Destroy; +end; + +procedure TfmRcon.edInputKeyPress(Sender: TObject; var Key: Char); +begin + if Key = #13 then begin + if edInput.Text <> '' then begin + moOutput.Lines.Add('> ' + edInput.Text); + edInput.Text:= ''; + end; + Key:= #0; + end; end; procedure TfmRcon.FormShow(Sender: TObject); begin - // TODO: TfmRcon.FormShow + Caption:= 'Remote Console - ' + Host; end; end.