* May 18th, 2005: Starting to develop AMXX-Edit v2 as a kind of open source

* May 19th, 2005: Added debug dialog (only for developing)
This commit is contained in:
Christian Hammacher 2005-05-19 11:03:42 +00:00
parent ba245458de
commit c1552aacd6
4 changed files with 19 additions and 9 deletions

View File

@ -13,12 +13,15 @@ program AMXX_Edit_v2;
GlyFX Icons: www.glyfx.com (using GlyFX Icon Pack of Delphi 2005 PE) GlyFX Icons: www.glyfx.com (using GlyFX Icon Pack of Delphi 2005 PE)
Modified CorelButton (see CorelButton.pas, original by ConquerWare) Modified CorelButton (see CorelButton.pas, original by ConquerWare)
Indy 9 Socket Components: www.indyproject.org Indy 9 Socket Components: www.indyproject.org
[JEDI component library, only necersarry for Exception Dialog (jvcl.sourceforge.net)]
AMXX-Edit v2 is published under GNU General Public License and comes AMXX-Edit v2 is published under GNU General Public License and comes
with ABSOLUTELY NO WARRANTY (see GPL.txt for more information) with ABSOLUTELY NO WARRANTY (see GPL.txt for more information)
} }
//{$DEFINE EXCEPTION_DEBUG} // Remove comments only when you want to trace exceptions
uses uses
Forms, Forms,
Windows, Windows,
@ -38,7 +41,8 @@ uses
UnitHowToMakePlayerMenu in 'UnitHowToMakePlayerMenu.pas' {frmHowToMakePlayerMenu}, UnitHowToMakePlayerMenu in 'UnitHowToMakePlayerMenu.pas' {frmHowToMakePlayerMenu},
UnitfrmSockets in 'UnitfrmSockets.pas' {frmSocketTerminal}, UnitfrmSockets in 'UnitfrmSockets.pas' {frmSocketTerminal},
UnitReadThread in 'UnitReadThread.pas', UnitReadThread in 'UnitReadThread.pas',
UnitfrmLoopGenerator in 'UnitfrmLoopGenerator.pas' {frmLoopGenerator}; UnitfrmLoopGenerator in 'UnitfrmLoopGenerator.pas' {frmLoopGenerator},
UnitfrmExceptionHandler in 'UnitfrmExceptionHandler.pas' {ExceptionDialog};
{$R *.res} {$R *.res}

Binary file not shown.

View File

@ -1,6 +1,6 @@
object frmMain: TfrmMain object frmMain: TfrmMain
Left = 198 Left = 222
Top = 203 Top = 277
Width = 870 Width = 870
Height = 640 Height = 640
Color = clBtnFace Color = clBtnFace

View File

@ -430,11 +430,10 @@ begin
eStr := Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber -1]); eStr := Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber -1]);
Delete(eStr, 1, Length(eStr) -1); Delete(eStr, 1, Length(eStr) -1);
if eStr = '{' then if eStr = '{' then
sciEditor.SelText := ' '; sciEditor.SelText := ' '
else if (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber -1]) = '') and (frmSettings.chkAutoIndent.Checked) then begin // if the prevorious line isn't empty, the line contains only spaces and the auto-identer is enabled then...
if sciEditor.GetCurrentLineNumber <> 0 then begin // if we are on line 0 we would access line -1 otherwise sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) -1); // remove last indent..
if (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) <> '') and (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber -1]) = '') and (frmSettings.chkAutoIndent.Checked) then // if the prevorious line isn't empty, the line contains only spaces and the auto-identer is enabled then... sciEditor.SelStart := sciEditor.SelStart + Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]); // and jump to last position
sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber -1], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber -1]) -2); // remove the last char
end; end;
end; end;
end; end;
@ -650,7 +649,14 @@ begin
else if (Key = 9) and (not (ssCtrl in Shift)) then // Tab else if (Key = 9) and (not (ssCtrl in Shift)) then // Tab
SetModified SetModified
else if (Key >= 65) and (Key <= 90) and (not (ssCtrl in Shift)) then // a..z else if (Key >= 65) and (Key <= 90) and (not (ssCtrl in Shift)) then // a..z
SetModified; SetModified
else if Chr(Key) = '}' then begin
if sciEditor.GetCurrentLineNumber <> 0 then begin // if we are on line 0 we would access line -1 otherwise
if (Trim(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') and (frmSettings.chkAutoIndent.Checked) then // if the prevorious line isn't empty, the line contains only spaces and the auto-identer is enabled then...
sciEditor.Lines[sciEditor.GetCurrentLineNumber] := Copy(sciEditor.Lines[sciEditor.GetCurrentLineNumber], 1, Length(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) -1); // remove the last char
end;
end;
if (sciEditor.GetCurrentLineNumber <> eCurrentLine) or (RemoveSpaces(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') then begin if (sciEditor.GetCurrentLineNumber <> eCurrentLine) or (RemoveSpaces(sciEditor.Lines[sciEditor.GetCurrentLineNumber]) = '') then begin
UpdateList(sciEditor.Lines.Text); UpdateList(sciEditor.Lines.Text);