Localized file/record variables

This commit is contained in:
mysticbbs 2012-02-27 18:43:39 -05:00
parent 8460084849
commit 6984263d14
2 changed files with 24 additions and 27 deletions

View File

@ -17,11 +17,7 @@ Uses
bbs_Cfg_SysCfg,
bbs_Common;
Var
MBaseFile : TBufFile;
MBase : RecMessageBase;
Procedure EditMessageBase;
Procedure EditMessageBase (Var MBase: RecMessageBase);
Var
Box : TAnsiMenuBox;
Form : TAnsiMenuForm;
@ -89,11 +85,13 @@ End;
Procedure Configuration_MessageBaseEditor;
Var
Box : TAnsiMenuBox;
List : TAnsiMenuList;
MIndex : LongInt;
Copied : RecMessageBase;
HasCopy : Boolean = False;
Box : TAnsiMenuBox;
List : TAnsiMenuList;
MIndex : LongInt;
Copied : RecMessageBase;
HasCopy : Boolean = False;
MBaseFile : TBufFile;
MBase : RecMessageBase;
Procedure MakeList;
Var
@ -239,7 +237,9 @@ Begin
#13 : If List.Picked < List.ListMax Then Begin
MBaseFile.Seek (List.Picked - 1);
MBaseFile.Read (MBase);
EditMessageBase;
EditMessageBase (MBase);
MBaseFile.Seek (List.Picked - 1);
MBaseFile.Write (MBase);
End;

View File

@ -16,11 +16,7 @@ Uses
bbs_Ansi_MenuForm,
bbs_Cfg_Common;
Var
SecFile : File;
Sec : RecSecurity;
Procedure Edit_Level (Level: Integer);
Procedure EditLevel (Var Sec: RecSecurity);
Var
Box : TAnsiMenuBox;
Form : TAnsiMenuForm;
@ -28,14 +24,9 @@ Var
Begin
Topic := '|03(|09Security|03) |01-|09> |15';
ioSeek (SecFile, Level - 1);
ioRead (SecFile, Sec);
Box := TAnsiMenuBox.Create;
Form := TAnsiMenuForm.Create;
Box.Header := ' Security Level ' + strI2S(Level) + ' ';
Box.Open (12, 5, 68, 21);
VerticalLine (35, 6, 20);
@ -62,9 +53,6 @@ Begin
Box.Free;
Form.Free;
ioSeek (SecFile, Level - 1);
ioWrite (SecFile, Sec);
End;
Function Configuration_SecurityEditor (Edit: Boolean) : LongInt;
@ -72,6 +60,8 @@ Var
List : TAnsiMenuList;
Box : TAnsiMenuBox;
HideMode : Boolean;
SecFile : File;
Sec : RecSecurity;
Procedure MakeList;
Var
@ -135,9 +125,16 @@ Begin
End;
#13 : Begin
Count := strS2I(Copy(List.List[List.Picked]^.Name, 1, 3));
If Edit Then
Edit_Level(Count)
Else Begin
If Edit Then Begin
ioSeek (SecFile, Count - 1);
ioRead (SecFile, Sec);
EditLevel(Sec);
ioSeek (SecFile, Count - 1);
ioWrite (SecFile, Sec);
End Else Begin
Result := Count;
Break;
End;