Выбор материала и расчет параметров обделок вертикальных стволов метрополитенов
| Категория реферата: Рефераты по технологии
| Теги реферата: банк курсовых, курсовик
| Добавил(а) на сайт: Игнатий.
Предыдущая страница реферата | 17 18 19 20 21 22 23 24 25 26 27 | Следующая страница реферата
procedure TStaftForm.UserMenuItemClick(Sender: TObject);
begin
ShowForm(TUserListForm);
end;
procedure TStaftForm.ShowHint(Sender: TObject);
begin
HintPanel.Caption := Application.Hint;
end;
procedure TStaftForm.UpdateMenuItems(Sender: TObject);
begin
{ Enable or disable menu items and buttons }
CascadeMenuItem.Enabled := MDIChildCount > 0;
TileMenuItem.Enabled := MDIChildCount > 0;
ArrangeAllMenuItem.Enabled := MDIChildCount > 0;
MinimizeAllMenuItem.Enabled := MDIChildCount > 0;
TileWindowsItem.Enabled := MDIChildCount > 0;
CascadeWindowsItem.Enabled := MDIChildCount > 0;
end;
procedure TStaftForm.FormCreate(Sender: TObject);
begin
Application.OnHint := ShowHint;
Screen.OnActiveFormChange := UpdateMenuItems;
SetAutoSubClass(True);
{ set wait cursor to SQL }
WaitCursor := crSQLWait;
{ register classes of MDI-child forms }
{RegisterClasses([TDictForm, TRatesForm, TItemReportForm]);}
end;
procedure TStaftForm.FormDestroy(Sender: TObject);
begin
Screen.OnActiveFormChange := nil;
Application.HelpCommand(HELP_QUIT,0);
end;
procedure TStaftForm.InsuranceMenuItemClick(Sender: TObject);
begin
Form1.ShowModal;
end;
procedure TStaftForm.EditItemClick(Sender: TObject);
begin
EditDataForm.Show;
end;
end.
unit UserList;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics,
Controls, Forms, Dialogs, DBCtrls, ExtCtrls, DBTables, DB, Grids,
DBGrids, RXDBCtrl, Placemnt, StdCtrls, Buttons;
type
TUserListForm = class(TForm)
UsersTable: TTable; dsUsers: TDataSource;
UsersGrid: TrxDBGrid;
UsersTablePassword: TStringField;
Panel1: TPanel;
DBNavigator: TDBNavigator;
FormPlacement: TFormPlacement;
UsersTableID: TFloatField;
UsersTableUserName: TStringField;
UsersTableFullName: TStringField;
UsersTableUserLevel: TFloatField;
BitBtn1: TBitBtn;
procedure DBNavigatorClick(Sender: TObject; Button:
TNavigateBtn); procedure UsersGridDblClick(Sender: TObject); procedure FormPlacementSavePlacement(Sender: TObject); procedure FormPlacementRestorePlacement(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); end;
var
UserListForm: TUserListForm;
implementation
uses
EditUser, IniFiles, Global;
const
SAccessDenied = 'Недостаточно прав. Доступ запрещен';
{$R *.DFM}
procedure TUserListForm.DBNavigatorClick(Sender: TObject;
Button: TNavigateBtn); begin case Button of nbInsert: begin
EditUserData('', UsersTable, True); end; nbEdit: begin
EditUserData('', UsersTable, False); end; end; end;
procedure TUserListForm.UsersGridDblClick(Sender: TObject);
begin
EditUserData('', UsersTable, False);
end;
procedure TUserListForm.FormPlacementSavePlacement(Sender: TObject);
var
IniFile: TIniFile;
I: Integer;
begin
IniFile := TIniFile.Create(FormPlacement.IniFileName); try for I := 0 to ComponentCount - 1 do begin if Components[I] is TrxDBGrid then
TrxDBGrid(Components[I]).SaveLayout(IniFile); end; finally
IniFile.Free; end; end;
procedure TUserListForm.FormPlacementRestorePlacement(Sender:
TObject);
var
IniFile: TIniFile;
I: Integer;
begin
IniFile := TIniFile.Create(FormPlacement.IniFileName); try for I := 0 to ComponentCount - 1 do begin if Components[I] is TrxDBGrid then
TrxDBGrid(Components[I]).RestoreLayout(IniFile); end; finally
IniFile.Free; end; end;
procedure TUserListForm.FormCreate(Sender: TObject);
begin if not (glUserLevel in [ulAdministrator]) then begin raise Exception.Create(SAccessDenied); end;
UsersTable.Open;
end;
procedure TUserListForm.FormClose(Sender: TObject;
var
Action: TCloseAction);
begin
Action := caFree;
end;
end.
program Shaft;
uses
Forms,
Main in 'MAIN.PAS' {StaftForm},
Global in 'GLOBAL.PAS',
EditUser in 'EDITUSER.PAS',
UserList in 'USERLIST.PAS' {UserListForm},
Edittub in 'EDITTUB.PAS' {EditDataForm},
Editform in 'EDITFORM.PAS' {EdTubForm},
Calc1 in 'CALC1.PAS' {Form1},
Draw in 'DRAW.PAS' {DrawForm};
{$R *.RES}
Рекомендуем скачать другие рефераты по теме: реферат экологические проблемы, изложение по русскому языку 7, взаимодействие реферат.
Категории:
Предыдущая страница реферата | 17 18 19 20 21 22 23 24 25 26 27 | Следующая страница реферата