home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 5
/
ctrom5b.zip
/
ctrom5b
/
PROGRAM
/
DELPHI
/
MAXPACK
/
MAXPACK.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-04-27
|
4KB
|
170 lines
unit MaxPack;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, Grids, StdCtrls, Buttons, ExtCtrls, TabNotBk
, UserInfo
, UserNov
, UserBDE
, UserWin
, Splash
, Bitbox;
type
TMaxPack1Form = class(TForm)
TabbedNotebook1: TTabbedNotebook;
WindowsGrid: TStringGrid;
NovellGrid: TStringGrid;
BDEGrid: TStringGrid;
SplashScreen: TSplashScreen;
WindowsUserInfo: TWindowsUserInfo;
BDEUserInfo: TBDEUserInfo;
NetWareUserInfo: TNetWareUserInfo;
Memo1: TMemo;
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
BitBox1: TBitBox;
Label3: TLabel;
Edit1: TEdit;
Label4: TLabel;
Button2: TButton;
Panel1: TPanel;
SpeedButton1: TSpeedButton;
procedure FormCreate(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure BitBox1Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
const
BoolString: array[False..True] of string[5] = ('FALSE','TRUE');
var
MaxPack1Form: TMaxPack1Form;
implementation
{$R *.DFM}
{-----------------------------------------------------------------------------------------}
{ FORM CODE }
{-----------------------------------------------------------------------------------------}
procedure TMaxPack1Form.FormCreate(Sender: TObject);
begin
with NovellGrid do begin
ColCount:=2;
ColWidths[0]:=120;
ColWidths[1]:=200;
Width:=320+GridLineWidth;
RowCount:=7;
Height:=RowCount*(DefaultRowHeight+GridLineWidth)+GridLineWidth;
cells[0,0]:='Property';
cells[1,0]:='Value';
cells[0,1]:='ConnectID';
cells[0,2]:='ConnectNumber';
cells[0,3]:='ServerName';
cells[0,4]:='LoginName';
cells[0,5]:='FullName';
cells[0,6]:='LoginTime';
with NetWareUserInfo do begin
cells[1,1]:=inttostr(ConnectID);
cells[1,2]:=inttostr(ConnectNumber);
cells[1,3]:=ServerName;
cells[1,4]:=LoginName;
cells[1,5]:=FullName;
cells[1,6]:=LoginTime +' (DECODE??)';
end;
end;
with WindowsGrid do begin
ColCount:=2;
ColWidths[0]:=120;
ColWidths[1]:=200;
Width:=320+GridLineWidth;
RowCount:=4;
Height:=RowCount*(DefaultRowHeight+GridLineWidth)+GridLineWidth;
cells[0,0]:='Property';
cells[1,0]:='Value';
cells[0,1]:='LoginName';
cells[0,2]:='CompanyName';
cells[0,3]:='SaverDelay';
with WindowsUserInfo do begin
cells[1,1]:=UserName;
cells[1,2]:=CompanyName;
cells[1,3]:=inttostr(SaverDelay);
end;
end;
with BDEGrid do begin
ColCount:=2;
ColWidths[0]:=120;
ColWidths[1]:=200;
Width:=320+GridLineWidth;
RowCount:=7;
Height:=RowCount*(DefaultRowHeight+GridLineWidth)+GridLineWidth;
cells[0,0]:='Property';
cells[1,0]:='Value';
cells[0,1]:='UserName';
cells[0,2]:='NetType';
cells[0,3]:='NetProtocol';
cells[0,4]:='NetShare';
cells[0,5]:='LocalShare';
cells[0,6]:='IniFile';
cells[0,7]:='LangDriver';
with BDEUserInfo do begin
cells[1,1]:=UserName;
cells[1,2]:=NetType;
cells[1,3]:=inttostr(NetProtocol);
cells[1,4]:=BoolString[NetShare];
cells[1,5]:=BoolString[LocalShare];
cells[1,6]:=IniFile;
cells[1,7]:=LangDriver;
end;
end;
Edit1.Text:=inttostr(BitBox1.Numeric);
end;
procedure TMaxPack1Form.SpeedButton1Click(Sender: TObject);
begin
close;
end;
procedure TMaxPack1Form.BitBox1Change(Sender: TObject);
begin
Edit1.Text:=inttostr(BitBox1.Numeric);
end;
procedure TMaxPack1Form.Edit1Change(Sender: TObject);
begin
BitBox1.Numeric:=StrToIntDef(Edit1.Text,0);
end;
procedure TMaxPack1Form.Button1Click(Sender: TObject);
begin
Splashscreen.execute;
end;
procedure TMaxPack1Form.Button2Click(Sender: TObject);
begin
with TSplashScreen.Create(self) do free; {i like it!}
end;
end.