Changeset 145 for trunk/Forms/FormSourceCode.pas
- Timestamp:
- Jun 5, 2023, 6:44:57 PM (18 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormSourceCode.pas
r144 r145 1 unit UFormSourceCode;1 unit FormSourceCode; 2 2 3 3 interface … … 6 6 Classes, SysUtils, FileUtil, SynEdit, SynHighlighterIni, Forms, Controls, 7 7 Graphics, Dialogs, Menus, ActnList, 8 SynEditHighlighter, SynHighlighterAny, SynHighlighterJava, UBFHighlighter;8 SynEditHighlighter, SynHighlighterAny, SynHighlighterJava, BFHighlighter; 9 9 10 10 type … … 60 60 private 61 61 BFHighlighter: TSynBrainFuckHl; 62 FOnUpdateInterface: TNotifyEvent; 63 FOnUpdateStatusBar: TNotifyEvent; 62 64 public 63 65 procedure UpdateInterface; 64 66 procedure UpdateTheme; 67 property OnUpdateStatusBar: TNotifyEvent read FOnUpdateStatusBar 68 write FOnUpdateStatusBar; 69 property OnUpdateInterface: TNotifyEvent read FOnUpdateInterface 70 write FOnUpdateInterface; 65 71 end; 66 72 67 var68 FormSourceCode: TFormSourceCode;69 70 73 71 74 implementation … … 74 77 75 78 uses 76 UCore, UFormMain, UBFCodeTools;79 Core, BFCodeTools; 77 80 78 81 resourcestring … … 142 145 procedure TFormSourceCode.FormCreate(Sender: TObject); 143 146 begin 147 Core.Core.Translator.TranslateComponentRecursive(Self); 148 Core.Core.ThemeManager.UseTheme(Self); 149 144 150 BFHighlighter := TSynBrainFuckHl.Create(nil); 145 151 SynEditSource.Highlighter := BFHighlighter; … … 162 168 clLightRed = TColor($8080FF); 163 169 begin 164 if Core. ThemeManager.Theme.Name = 'Dark' then begin170 if Core.Core.ThemeManager.Theme.Name = 'Dark' then begin 165 171 BFHighlighter.IoAttri.Foreground := clWhite; 166 172 BFHighlighter.LoopAttri.Foreground := clLightRed; … … 177 183 procedure TFormSourceCode.MemoSourceChange(Sender: TObject); 178 184 begin 179 Core.Project.Modified := True; 180 Core.CurrentTarget.Compiled := False; 181 FormMain.UpdateInterface; 185 Core.Core.Project.Modified := True; 186 Core.Core.CurrentTarget.Compiled := False; 187 if Assigned(FOnUpdateInterface) then 188 OnUpdateInterface(Self); 182 189 end; 183 190 … … 194 201 Shift: TShiftState); 195 202 begin 196 FormMain.UpdateStatusBar; 203 if Assigned(FOnUpdateStatusBar) then 204 FOnUpdateStatusBar(Self); 197 205 end; 198 206 … … 200 208 Shift: TShiftState; X, Y: Integer); 201 209 begin 202 FormMain.UpdateStatusBar; 210 if Assigned(FOnUpdateStatusBar) then 211 FOnUpdateStatusBar(Self); 203 212 end; 204 213
Note:
See TracChangeset
for help on using the changeset viewer.