Выбор материала и расчет параметров обделок вертикальных стволов метрополитеновСтраница 29
end;
finally
List.Free;
end;
end;
finally
IniFile.Free;
end;
finally
StopWait;
end;
end;
procedure TStaftForm.FormStorageSavePlacement(Sender: TObject);
var
IniFile: TrxIniFile;
List: TStrings;
I: Integer;
begin
IniFile := TrxIniFile.Create(FormPlacement.IniFileName);
try
IniFile.EraseSection(siMDIChilds);
List := TStringList.Create;
try
for I := MDIChildCount - 1 downto 0 do
List.Add(MDIChildren[I].ClassName);
if List.Count > 0 then
IniFile.WriteList(siMDIChilds, List);
finally
List.Free;
end;
finally
IniFile.Free;
end;
end;
function TStaftForm.DBSecurity1CheckUser(UsersTable: TTable;
const
Password: String): Boolean;
begin
Result := (Password = UsersTable.FieldByName('Password').AsString);
if Result then begin
glUserName := UsersTable.FieldByName('UserName').AsString;
glUserID := UsersTable.FieldByName('ID').AsInteger;
glUserLevel := cUserLevel(UsersTable.FieldByName('UserLevel')
.AsInteger);
Result := (glUserLevel <> ulInvalid);
end;
if Result then SetUserLevel;
end;
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,