| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- object frMain: TfrMain
- Left = 253
- Height = 160
- Top = 126
- Width = 320
- Caption = 'HTTP router example'
- ClientHeight = 160
- ClientWidth = 320
- Position = poDesktopCenter
- LCLVersion = '2.0.10.0'
- object lbPort: TLabel
- Left = 20
- Height = 15
- Top = 22
- Width = 22
- Caption = 'Port'
- ParentColor = False
- end
- object edPort: TSpinEdit
- Left = 49
- Height = 23
- Top = 17
- Width = 66
- MaxValue = 65535
- OnChange = edPortChange
- TabOrder = 0
- end
- object btStart: TButton
- Left = 128
- Height = 25
- Top = 18
- Width = 75
- Action = acStart
- TabOrder = 1
- end
- object btStop: TButton
- Left = 216
- Height = 25
- Top = 18
- Width = 75
- Action = acStop
- TabOrder = 2
- end
- object lbLink: TLabel
- Cursor = crHandPoint
- Left = 20
- Height = 15
- Top = 64
- Width = 83
- Caption = 'http://localhost'
- Enabled = False
- Font.Color = clBlue
- Font.Style = [fsUnderline]
- ParentColor = False
- ParentFont = False
- OnClick = lbLinkClick
- OnMouseEnter = lbLinkMouseEnter
- OnMouseLeave = lbLinkMouseLeave
- end
- object alMain: TActionList
- Left = 136
- Top = 48
- object acStart: TAction
- Category = 'HTTP server'
- Caption = '&Start'
- OnExecute = acStartExecute
- ShortCut = 120
- end
- object acStop: TAction
- Category = 'HTTP server'
- Caption = 'S&top'
- Enabled = False
- OnExecute = acStopExecute
- ShortCut = 121
- end
- end
- object BrookHTTPServer1: TBrookHTTPServer
- NoFavicon = True
- OnRequest = BrookHTTPServer1Request
- OnRequestError = BrookHTTPServer1RequestError
- OnStart = BrookHTTPServer1Start
- OnStop = BrookHTTPServer1Stop
- Left = 56
- Top = 96
- end
- object BrookURLRouter1: TBrookURLRouter
- Routes = <
- item
- Default = True
- Pattern = '/home'
- Methods = [rmGET]
- OnRequest = BrookURLRouter1Routes0Request
- end
- item
- Pattern = '/download/(?P<file>[a-z]+)'
- Methods = [rmGET]
- OnRequest = BrookURLRouter1Routes1Request
- end
- item
- Pattern = '/page/([0-9]+)'
- Methods = [rmGET]
- OnRequest = BrookURLRouter1Routes2Request
- end>
- OnNotFound = BrookURLRouter1NotFound
- Left = 208
- Top = 96
- end
- end
|