Fixed: hint in Observer.LogFile
Changed: tabs for dispatch in test application
This commit is contained in:
parent
7186a68e1e
commit
a3fd535be7
@ -19,9 +19,9 @@ object MainForm: TMainForm
|
|||||||
object pcObservers: TPageControl
|
object pcObservers: TPageControl
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 169
|
Top = 176
|
||||||
Width = 595
|
Width = 595
|
||||||
Height = 334
|
Height = 327
|
||||||
Margins.Left = 8
|
Margins.Left = 8
|
||||||
Margins.Top = 8
|
Margins.Top = 8
|
||||||
Margins.Right = 8
|
Margins.Right = 8
|
||||||
@ -31,13 +31,13 @@ object MainForm: TMainForm
|
|||||||
Images = ilsObservers
|
Images = ilsObservers
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object tsEvent: TTabSheet
|
object tsEvent: TTabSheet
|
||||||
Caption = 'Event Observer '
|
Caption = 'Event'
|
||||||
object mmoEvent: TMemo
|
object mmoEvent: TMemo
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 40
|
Top = 40
|
||||||
Width = 571
|
Width = 571
|
||||||
Height = 258
|
Height = 251
|
||||||
Margins.Left = 8
|
Margins.Left = 8
|
||||||
Margins.Top = 40
|
Margins.Top = 40
|
||||||
Margins.Right = 8
|
Margins.Right = 8
|
||||||
@ -67,7 +67,7 @@ object MainForm: TMainForm
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object tsFile: TTabSheet
|
object tsFile: TTabSheet
|
||||||
Caption = 'File Observer'
|
Caption = 'File'
|
||||||
object lblFilename: TLabel
|
object lblFilename: TLabel
|
||||||
Left = 12
|
Left = 12
|
||||||
Top = 64
|
Top = 64
|
||||||
@ -129,7 +129,7 @@ object MainForm: TMainForm
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object tsNamedPipe: TTabSheet
|
object tsNamedPipe: TTabSheet
|
||||||
Caption = 'Named Pipe Observer'
|
Caption = 'Named Pipe'
|
||||||
object lblPipeName: TLabel
|
object lblPipeName: TLabel
|
||||||
Left = 12
|
Left = 12
|
||||||
Top = 64
|
Top = 64
|
||||||
@ -201,118 +201,190 @@ object MainForm: TMainForm
|
|||||||
OnClick = btnMonitorFormClick
|
OnClick = btnMonitorFormClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object gbDispatch: TGroupBox
|
object pcDispatch: TPageControl
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 8
|
Top = 32
|
||||||
Width = 595
|
Width = 595
|
||||||
Height = 153
|
Height = 104
|
||||||
Margins.Left = 8
|
Margins.Left = 8
|
||||||
Margins.Top = 8
|
Margins.Top = 8
|
||||||
Margins.Right = 8
|
Margins.Right = 8
|
||||||
Margins.Bottom = 0
|
Margins.Bottom = 0
|
||||||
|
ActivePage = tsText
|
||||||
Align = alTop
|
Align = alTop
|
||||||
Caption = ' Dispatch '
|
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
object tsText: TTabSheet
|
||||||
|
Caption = 'Text'
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
595
|
587
|
||||||
153)
|
76)
|
||||||
object lblMessage: TLabel
|
object lblMessage: TLabel
|
||||||
Left = 16
|
Left = 16
|
||||||
Top = 32
|
Top = 15
|
||||||
Width = 46
|
Width = 46
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Message:'
|
Caption = 'Message:'
|
||||||
end
|
end
|
||||||
object lblException: TLabel
|
object btnError: TButton
|
||||||
Left = 16
|
Left = 335
|
||||||
Top = 99
|
Top = 39
|
||||||
Width = 51
|
Width = 75
|
||||||
Height = 13
|
|
||||||
Caption = 'Exception:'
|
|
||||||
end
|
|
||||||
object edtMessage: TEdit
|
|
||||||
Left = 92
|
|
||||||
Top = 29
|
|
||||||
Width = 402
|
|
||||||
Height = 21
|
Height = 21
|
||||||
Anchors = [akLeft, akTop, akRight]
|
Caption = 'Error'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Text = 'Hello world!'
|
|
||||||
OnKeyDown = edtMessageKeyDown
|
|
||||||
end
|
|
||||||
object btnVerbose: TButton
|
|
||||||
Left = 92
|
|
||||||
Top = 56
|
|
||||||
Width = 75
|
|
||||||
Height = 21
|
|
||||||
Caption = 'Verbose'
|
|
||||||
TabOrder = 1
|
|
||||||
OnClick = btnLogClick
|
OnClick = btnLogClick
|
||||||
end
|
end
|
||||||
object edtException: TEdit
|
|
||||||
Left = 92
|
|
||||||
Top = 96
|
|
||||||
Width = 402
|
|
||||||
Height = 21
|
|
||||||
Anchors = [akLeft, akTop, akRight]
|
|
||||||
TabOrder = 6
|
|
||||||
Text = 'Horrible things are happening.'
|
|
||||||
OnKeyDown = edtExceptionKeyDown
|
|
||||||
end
|
|
||||||
object btnException: TButton
|
|
||||||
Left = 92
|
|
||||||
Top = 123
|
|
||||||
Width = 75
|
|
||||||
Height = 21
|
|
||||||
Caption = '&Send'
|
|
||||||
TabOrder = 7
|
|
||||||
OnClick = btnExceptionClick
|
|
||||||
end
|
|
||||||
object btnInfo: TButton
|
object btnInfo: TButton
|
||||||
Left = 173
|
Left = 173
|
||||||
Top = 56
|
Top = 39
|
||||||
Width = 75
|
Width = 75
|
||||||
Height = 21
|
Height = 21
|
||||||
Caption = 'Info'
|
Caption = 'Info'
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = btnLogClick
|
||||||
|
end
|
||||||
|
object btnVerbose: TButton
|
||||||
|
Left = 92
|
||||||
|
Top = 39
|
||||||
|
Width = 75
|
||||||
|
Height = 21
|
||||||
|
Caption = 'Verbose'
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
OnClick = btnLogClick
|
OnClick = btnLogClick
|
||||||
end
|
end
|
||||||
object btnWarning: TButton
|
object btnWarning: TButton
|
||||||
Left = 254
|
Left = 254
|
||||||
Top = 56
|
Top = 39
|
||||||
Width = 75
|
Width = 75
|
||||||
Height = 21
|
Height = 21
|
||||||
Caption = 'Warning'
|
Caption = 'Warning'
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
OnClick = btnLogClick
|
OnClick = btnLogClick
|
||||||
end
|
end
|
||||||
object btnError: TButton
|
object edtMessage: TEdit
|
||||||
Left = 335
|
Left = 92
|
||||||
Top = 56
|
Top = 12
|
||||||
|
Width = 477
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 4
|
||||||
|
Text = 'Hello world!'
|
||||||
|
OnKeyDown = edtMessageKeyDown
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object tsException: TTabSheet
|
||||||
|
Caption = 'Exception'
|
||||||
|
ImageIndex = 1
|
||||||
|
DesignSize = (
|
||||||
|
587
|
||||||
|
76)
|
||||||
|
object lblException: TLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 15
|
||||||
|
Width = 51
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Exception:'
|
||||||
|
end
|
||||||
|
object btnException: TButton
|
||||||
|
Left = 92
|
||||||
|
Top = 39
|
||||||
Width = 75
|
Width = 75
|
||||||
Height = 21
|
Height = 21
|
||||||
Caption = 'Error'
|
Caption = '&Send'
|
||||||
TabOrder = 4
|
TabOrder = 0
|
||||||
OnClick = btnLogClick
|
OnClick = btnExceptionClick
|
||||||
end
|
end
|
||||||
|
object edtException: TEdit
|
||||||
|
Left = 92
|
||||||
|
Top = 12
|
||||||
|
Width = 477
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 1
|
||||||
|
Text = 'Horrible things are happening.'
|
||||||
|
OnKeyDown = edtExceptionKeyDown
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object tsBinary: TTabSheet
|
||||||
|
Caption = 'Binary'
|
||||||
|
ImageIndex = 2
|
||||||
object btnBinary: TButton
|
object btnBinary: TButton
|
||||||
Left = 432
|
Left = 12
|
||||||
Top = 56
|
Top = 23
|
||||||
Width = 62
|
Width = 62
|
||||||
Height = 21
|
Height = 21
|
||||||
Caption = 'Binary'
|
Caption = 'Binary'
|
||||||
TabOrder = 5
|
TabOrder = 0
|
||||||
OnClick = btnLogClick
|
OnClick = btnLogClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
object pnlDispatch: TPanel
|
||||||
|
AlignWithMargins = True
|
||||||
|
Left = 8
|
||||||
|
Top = 0
|
||||||
|
Width = 595
|
||||||
|
Height = 24
|
||||||
|
Margins.Left = 8
|
||||||
|
Margins.Top = 0
|
||||||
|
Margins.Right = 8
|
||||||
|
Margins.Bottom = 0
|
||||||
|
Align = alTop
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Caption = 'Dispatch'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 3
|
||||||
|
object bvlDispatch: TBevel
|
||||||
|
Left = 80
|
||||||
|
Top = 12
|
||||||
|
Width = 513
|
||||||
|
Height = 9
|
||||||
|
Shape = bsTopLine
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
AlignWithMargins = True
|
||||||
|
Left = 8
|
||||||
|
Top = 144
|
||||||
|
Width = 595
|
||||||
|
Height = 24
|
||||||
|
Margins.Left = 8
|
||||||
|
Margins.Top = 8
|
||||||
|
Margins.Right = 8
|
||||||
|
Margins.Bottom = 0
|
||||||
|
Align = alTop
|
||||||
|
Alignment = taLeftJustify
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Caption = 'Observers'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
object Bevel1: TBevel
|
||||||
|
Left = 80
|
||||||
|
Top = 12
|
||||||
|
Width = 513
|
||||||
|
Height = 9
|
||||||
|
Shape = bsTopLine
|
||||||
|
end
|
||||||
|
end
|
||||||
object ilsObservers: TImageList
|
object ilsObservers: TImageList
|
||||||
Height = 12
|
Height = 12
|
||||||
Width = 12
|
Width = 12
|
||||||
Left = 552
|
Left = 552
|
||||||
Top = 176
|
Top = 176
|
||||||
Bitmap = {
|
Bitmap = {
|
||||||
494C0101020014002C000C000C00FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
|
494C01010200140034000C000C00FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
|
||||||
0000000000003600000028000000300000000C00000001002000000000000009
|
0000000000003600000028000000300000000C00000001002000000000000009
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
@ -17,7 +17,6 @@ type
|
|||||||
btnClose: TButton;
|
btnClose: TButton;
|
||||||
btnVerbose: TButton;
|
btnVerbose: TButton;
|
||||||
edtMessage: TEdit;
|
edtMessage: TEdit;
|
||||||
gbDispatch: TGroupBox;
|
|
||||||
lblMessage: TLabel;
|
lblMessage: TLabel;
|
||||||
mmoEvent: TMemo;
|
mmoEvent: TMemo;
|
||||||
pcObservers: TPageControl;
|
pcObservers: TPageControl;
|
||||||
@ -47,6 +46,14 @@ type
|
|||||||
edtPipeName: TEdit;
|
edtPipeName: TEdit;
|
||||||
lblPipeName: TLabel;
|
lblPipeName: TLabel;
|
||||||
btnBinary: TButton;
|
btnBinary: TButton;
|
||||||
|
pcDispatch: TPageControl;
|
||||||
|
tsText: TTabSheet;
|
||||||
|
tsException: TTabSheet;
|
||||||
|
tsBinary: TTabSheet;
|
||||||
|
pnlDispatch: TPanel;
|
||||||
|
bvlDispatch: TBevel;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Bevel1: TBevel;
|
||||||
|
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
@ -84,7 +91,8 @@ uses
|
|||||||
X2Log.Observer.Event,
|
X2Log.Observer.Event,
|
||||||
X2Log.Observer.LogFile,
|
X2Log.Observer.LogFile,
|
||||||
X2Log.Observer.MonitorForm,
|
X2Log.Observer.MonitorForm,
|
||||||
X2Log.Observer.NamedPipe;
|
X2Log.Observer.NamedPipe,
|
||||||
|
X2Log.Global;
|
||||||
|
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
@ -112,6 +120,7 @@ begin
|
|||||||
FLog := TX2Log.Create;
|
FLog := TX2Log.Create;
|
||||||
FLog.SetExceptionStrategy(TX2LogmadExceptExceptionStrategy.Create);
|
FLog.SetExceptionStrategy(TX2LogmadExceptExceptionStrategy.Create);
|
||||||
|
|
||||||
|
pcDispatch.ActivePageIndex := 0;
|
||||||
pcObservers.ActivePageIndex := 0;
|
pcObservers.ActivePageIndex := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -192,7 +201,8 @@ end;
|
|||||||
|
|
||||||
procedure TMainForm.btnMonitorFormClick(Sender: TObject);
|
procedure TMainForm.btnMonitorFormClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
TX2LogObserverMonitorForm.ShowInstance(FLog);
|
// TX2LogObserverMonitorForm.ShowInstance(FLog);
|
||||||
|
TX2LogObserverMonitorForm.ShowInstance(Tx2globallog.Instance);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,7 +110,6 @@ var
|
|||||||
detailsExtension: string;
|
detailsExtension: string;
|
||||||
detailsFile: THandle;
|
detailsFile: THandle;
|
||||||
detailsFileStream: THandleStream;
|
detailsFileStream: THandleStream;
|
||||||
detailsWriter: TStreamWriter;
|
|
||||||
detailsFileName: string;
|
detailsFileName: string;
|
||||||
detailsNumber: Integer;
|
detailsNumber: Integer;
|
||||||
writer: TStreamWriter;
|
writer: TStreamWriter;
|
||||||
|
Loading…
Reference in New Issue
Block a user