From e44e2903e0f5003f0903c5dbe823ddfde82ed1db Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Sat, 18 Feb 2012 02:17:49 -0500 Subject: [PATCH] New basic protocol editor complete --- mystic/bbs_cfg_protocol.pas | 50 ++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/mystic/bbs_cfg_protocol.pas b/mystic/bbs_cfg_protocol.pas index 70f0653..8944779 100644 --- a/mystic/bbs_cfg_protocol.pas +++ b/mystic/bbs_cfg_protocol.pas @@ -13,7 +13,8 @@ Uses m_Strings, bbs_Common, bbs_ansi_MenuBox, - bbs_ansi_MenuForm; + bbs_ansi_MenuForm, + bbs_cfg_Common; Procedure EditProtocol (Var Prot: RecProtocol); Var @@ -88,41 +89,44 @@ Begin Box.Header := ' Protocol Editor '; List.NoWindow := True; - List.LoChars := #01#04#13#27; + List.LoChars := #13#27#47; Box.Open (13, 5, 67, 20); - WriteXY (15, 6, 112, 'Active OSID Batch Key Description'); - WriteXY (15, 7, 112, strRep('Ä', 51)); + WriteXY (15, 7, 112, 'Active OSID Batch Key Description'); + WriteXY (15, 8, 112, strRep('Ä', 51)); WriteXY (15, 18, 112, strRep('Ä', 51)); - WriteXY (18, 19, 112, '(CTRL/A) Add (CTRL/D) Delete (ENTER) Edit'); + WriteXY (29, 19, 112, 'Press / for command list'); Repeat MakeList; - List.Open (13, 7, 67, 18); + List.Open (13, 8, 67, 18); List.Close; Case List.ExitCode of - #04 : If List.Picked < List.ListMax Then - If ShowMsgBox(1, 'Delete this entry?') Then Begin - F.RecordDelete (List.Picked); - MakeList; - End; - #01 : Begin - F.RecordInsert (List.Picked); + '/' : Case GetCommandOption(11, 'I-Insert|D-Delete|') of + #27 : ; + 'I' : Begin + F.RecordInsert (List.Picked); - Prot.OSType := OSType; - Prot.Desc := 'New protocol'; - Prot.Key := '!'; - Prot.Active := False; - Prot.Batch := False; - Prot.SendCmd := ''; - Prot.RecvCmd := ''; + Prot.OSType := OSType; + Prot.Desc := 'New protocol'; + Prot.Key := '!'; + Prot.Active := False; + Prot.Batch := False; + Prot.SendCmd := ''; + Prot.RecvCmd := ''; - F.Write (Prot); + F.Write (Prot); - MakeList; + MakeList; + End; + 'D' : If List.Picked < List.ListMax Then + If ShowMsgBox(1, 'Delete this entry?') Then Begin + F.RecordDelete (List.Picked); + MakeList; + End; End; #13 : If List.Picked <> List.ListMax Then Begin F.Seek (List.Picked - 1); @@ -145,4 +149,4 @@ Begin Box.Free; End; -End. \ No newline at end of file +End.