git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.RemObjects@68 b6239004-a887-0f4b-9937-50029ccdca16
55 lines
1.3 KiB
ObjectPascal
55 lines
1.3 KiB
ObjectPascal
unit fServerForm;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
|
|
uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
|
|
uROBinMessage, uROIndyHTTPServer, uROIndyTCPServer, ComCtrls, Mask,
|
|
uROZeroConf;
|
|
|
|
type
|
|
TServerForm = class(TForm)
|
|
RoPoweredByRemObjectsButton1: TRoPoweredByRemObjectsButton;
|
|
ROMessage: TROBinMessage;
|
|
ROServer: TROIndyHTTPServer;
|
|
Label1: TLabel;
|
|
edWhoAmI: TEdit;
|
|
btStart: TButton;
|
|
ROZeroConfRegistration1: TROZeroConfRegistration;
|
|
procedure btStartClick(Sender: TObject);
|
|
private
|
|
{ Private declarations }
|
|
function GetWhoAmI: TCaption;
|
|
public
|
|
{ Public declarations }
|
|
property WhoAmI: TCaption read GetWhoAmI;
|
|
end;
|
|
|
|
var
|
|
ServerForm: TServerForm;
|
|
|
|
implementation
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure TServerForm.btStartClick(Sender: TObject);
|
|
begin
|
|
if not ROServer.Active then begin
|
|
ROServer.Port := 0;
|
|
ROServer.Active := true;
|
|
btStart.Caption := 'Stop server';
|
|
end
|
|
else begin
|
|
ROServer.Active := false;
|
|
btStart.Caption := 'Start server';
|
|
end;
|
|
end;
|
|
|
|
function TServerForm.GetWhoAmI: TCaption;
|
|
begin
|
|
result := ServerForm.edWhoAmI.Text;
|
|
end;
|
|
|
|
end.
|