Changeset 264 for ExceptionLogger/UExceptionForm.pas
- Timestamp:
- Aug 17, 2011, 10:08:55 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ExceptionLogger/UExceptionForm.pas
r167 r264 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 CustomLineInfo, ComCtrls, UStackTrace;9 CustomLineInfo, ComCtrls, ExtCtrls, UStackTrace, UExceptionLogger; 10 10 11 11 type … … 16 16 17 17 TExceptionForm = class(TForm) 18 ButtonDetails: TButton; 19 ButtonClose: TButton; 18 20 ButtonKill: TButton; 19 ButtonClose: TButton;20 21 CheckBoxIgnore: TCheckBox; 22 Image1: TImage; 23 Label1: TLabel; 24 LabelMessage: TLabel; 21 25 ListView1: TListView; 22 26 MemoExceptionInfo: TMemo; 23 27 PageControl1: TPageControl; 28 PanelBasic: TPanel; 29 PanelDescription: TPanel; 30 PanelButtons: TPanel; 24 31 TabSheet1: TTabSheet; 25 32 TabSheet2: TTabSheet; 26 33 procedure ButtonCloseClick(Sender: TObject); 34 procedure ButtonDetailsClick(Sender: TObject); 27 35 procedure ButtonKillClick(Sender: TObject); 28 36 procedure FormCreate(Sender: TObject); 29 37 procedure FormDestroy(Sender: TObject); 30 38 procedure FormShow(Sender: TObject); 31 private39 procedure Image1Click(Sender: TObject); 32 40 public 41 Logger: TExceptionLogger; 33 42 procedure LoadStackTraceToListView(StackTrace: TStackTrace); 34 43 end; … … 43 52 procedure TExceptionForm.FormShow(Sender: TObject); 44 53 begin 54 Height := PanelBasic.Height + PanelButtons.Height; 45 55 PageControl1.ActivePageIndex := 0; 46 56 CheckBoxIgnore.Checked := False; 57 end; 58 59 procedure TExceptionForm.Image1Click(Sender: TObject); 60 begin 61 47 62 end; 48 63 … … 55 70 begin 56 71 Close; 72 end; 73 74 procedure TExceptionForm.ButtonDetailsClick(Sender: TObject); 75 begin 76 if PanelDescription.Height = 0 then 77 Height := PanelBasic.Height + PanelButtons.Height + 200 78 else Height := PanelBasic.Height + PanelButtons.Height; 79 Application.ProcessMessages; 80 if MemoExceptionInfo.Text = '' then Logger.LoadDetails; 57 81 end; 58 82 … … 72 96 NewItem: TListItem; 73 97 begin 74 with ListView1, Items do begin 98 with ListView1, Items do 99 try 75 100 BeginUpdate; 76 101 Clear; … … 87 112 end; 88 113 end; 114 finally 89 115 EndUpdate; 90 116 end;
Note:
See TracChangeset
for help on using the changeset viewer.