2007-09-12 14:11:44 +00:00
|
|
|
unit uServerMainForm;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
|
|
|
|
|
uROClient, uROPoweredByRemObjectsButton, uROClientIntf, uROServer,
|
|
|
|
|
uROBinMessage, uROIndyHTTPServer, uROIndyTCPServer, frxClass, frxPreview,
|
2007-10-03 10:27:58 +00:00
|
|
|
JvAppInst, JvComponentBase, ExtCtrls, JvExControls, JvGradient, XPMan,
|
2007-12-16 13:46:06 +00:00
|
|
|
ActnList, Menus, JvGIF, AppEvnts, JvBaseDlg, JvProgressDialog;
|
2007-09-12 14:11:44 +00:00
|
|
|
|
|
|
|
|
type
|
|
|
|
|
TfServerForm = class(TForm)
|
|
|
|
|
PopupMenu1: TPopupMenu;
|
|
|
|
|
ActionList: TActionList;
|
|
|
|
|
actCerrar: TAction;
|
|
|
|
|
Cerrar1: TMenuItem;
|
|
|
|
|
actRestart: TAction;
|
|
|
|
|
actOpciones: TAction;
|
|
|
|
|
actConexiones: TAction;
|
|
|
|
|
Opciones1: TMenuItem;
|
|
|
|
|
Refrescarconexin1: TMenuItem;
|
|
|
|
|
N2: TMenuItem;
|
|
|
|
|
XPManifest1: TXPManifest;
|
|
|
|
|
Panel1: TPanel;
|
|
|
|
|
Image1: TImage;
|
|
|
|
|
JvGradient1: TJvGradient;
|
|
|
|
|
actAcerca: TAction;
|
|
|
|
|
Acercade1: TMenuItem;
|
|
|
|
|
N1: TMenuItem;
|
|
|
|
|
JvAppInstances1: TJvAppInstances;
|
2007-10-03 10:27:58 +00:00
|
|
|
TrayIcon1: TTrayIcon;
|
2007-12-16 13:46:06 +00:00
|
|
|
JvProgressDialog1: TJvProgressDialog;
|
2007-09-12 14:11:44 +00:00
|
|
|
procedure actCerrarExecute(Sender: TObject);
|
|
|
|
|
procedure actRestartExecute(Sender: TObject);
|
|
|
|
|
procedure actOpcionesExecute(Sender: TObject);
|
|
|
|
|
procedure actAcercaExecute(Sender: TObject);
|
|
|
|
|
procedure JvAppInstances1CmdLineReceived(Sender: TObject;
|
|
|
|
|
CmdLine: TStrings);
|
2007-12-12 10:24:33 +00:00
|
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
2007-09-12 14:11:44 +00:00
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
fServerForm : TfServerForm;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses
|
2008-03-21 13:36:04 +00:00
|
|
|
uROComboService, uDataModuleServer, uConfiguracion, uAcercaDe, uServerAppUtils;
|
2007-09-12 14:11:44 +00:00
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure TfServerForm.actCerrarExecute(Sender: TObject);
|
|
|
|
|
begin
|
2008-03-21 13:36:04 +00:00
|
|
|
Application.Terminate;
|
2007-09-12 14:11:44 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TfServerForm.actRestartExecute(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
dmServer.RefrescarConexion;
|
|
|
|
|
end;
|
|
|
|
|
|
2007-12-12 10:24:33 +00:00
|
|
|
procedure TfServerForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
|
|
|
begin
|
2008-03-21 13:36:04 +00:00
|
|
|
if not ROIsService then
|
|
|
|
|
with JvProgressDialog1 do
|
2007-12-16 13:46:06 +00:00
|
|
|
begin
|
2008-03-21 13:36:04 +00:00
|
|
|
InitValues(0, 100, 10, 0, 'Cerrar FactuGES Server', 'Espere mientras FactuGES Server se cierra...');
|
|
|
|
|
Show;
|
|
|
|
|
while Assigned(dmServer) do
|
|
|
|
|
begin
|
|
|
|
|
if (Position + Interval > Max) then
|
|
|
|
|
Position := Min
|
|
|
|
|
else
|
|
|
|
|
Position := Position + Interval;
|
|
|
|
|
Refresh;
|
|
|
|
|
FreeAndNIL(dmServer);
|
|
|
|
|
Sleep(500);
|
|
|
|
|
TrayIcon1.Visible := False;
|
|
|
|
|
end;
|
|
|
|
|
Hide;
|
2007-12-16 13:46:06 +00:00
|
|
|
end;
|
2007-12-12 10:24:33 +00:00
|
|
|
CanClose := True;
|
|
|
|
|
end;
|
|
|
|
|
|
2007-09-12 14:11:44 +00:00
|
|
|
procedure TfServerForm.actOpcionesExecute(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
AForm : TForm;
|
|
|
|
|
begin
|
2007-10-22 07:39:39 +00:00
|
|
|
AForm := TfConfiguracion.Create(Application);
|
2007-09-12 14:11:44 +00:00
|
|
|
try
|
|
|
|
|
AForm.ShowModal;
|
|
|
|
|
finally
|
2007-10-22 07:39:39 +00:00
|
|
|
AForm.Release;
|
2007-09-12 14:11:44 +00:00
|
|
|
actRestart.Execute;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TfServerForm.JvAppInstances1CmdLineReceived(Sender: TObject;
|
|
|
|
|
CmdLine: TStrings);
|
|
|
|
|
begin
|
|
|
|
|
dmServer.RefrescarConexion;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TfServerForm.actAcercaExecute(Sender: TObject);
|
|
|
|
|
begin
|
2007-10-22 07:39:39 +00:00
|
|
|
with TfAcercaDe.Create(Application) do
|
2007-09-12 14:11:44 +00:00
|
|
|
try
|
|
|
|
|
ShowModal;
|
|
|
|
|
finally
|
2007-10-22 07:39:39 +00:00
|
|
|
Release;
|
2007-09-12 14:11:44 +00:00
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|