home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / DELPHI / MAXPACK / MAXPACK.PAS < prev    next >
Pascal/Delphi Source File  |  1995-04-27  |  4KB  |  170 lines

  1. unit MaxPack;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, Grids, StdCtrls, Buttons, ExtCtrls, TabNotBk
  8.   , UserInfo
  9.   , UserNov
  10.   , UserBDE
  11.   , UserWin
  12.   , Splash
  13.   , Bitbox;
  14.  
  15. type
  16.   TMaxPack1Form = class(TForm)
  17.     TabbedNotebook1: TTabbedNotebook;
  18.     WindowsGrid: TStringGrid;
  19.     NovellGrid: TStringGrid;
  20.     BDEGrid: TStringGrid;
  21.     SplashScreen: TSplashScreen;
  22.     WindowsUserInfo: TWindowsUserInfo;
  23.     BDEUserInfo: TBDEUserInfo;
  24.     NetWareUserInfo: TNetWareUserInfo;
  25.     Memo1: TMemo;
  26.     Button1: TButton;
  27.     Label1: TLabel;
  28.     Label2: TLabel;
  29.     BitBox1: TBitBox;
  30.     Label3: TLabel;
  31.     Edit1: TEdit;
  32.     Label4: TLabel;
  33.     Button2: TButton;
  34.     Panel1: TPanel;
  35.     SpeedButton1: TSpeedButton;
  36.     procedure FormCreate(Sender: TObject);
  37.     procedure Edit1Change(Sender: TObject);
  38.     procedure SpeedButton1Click(Sender: TObject);
  39.     procedure BitBox1Change(Sender: TObject);
  40.     procedure Button1Click(Sender: TObject);
  41.     procedure Button2Click(Sender: TObject);
  42.   private
  43.     { Private declarations }
  44.   public
  45.     { Public declarations }
  46.   end;
  47.  
  48. const
  49.   BoolString: array[False..True] of string[5] = ('FALSE','TRUE');
  50.  
  51. var
  52.   MaxPack1Form: TMaxPack1Form;
  53.  
  54. implementation
  55.  
  56. {$R *.DFM}
  57.  
  58. {-----------------------------------------------------------------------------------------}
  59. { FORM CODE                                                                               }
  60. {-----------------------------------------------------------------------------------------}
  61.  
  62. procedure TMaxPack1Form.FormCreate(Sender: TObject);
  63. begin
  64.   with NovellGrid do begin
  65.     ColCount:=2;
  66.     ColWidths[0]:=120;
  67.     ColWidths[1]:=200;
  68.     Width:=320+GridLineWidth;
  69.     RowCount:=7;
  70.     Height:=RowCount*(DefaultRowHeight+GridLineWidth)+GridLineWidth;
  71.     cells[0,0]:='Property';
  72.     cells[1,0]:='Value';
  73.  
  74.     cells[0,1]:='ConnectID';
  75.     cells[0,2]:='ConnectNumber';
  76.     cells[0,3]:='ServerName';
  77.     cells[0,4]:='LoginName';
  78.     cells[0,5]:='FullName';
  79.     cells[0,6]:='LoginTime';
  80.  
  81.     with NetWareUserInfo do begin
  82.       cells[1,1]:=inttostr(ConnectID);
  83.       cells[1,2]:=inttostr(ConnectNumber);
  84.       cells[1,3]:=ServerName;
  85.       cells[1,4]:=LoginName;
  86.       cells[1,5]:=FullName;
  87.       cells[1,6]:=LoginTime +' (DECODE??)';
  88.       end;
  89.     end;
  90.  
  91.   with WindowsGrid do begin
  92.     ColCount:=2;
  93.     ColWidths[0]:=120;
  94.     ColWidths[1]:=200;
  95.     Width:=320+GridLineWidth;
  96.     RowCount:=4;
  97.     Height:=RowCount*(DefaultRowHeight+GridLineWidth)+GridLineWidth;
  98.     cells[0,0]:='Property';
  99.     cells[1,0]:='Value';
  100.     cells[0,1]:='LoginName';
  101.     cells[0,2]:='CompanyName';
  102.     cells[0,3]:='SaverDelay';
  103.  
  104.     with WindowsUserInfo do begin
  105.       cells[1,1]:=UserName;
  106.       cells[1,2]:=CompanyName;
  107.       cells[1,3]:=inttostr(SaverDelay);
  108.       end;
  109.     end;
  110.  
  111.   with BDEGrid do begin
  112.     ColCount:=2;
  113.     ColWidths[0]:=120;
  114.     ColWidths[1]:=200;
  115.     Width:=320+GridLineWidth;
  116.     RowCount:=7;
  117.     Height:=RowCount*(DefaultRowHeight+GridLineWidth)+GridLineWidth;
  118.     cells[0,0]:='Property';
  119.     cells[1,0]:='Value';
  120.     cells[0,1]:='UserName';
  121.     cells[0,2]:='NetType';
  122.     cells[0,3]:='NetProtocol';
  123.     cells[0,4]:='NetShare';
  124.     cells[0,5]:='LocalShare';
  125.     cells[0,6]:='IniFile';
  126.     cells[0,7]:='LangDriver';
  127.  
  128.     with BDEUserInfo do begin
  129.       cells[1,1]:=UserName;
  130.       cells[1,2]:=NetType;
  131.       cells[1,3]:=inttostr(NetProtocol);
  132.       cells[1,4]:=BoolString[NetShare];
  133.       cells[1,5]:=BoolString[LocalShare];
  134.       cells[1,6]:=IniFile;
  135.       cells[1,7]:=LangDriver;
  136.       end;
  137.     end;
  138.  
  139.   Edit1.Text:=inttostr(BitBox1.Numeric);
  140.  
  141. end;
  142.  
  143. procedure TMaxPack1Form.SpeedButton1Click(Sender: TObject);
  144. begin
  145.   close;
  146. end;
  147.  
  148. procedure TMaxPack1Form.BitBox1Change(Sender: TObject);
  149. begin
  150.   Edit1.Text:=inttostr(BitBox1.Numeric);
  151. end;
  152.  
  153. procedure TMaxPack1Form.Edit1Change(Sender: TObject);
  154. begin
  155.   BitBox1.Numeric:=StrToIntDef(Edit1.Text,0);
  156. end;
  157.  
  158.  
  159. procedure TMaxPack1Form.Button1Click(Sender: TObject);
  160. begin
  161.   Splashscreen.execute;
  162. end;
  163.  
  164. procedure TMaxPack1Form.Button2Click(Sender: TObject);
  165. begin
  166.   with TSplashScreen.Create(self) do free; {i like it!}
  167. end;
  168.  
  169. end.
  170.