Changeset 168 for MicroThreading/UMicroThreadList.pas
- Timestamp:
- Feb 10, 2011, 4:10:59 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MicroThreading/UMicroThreadList.pas
r164 r168 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 ExtCtrls, StdCtrls, DateUtils, UPlatform;9 ExtCtrls, StdCtrls, Menus, DateUtils, UPlatform, UMicroThreadCallStack; 10 10 11 11 type … … 21 21 Label8: TLabel; 22 22 Label9: TLabel; 23 MenuItemCallStack: TMenuItem; 24 PopupMenu1: TPopupMenu; 23 25 TimerRedraw: TTimer; 24 26 Label1: TLabel; … … 31 33 TabSheet3: TTabSheet; 32 34 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 35 procedure FormCreate(Sender: TObject); 36 procedure FormDestroy(Sender: TObject); 33 37 procedure FormHide(Sender: TObject); 34 38 procedure FormShow(Sender: TObject); 35 39 procedure ListView1Data(Sender: TObject; Item: TListItem); 36 40 procedure ListView2Data(Sender: TObject; Item: TListItem); 41 procedure MenuItemCallStackClick(Sender: TObject); 37 42 procedure TimerRedrawTimer(Sender: TObject); 38 43 private 39 { private declarations }44 CallStackForm: TCallStackForm; 40 45 public 41 46 { public declarations } … … 81 86 with TMicroThread(MainScheduler.MicroThreads[Item.Index]) do begin 82 87 Item.Caption := IntToStr(Id); 88 Item.Data := TMicroThread(MainScheduler.MicroThreads[Item.Index]); 83 89 Item.SubItems.Add(''); 84 90 Item.SubItems.Add(IntToStr(Priority)); … … 124 130 end; 125 131 132 procedure TMicroThreadListForm.MenuItemCallStackClick(Sender: TObject); 133 begin 134 if Assigned(ListView1.Selected) then 135 with TMicroThread(ListView1.Selected.Data) do begin 136 //Suspend; 137 CallStackForm.Show(BasePointer); 138 //Resume; 139 end; 140 end; 141 126 142 procedure TMicroThreadListForm.FormShow(Sender: TObject); 127 143 begin … … 140 156 end; 141 157 158 procedure TMicroThreadListForm.FormCreate(Sender: TObject); 159 begin 160 CallStackForm := TCallStackForm.Create(nil); 161 end; 162 163 procedure TMicroThreadListForm.FormDestroy(Sender: TObject); 164 begin 165 CallStackForm.Free; 166 end; 167 142 168 143 169 end.
Note:
See TracChangeset
for help on using the changeset viewer.