Changeset 26
- Timestamp:
- Aug 22, 2019, 11:01:15 AM (5 years ago)
- Location:
- branches/topdown
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/topdown
-
Property svn:ignore
set to
lib
heaptrclog.trc
OS.exe
OS.lps
OS.res
-
Property svn:ignore
set to
-
branches/topdown/OS.lpi
r25 r26 88 88 <SyntaxOptions> 89 89 <SyntaxMode Value="Delphi"/> 90 <IncludeAssertionCode Value="True"/> 90 91 </SyntaxOptions> 91 92 </Parsing> 93 <CodeGeneration> 94 <Checks> 95 <IOChecks Value="True"/> 96 <RangeChecks Value="True"/> 97 <OverflowChecks Value="True"/> 98 <StackChecks Value="True"/> 99 </Checks> 100 <VerifyObjMethodCallValidity Value="True"/> 101 </CodeGeneration> 92 102 <Linking> 103 <Debugging> 104 <UseHeaptrc Value="True"/> 105 </Debugging> 93 106 <Options> 94 107 <Win32> -
branches/topdown/OS.lpr
r25 r26 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, UFormMain, UApps, USystem, UAppCalc, UFormMenu, UAppFileManager10 Forms, SysUtils, UFormMain, UApps, USystem, UAppCalc, UFormMenu, UAppFileManager 11 11 { you can add units after this }; 12 12 13 13 {$R *.res} 14 14 15 {$if declared(UseHeapTrace)} 16 const 17 HeapTraceLog = 'heaptrclog.trc'; 18 {$ENDIF} 19 15 20 begin 21 {$if declared(UseHeapTrace)} 22 DeleteFile(ExtractFilePath(ParamStr(0)) + HeapTraceLog); 23 SetHeapTraceOutput(ExtractFilePath(ParamStr(0)) + HeapTraceLog); 24 {$ENDIF} 25 16 26 RequireDerivedFormResource:=True; 17 27 Application.Scaled:=True; -
branches/topdown/UFormMain.lfm
r25 r26 34 34 end 35 35 object PanelTasks: TPanel 36 Left = 9536 Left = 105 37 37 Height = 34 38 38 Top = 1 39 Width = 30439 Width = 294 40 40 Align = alClient 41 BorderSpacing.Left = 10 41 42 BevelOuter = bvNone 42 43 TabOrder = 1 -
branches/topdown/UFormMain.pas
r25 r26 65 65 RemoveControl(Controls[ControlCount - 1]); 66 66 for I := 0 to BaseSystem.Tasks.Count - 1 do 67 with TTask(BaseSystem.Tasks[I]) do begin 67 with TTask(BaseSystem.Tasks[I]) do 68 if not Terminated then begin 68 69 Button := TButton.Create(PanelTasks); 69 70 Button.Align := alLeft; -
branches/topdown/UFormMenu.lfm
r25 r26 8 8 ClientWidth = 262 9 9 DesignTimePPI = 120 10 FormStyle = fsStayOnTop 10 11 OnDeactivate = FormDeactivate 11 12 OnShow = FormShow … … 35 36 TabOrder = 1 36 37 end 38 object ButtonReboot: TButton 39 Left = 112 40 Height = 31 41 Top = 362 42 Width = 94 43 Anchors = [akLeft, akBottom] 44 Caption = 'Reboot' 45 OnClick = ButtonRebootClick 46 TabOrder = 2 47 end 37 48 end -
branches/topdown/UFormMenu.pas
r25 r26 14 14 TFormMenu = class(TForm) 15 15 ButtonShutDown: TButton; 16 ButtonReboot: TButton; 16 17 ListBoxApps: TListBox; 18 procedure ButtonRebootClick(Sender: TObject); 17 19 procedure ButtonShutDownClick(Sender: TObject); 18 20 procedure FormDeactivate(Sender: TObject); … … 71 73 procedure TFormMenu.ButtonShutDownClick(Sender: TObject); 72 74 begin 73 Application.Terminate; 75 Hide; 76 BaseSystem.ShutDown; 77 end; 78 79 procedure TFormMenu.ButtonRebootClick(Sender: TObject); 80 begin 81 Hide; 82 BaseSystem.Reboot; 74 83 end; 75 84 -
branches/topdown/USystem.pas
r25 r26 30 30 TTask = class 31 31 Form: TFormTask; 32 Terminated: Boolean; 33 destructor Destroy; override; 32 34 end; 33 35 … … 59 61 constructor Create; 60 62 destructor Destroy; override; 63 procedure ShutDown; 64 procedure Reboot; 61 65 end; 62 66 … … 67 71 implementation 68 72 73 { TTask } 74 75 destructor TTask.Destroy; 76 begin 77 Form.Free; 78 inherited; 79 end; 80 69 81 { TFormTask } 70 82 71 83 procedure TFormTask.Terminate; 72 84 begin 73 BaseSystem.Tasks.Remove(Task);74 Task := nil;85 Task.Terminated := True; 86 Visible := False; 75 87 BaseSystem.Tasks.DoOnChange; 76 88 end; … … 137 149 end; 138 150 151 procedure TSystem.ShutDown; 152 begin 153 Application.Terminate; 154 end; 155 156 procedure TSystem.Reboot; 157 begin 158 Tasks.Clear; 159 Tasks.DoOnChange; 160 end; 161 139 162 initialization 140 163
Note:
See TracChangeset
for help on using the changeset viewer.