Import nweadmin 0.1b from upstream zip
This commit is contained in:
69
SRC/SVRUTIL.PAS
Normal file
69
SRC/SVRUTIL.PAS
Normal file
@@ -0,0 +1,69 @@
|
||||
unit Svrutil;
|
||||
|
||||
interface
|
||||
|
||||
uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
|
||||
StdCtrls;
|
||||
|
||||
type
|
||||
TBtnRightDlg1 = class(TForm)
|
||||
OKBtn: TBitBtn;
|
||||
CancelBtn: TBitBtn;
|
||||
GroupBox1: TGroupBox;
|
||||
RadioButton1: TRadioButton;
|
||||
RadioButton2: TRadioButton;
|
||||
RadioButton3: TRadioButton;
|
||||
procedure OKBtnClick(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
BtnRightDlg1: TBtnRightDlg1;
|
||||
|
||||
implementation
|
||||
|
||||
Uses StartFrm, NWServ, Dialogs, sendMsg;
|
||||
|
||||
{$R *.DFM}
|
||||
|
||||
procedure TBtnRightDlg1.OKBtnClick(Sender: TObject);
|
||||
var CheckMe: Boolean;
|
||||
begin
|
||||
if RadioButton1.Checked=TRUE then
|
||||
begin
|
||||
if DownFileServer(FALSE)=FALSE then
|
||||
if MessageDlg('Server reports open files, force server down?',
|
||||
mtConfirmation, [mbYes, mbNo], 0)=mrYES then DownFileServer(TRUE);
|
||||
end;
|
||||
if RadioButton2.Checked then
|
||||
begin
|
||||
BtnBottomDlg4.ShowModal;
|
||||
end;
|
||||
if RadioButton3.Checked then
|
||||
begin
|
||||
{Enable / Disable Logins}
|
||||
if GetFileServerLoginStatus(CheckME)=FALSE then MessageDLg('Can''t talk to server', mtWarning, [mbOK], 0)
|
||||
else begin
|
||||
if CheckMe=FALSE then
|
||||
begin
|
||||
EnableFileServerLogin;
|
||||
MessageDlg('Login Enabled', mtInformation, [mbOK], 0);
|
||||
end else
|
||||
begin
|
||||
DisableFileServerLogin;
|
||||
MessageDlg('Login Diabled', mtInformation, [mbOK], 0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TBtnRightDlg1.FormShow(Sender: TObject);
|
||||
begin
|
||||
Caption:='Do what to '+ Form1.Panel1.Caption + '?';
|
||||
end;
|
||||
|
||||
end.
|
||||
Reference in New Issue
Block a user