Выбор материала и расчет параметров обделок вертикальных стволов метрополитенов
Страница 27

interface

type

TUserLevel = (ulInvalid, ulOperator, ulManager, ulAdministrator);

const

InvalidID = 0;

glUserLevel: TUserLevel = ulInvalid;

glUserName: string = '';

glUserID: Longint = InvalidID;

function cUserLevel(Code: Longint): TUserLevel;

implementation

function cUserLevel(Code: Longint): TUserLevel;

begin

Result := ulInvalid;

if (Code in [Integer(Low(TUserLevel)) Integer(High(TUserLevel))]) then

Result := TUserLevel(Code);

end;

end.

unit Global;

interface

type

TUserLevel = (ulInvalid, ulOperator, ulManager, ulAdministrator);

const

InvalidID = 0;

glUserLevel: TUserLevel = ulInvalid;

glUserName: string = '';

glUserID: Longint = InvalidID;

function cUserLevel(Code: Longint): TUserLevel;

implementation

function cUserLevel(Code: Longint): TUserLevel;

begin

Result := ulInvalid;

if (Code in [Integer(Low(TUserLevel)) Integer(High(TUserLevel))]) then

Result := TUserLevel(Code);

end;

end.

unit Main;

interface

uses

SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics,

Controls, Forms, Dialogs, SpeedBar, Menus, ExtCtrls, Placemnt, DB,

DBSecur, DBTables;

type

TStaftForm = class(TForm)

SpeedBar: TSpeedBar;

ExitItem: TSpeedItem;

MainMenu: TMainMenu;

FileMenu: TMenuItem;

InsuranceMenuItem: TMenuItem;

FileMenuSeperator: TMenuItem;

PrinterSetupMenuItem: TMenuItem;

ExitMenuItem: TMenuItem;

DictSetupMenu: TMenuItem;

UserMenuItem: TMenuItem;

WindowMenu: TMenuItem;

TileMenuItem: TMenuItem;

CascadeMenuItem: TMenuItem;

MinimizeAllMenuItem: TMenuItem;

ArrangeAllMenuItem: TMenuItem;

HelpMenu: TMenuItem;

HelpContentsMenuItem: TMenuItem;

HelpMenuSeparator: TMenuItem;

AboutMenuItem: TMenuItem;

ChangePasswordItem: TSpeedItem;

PrintSetupItem: TSpeedItem;

CalcItem: TSpeedItem;

PrinterSetup: TPrinterSetupDialog;

TileWindowsItem: TSpeedItem;

CascadeWindowsItem: TSpeedItem;

HintPanel: TPanel;

DBSecurity1: TDBSecurity;

Database1: TDatabase;

EditItem: TMenuItem;

FormPlacement: TFormPlacement;

procedure ArrangeAllMenuItemClick(Sender: TObject);

procedure TileMenuItemClick(Sender: TObject);

procedure CascadeMenuItemClick(Sender: TObject);

procedure MinimizeAllMenuItemClick(Sender: TObject);

procedure AboutMenuItemClick(Sender: TObject);

procedure PrinterSetupMenuItemClick(Sender: TObject);

procedure ExitMenuItemClick(Sender: TObject);

procedure FormStorageRestorePlacement(Sender: TObject);

procedure FormStorageSavePlacement(Sender: TObject);

function DBSecurity1CheckUser(UsersTable: TTable;

const

Password: String): Boolean;

procedure UserMenuItemClick(Sender: TObject);

procedure FormCreate(Sender: TObject);

procedure FormDestroy(Sender: TObject);

procedure InsuranceMenuItemClick(Sender: TObject);

procedure ShowHint(Sender: TObject);

procedure EditItemClick(Sender: TObject);

Страницы: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31