You've already forked lazarus-ccr
LazMapViewer: Add proxy support to WinINet download engine. Adapt both "fulldemo" samples.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9031 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -6,11 +6,11 @@ object MainForm: TMainForm
|
|||||||
Caption = 'LazMapViewer'
|
Caption = 'LazMapViewer'
|
||||||
ClientHeight = 640
|
ClientHeight = 640
|
||||||
ClientWidth = 883
|
ClientWidth = 883
|
||||||
|
ShowHint = True
|
||||||
|
LCLVersion = '3.99.0.0'
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
ShowHint = True
|
|
||||||
LCLVersion = '2.3.0.0'
|
|
||||||
object MapView: TMapView
|
object MapView: TMapView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 640
|
Height = 640
|
||||||
@ -59,9 +59,9 @@ object MainForm: TMainForm
|
|||||||
Width = 263
|
Width = 263
|
||||||
Max = 19
|
Max = 19
|
||||||
Min = 1
|
Min = 1
|
||||||
OnChange = ZoomTrackBarChange
|
|
||||||
Position = 1
|
Position = 1
|
||||||
TickMarks = tmBoth
|
TickMarks = tmBoth
|
||||||
|
OnChange = ZoomTrackBarChange
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 2
|
BorderSpacing.Left = 2
|
||||||
BorderSpacing.Right = 2
|
BorderSpacing.Right = 2
|
||||||
@ -332,10 +332,10 @@ object MainForm: TMainForm
|
|||||||
'km'
|
'km'
|
||||||
'miles'
|
'miles'
|
||||||
)
|
)
|
||||||
OnChange = CbDistanceUnitsChange
|
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
Text = 'km'
|
Text = 'km'
|
||||||
|
OnChange = CbDistanceUnitsChange
|
||||||
end
|
end
|
||||||
object GbSearch: TGroupBox
|
object GbSearch: TGroupBox
|
||||||
AnchorSideLeft.Control = GbScreenSize
|
AnchorSideLeft.Control = GbScreenSize
|
||||||
@ -385,8 +385,8 @@ object MainForm: TMainForm
|
|||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'Search'
|
Caption = 'Search'
|
||||||
OnClick = BtnSearchClick
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
OnClick = BtnSearchClick
|
||||||
end
|
end
|
||||||
object LblSelectLocation: TLabel
|
object LblSelectLocation: TLabel
|
||||||
AnchorSideLeft.Control = CbLocations
|
AnchorSideLeft.Control = CbLocations
|
||||||
@ -413,8 +413,8 @@ object MainForm: TMainForm
|
|||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
Caption = 'Go to'
|
Caption = 'Go to'
|
||||||
|
TabOrder = 3
|
||||||
OnClick = BtnGoToClick
|
OnClick = BtnGoToClick
|
||||||
TabOrder = 2
|
|
||||||
end
|
end
|
||||||
object CbFoundLocations: TComboBox
|
object CbFoundLocations: TComboBox
|
||||||
AnchorSideLeft.Control = LblSelectLocation
|
AnchorSideLeft.Control = LblSelectLocation
|
||||||
@ -432,11 +432,11 @@ object MainForm: TMainForm
|
|||||||
DropDownCount = 24
|
DropDownCount = 24
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
ItemWidth = -2
|
ItemWidth = -2
|
||||||
OnDrawItem = CbFoundLocationsDrawItem
|
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
Style = csOwnerDrawFixed
|
Style = csOwnerDrawFixed
|
||||||
TabOrder = 3
|
TabOrder = 2
|
||||||
|
OnDrawItem = CbFoundLocationsDrawItem
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object GbGPS: TGroupBox
|
object GbGPS: TGroupBox
|
||||||
@ -469,8 +469,8 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'List...'
|
Caption = 'List...'
|
||||||
OnClick = BtnGPSPointsClick
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
OnClick = BtnGPSPointsClick
|
||||||
end
|
end
|
||||||
object InfoBtnGPSPoints: TLabel
|
object InfoBtnGPSPoints: TLabel
|
||||||
AnchorSideLeft.Control = GbGPS
|
AnchorSideLeft.Control = GbGPS
|
||||||
@ -519,8 +519,8 @@ object MainForm: TMainForm
|
|||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
Caption = 'Save map to file'
|
Caption = 'Save map to file'
|
||||||
OnClick = BtnSaveToFileClick
|
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
|
OnClick = BtnSaveToFileClick
|
||||||
end
|
end
|
||||||
object BtnLoadGPXFile: TButton
|
object BtnLoadGPXFile: TButton
|
||||||
AnchorSideLeft.Control = BtnSaveToFile
|
AnchorSideLeft.Control = BtnSaveToFile
|
||||||
@ -533,8 +533,8 @@ object MainForm: TMainForm
|
|||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
Caption = 'Load GPX file...'
|
Caption = 'Load GPX file...'
|
||||||
OnClick = BtnLoadGPXFileClick
|
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
|
OnClick = BtnLoadGPXFileClick
|
||||||
end
|
end
|
||||||
object BtnPrintMap: TButton
|
object BtnPrintMap: TButton
|
||||||
AnchorSideLeft.Control = BtnSaveToFile
|
AnchorSideLeft.Control = BtnSaveToFile
|
||||||
@ -549,8 +549,8 @@ object MainForm: TMainForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
Caption = 'Print...'
|
Caption = 'Print...'
|
||||||
OnClick = BtnPrintMapClick
|
|
||||||
TabOrder = 9
|
TabOrder = 9
|
||||||
|
OnClick = BtnPrintMapClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object PgConfig: TTabSheet
|
object PgConfig: TTabSheet
|
||||||
@ -562,9 +562,9 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Control = PgConfig
|
AnchorSideTop.Control = PgConfig
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 8
|
Top = 12
|
||||||
Width = 52
|
Width = 52
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 12
|
||||||
Caption = 'Providers:'
|
Caption = 'Providers:'
|
||||||
FocusControl = CbProviders
|
FocusControl = CbProviders
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -576,26 +576,26 @@ object MainForm: TMainForm
|
|||||||
AnchorSideRight.Control = BtnLoadMapProviders
|
AnchorSideRight.Control = BtnLoadMapProviders
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 25
|
Top = 29
|
||||||
Width = 199
|
Width = 201
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 2
|
BorderSpacing.Top = 2
|
||||||
BorderSpacing.Right = 4
|
BorderSpacing.Right = 4
|
||||||
DropDownCount = 24
|
DropDownCount = 24
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
OnChange = CbProvidersChange
|
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
OnChange = CbProvidersChange
|
||||||
end
|
end
|
||||||
object BtnLoadMapProviders: TSpeedButton
|
object BtnLoadMapProviders: TSpeedButton
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = CbProviders
|
AnchorSideTop.Control = CbProviders
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideRight.Control = BtnSaveMapProviders
|
AnchorSideRight.Control = BtnSaveMapProviders
|
||||||
Left = 209
|
Left = 211
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 25
|
Top = 29
|
||||||
Width = 23
|
Width = 23
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
BorderSpacing.Right = 4
|
BorderSpacing.Right = 4
|
||||||
@ -644,12 +644,12 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideRight.Control = PgConfig
|
AnchorSideRight.Control = PgConfig
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 236
|
Left = 238
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 25
|
Top = 29
|
||||||
Width = 23
|
Width = 23
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 6
|
||||||
Glyph.Data = {
|
Glyph.Data = {
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
2000000000000004000064000000640000000000000000000000A4653455A465
|
2000000000000004000064000000640000000000000000000000A4653455A465
|
||||||
@ -694,15 +694,15 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 81
|
Top = 296
|
||||||
Width = 79
|
Width = 79
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'Use threads'
|
Caption = 'Use threads'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = CbUseThreadsChange
|
|
||||||
State = cbChecked
|
State = cbChecked
|
||||||
TabOrder = 1
|
TabOrder = 4
|
||||||
|
OnChange = CbUseThreadsChange
|
||||||
end
|
end
|
||||||
object CbDoubleBuffer: TCheckBox
|
object CbDoubleBuffer: TCheckBox
|
||||||
AnchorSideLeft.Control = CbUseThreads
|
AnchorSideLeft.Control = CbUseThreads
|
||||||
@ -710,15 +710,15 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 106
|
Top = 321
|
||||||
Width = 85
|
Width = 85
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
BorderSpacing.Right = 9
|
BorderSpacing.Right = 9
|
||||||
Caption = 'DblBuffering'
|
Caption = 'DblBuffering'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = CbDoubleBufferChange
|
|
||||||
State = cbChecked
|
State = cbChecked
|
||||||
TabOrder = 2
|
TabOrder = 6
|
||||||
|
OnChange = CbDoubleBufferChange
|
||||||
end
|
end
|
||||||
object CbDebugTiles: TCheckBox
|
object CbDebugTiles: TCheckBox
|
||||||
AnchorSideLeft.Control = CbDoubleBuffer
|
AnchorSideLeft.Control = CbDoubleBuffer
|
||||||
@ -726,12 +726,12 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 131
|
Top = 346
|
||||||
Width = 77
|
Width = 77
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'Debug tiles'
|
Caption = 'Debug tiles'
|
||||||
|
TabOrder = 7
|
||||||
OnChange = CbDebugTilesChange
|
OnChange = CbDebugTilesChange
|
||||||
TabOrder = 3
|
|
||||||
end
|
end
|
||||||
object BtnPOITextFont: TButton
|
object BtnPOITextFont: TButton
|
||||||
AnchorSideLeft.Control = rgPOIMode
|
AnchorSideLeft.Control = rgPOIMode
|
||||||
@ -739,13 +739,13 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 286
|
Top = 501
|
||||||
Width = 93
|
Width = 93
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 12
|
BorderSpacing.Top = 12
|
||||||
Caption = 'POI text font'
|
Caption = 'POI text font'
|
||||||
|
TabOrder = 9
|
||||||
OnClick = BtnPOITextFontClick
|
OnClick = BtnPOITextFontClick
|
||||||
TabOrder = 4
|
|
||||||
end
|
end
|
||||||
object cbPOITextBgColor: TColorBox
|
object cbPOITextBgColor: TColorBox
|
||||||
AnchorSideLeft.Control = LblPOITextBgColor
|
AnchorSideLeft.Control = LblPOITextBgColor
|
||||||
@ -755,15 +755,15 @@ object MainForm: TMainForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 154
|
Left = 154
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 287
|
Top = 502
|
||||||
Width = 107
|
Width = 107
|
||||||
NoneColorColor = clWhite
|
NoneColorColor = clWhite
|
||||||
Style = [cbStandardColors, cbExtendedColors, cbIncludeNone, cbCustomColor, cbPrettyNames, cbCustomColors]
|
Style = [cbStandardColors, cbExtendedColors, cbIncludeNone, cbCustomColor, cbPrettyNames, cbCustomColors]
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
ItemHeight = 16
|
ItemHeight = 16
|
||||||
|
TabOrder = 10
|
||||||
OnChange = cbPOITextBgColorChange
|
OnChange = cbPOITextBgColorChange
|
||||||
TabOrder = 5
|
|
||||||
end
|
end
|
||||||
object LblPOITextBgColor: TLabel
|
object LblPOITextBgColor: TLabel
|
||||||
AnchorSideLeft.Control = BtnPOITextFont
|
AnchorSideLeft.Control = BtnPOITextFont
|
||||||
@ -772,7 +772,7 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 107
|
Left = 107
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 291
|
Top = 506
|
||||||
Width = 39
|
Width = 39
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
Caption = 'Backgr.'
|
Caption = 'Backgr.'
|
||||||
@ -785,7 +785,7 @@ object MainForm: TMainForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 4
|
Height = 4
|
||||||
Top = 158
|
Top = 373
|
||||||
Width = 255
|
Width = 255
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
@ -797,7 +797,7 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 104
|
Height = 104
|
||||||
Top = 170
|
Top = 385
|
||||||
Width = 159
|
Width = 159
|
||||||
AutoFill = True
|
AutoFill = True
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
@ -820,25 +820,25 @@ object MainForm: TMainForm
|
|||||||
'image from imagelist'
|
'image from imagelist'
|
||||||
'custom drawing'
|
'custom drawing'
|
||||||
)
|
)
|
||||||
|
TabOrder = 8
|
||||||
OnClick = rgPOIModeClick
|
OnClick = rgPOIModeClick
|
||||||
TabOrder = 6
|
|
||||||
end
|
end
|
||||||
object CbZoomToCursor: TCheckBox
|
object CbZoomToCursor: TCheckBox
|
||||||
AnchorSideLeft.Control = PgConfig
|
AnchorSideLeft.Control = PgConfig
|
||||||
AnchorSideTop.Control = CbProviders
|
AnchorSideTop.Control = gbProxy
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 56
|
Top = 271
|
||||||
Width = 100
|
Width = 100
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 12
|
||||||
BorderSpacing.Right = 24
|
BorderSpacing.Right = 24
|
||||||
Caption = 'Zoom to cursor'
|
Caption = 'Zoom to cursor'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = CbZoomToCursorChange
|
|
||||||
State = cbChecked
|
State = cbChecked
|
||||||
TabOrder = 7
|
TabOrder = 2
|
||||||
|
OnChange = CbZoomToCursorChange
|
||||||
end
|
end
|
||||||
object cbCyclicView: TCheckBox
|
object cbCyclicView: TCheckBox
|
||||||
AnchorSideLeft.Control = CbZoomToCursor
|
AnchorSideLeft.Control = CbZoomToCursor
|
||||||
@ -846,13 +846,13 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Control = CbZoomToCursor
|
AnchorSideTop.Control = CbZoomToCursor
|
||||||
Left = 130
|
Left = 130
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 56
|
Top = 271
|
||||||
Width = 77
|
Width = 77
|
||||||
Caption = 'Cyclic view'
|
Caption = 'Cyclic view'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = cbCyclicViewChange
|
|
||||||
State = cbChecked
|
State = cbChecked
|
||||||
TabOrder = 8
|
TabOrder = 3
|
||||||
|
OnChange = cbCyclicViewChange
|
||||||
end
|
end
|
||||||
object clbBackColor: TColorButton
|
object clbBackColor: TColorButton
|
||||||
AnchorSideLeft.Control = cbCyclicView
|
AnchorSideLeft.Control = cbCyclicView
|
||||||
@ -860,7 +860,7 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 130
|
Left = 130
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 103
|
Top = 318
|
||||||
Width = 105
|
Width = 105
|
||||||
BorderWidth = 2
|
BorderWidth = 2
|
||||||
ButtonColorAutoSize = False
|
ButtonColorAutoSize = False
|
||||||
@ -875,13 +875,177 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Control = CbUseThreads
|
AnchorSideTop.Control = CbUseThreads
|
||||||
Left = 130
|
Left = 130
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 81
|
Top = 296
|
||||||
Width = 83
|
Width = 83
|
||||||
Caption = 'Preview tiles'
|
Caption = 'Preview tiles'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = CbPreviewTilesChange
|
|
||||||
State = cbChecked
|
State = cbChecked
|
||||||
TabOrder = 9
|
TabOrder = 5
|
||||||
|
OnChange = CbPreviewTilesChange
|
||||||
|
end
|
||||||
|
object gbProxy: TGroupBox
|
||||||
|
AnchorSideLeft.Control = PgConfig
|
||||||
|
AnchorSideTop.Control = CbProviders
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = PgConfig
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 195
|
||||||
|
Top = 64
|
||||||
|
Width = 255
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Proxy'
|
||||||
|
ClientHeight = 175
|
||||||
|
ClientWidth = 251
|
||||||
|
TabOrder = 1
|
||||||
|
object lblProxyHost: TLabel
|
||||||
|
AnchorSideLeft.Control = rbNoProxy
|
||||||
|
AnchorSideTop.Control = edProxyHost
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 32
|
||||||
|
Height = 15
|
||||||
|
Top = 67
|
||||||
|
Width = 28
|
||||||
|
BorderSpacing.Left = 16
|
||||||
|
Caption = 'Host:'
|
||||||
|
end
|
||||||
|
object edProxyHost: TEdit
|
||||||
|
AnchorSideLeft.Control = edProxyUserName
|
||||||
|
AnchorSideTop.Control = rbProxyData
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = gbProxy
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 99
|
||||||
|
Height = 23
|
||||||
|
Top = 63
|
||||||
|
Width = 144
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Right = 8
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = rbProxyChange
|
||||||
|
end
|
||||||
|
object lblProxyPort: TLabel
|
||||||
|
AnchorSideLeft.Control = lblProxyHost
|
||||||
|
AnchorSideTop.Control = seProxyPort
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 32
|
||||||
|
Height = 15
|
||||||
|
Top = 94
|
||||||
|
Width = 22
|
||||||
|
Caption = 'Port'
|
||||||
|
end
|
||||||
|
object seProxyPort: TSpinEdit
|
||||||
|
AnchorSideLeft.Control = lblProxyUserName
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = edProxyHost
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 99
|
||||||
|
Height = 23
|
||||||
|
Top = 90
|
||||||
|
Width = 104
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
MaxValue = 65535
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = rbProxyChange
|
||||||
|
end
|
||||||
|
object lblProxyUserName: TLabel
|
||||||
|
AnchorSideLeft.Control = lblProxyHost
|
||||||
|
AnchorSideTop.Control = edProxyUserName
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 32
|
||||||
|
Height = 15
|
||||||
|
Top = 121
|
||||||
|
Width = 59
|
||||||
|
BorderSpacing.Right = 8
|
||||||
|
Caption = 'User name:'
|
||||||
|
end
|
||||||
|
object edProxyUserName: TEdit
|
||||||
|
AnchorSideLeft.Control = lblProxyUserName
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = seProxyPort
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = gbProxy
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 99
|
||||||
|
Height = 23
|
||||||
|
Top = 117
|
||||||
|
Width = 144
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
BorderSpacing.Right = 8
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = rbProxyChange
|
||||||
|
end
|
||||||
|
object lblProxyPassword: TLabel
|
||||||
|
AnchorSideLeft.Control = lblProxyHost
|
||||||
|
AnchorSideTop.Control = edProxyPassword
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 32
|
||||||
|
Height = 15
|
||||||
|
Top = 148
|
||||||
|
Width = 50
|
||||||
|
Caption = 'Password'
|
||||||
|
end
|
||||||
|
object edProxyPassword: TEdit
|
||||||
|
AnchorSideLeft.Control = edProxyUserName
|
||||||
|
AnchorSideTop.Control = edProxyUserName
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = gbProxy
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 99
|
||||||
|
Height = 23
|
||||||
|
Top = 144
|
||||||
|
Width = 144
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
BorderSpacing.Right = 8
|
||||||
|
BorderSpacing.Bottom = 8
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = rbProxyChange
|
||||||
|
end
|
||||||
|
object rbProxyData: TRadioButton
|
||||||
|
AnchorSideLeft.Control = rbNoProxy
|
||||||
|
AnchorSideTop.Control = rbSystemProxy
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 16
|
||||||
|
Height = 19
|
||||||
|
Top = 44
|
||||||
|
Width = 74
|
||||||
|
BorderSpacing.Top = 3
|
||||||
|
Caption = 'Proxy data'
|
||||||
|
TabOrder = 2
|
||||||
|
OnChangeBounds = rbProxyChange
|
||||||
|
end
|
||||||
|
object rbNoProxy: TRadioButton
|
||||||
|
AnchorSideLeft.Control = gbProxy
|
||||||
|
AnchorSideTop.Control = gbProxy
|
||||||
|
Left = 16
|
||||||
|
Height = 19
|
||||||
|
Top = 0
|
||||||
|
Width = 67
|
||||||
|
BorderSpacing.Left = 16
|
||||||
|
Caption = 'No proxy'
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = rbProxyChange
|
||||||
|
end
|
||||||
|
object rbSystemProxy: TRadioButton
|
||||||
|
AnchorSideLeft.Control = rbNoProxy
|
||||||
|
AnchorSideTop.Control = rbNoProxy
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 16
|
||||||
|
Height = 19
|
||||||
|
Top = 22
|
||||||
|
Width = 110
|
||||||
|
BorderSpacing.Top = 3
|
||||||
|
Caption = 'Use system proxy'
|
||||||
|
Checked = True
|
||||||
|
TabOrder = 1
|
||||||
|
TabStop = True
|
||||||
|
OnChange = rbProxyChange
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,8 +5,8 @@ unit Main;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Types, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, Types, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||||
ExtCtrls, StdCtrls, ComCtrls, Buttons, IntfGraphics, ColorBox, PrintersDlgs,
|
StdCtrls, ComCtrls, Buttons, IntfGraphics, ColorBox, Spin, PrintersDlgs,
|
||||||
mvGeoNames, mvMapViewer, mvTypes, mvGpsObj, mvDrawingEngine;
|
mvGeoNames, mvMapViewer, mvTypes, mvGpsObj, mvDrawingEngine;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -26,6 +26,9 @@ type
|
|||||||
CbFoundLocations: TComboBox;
|
CbFoundLocations: TComboBox;
|
||||||
CbLocations: TComboBox;
|
CbLocations: TComboBox;
|
||||||
CbProviders: TComboBox;
|
CbProviders: TComboBox;
|
||||||
|
rbSystemProxy: TRadioButton;
|
||||||
|
rbNoProxy: TRadioButton;
|
||||||
|
rbProxyData: TRadioButton;
|
||||||
CbUseThreads: TCheckBox;
|
CbUseThreads: TCheckBox;
|
||||||
CbMouseCoords: TGroupBox;
|
CbMouseCoords: TGroupBox;
|
||||||
CbDistanceUnits: TComboBox;
|
CbDistanceUnits: TComboBox;
|
||||||
@ -35,18 +38,26 @@ type
|
|||||||
cbCyclicView: TCheckBox;
|
cbCyclicView: TCheckBox;
|
||||||
CbPreviewTiles: TCheckBox;
|
CbPreviewTiles: TCheckBox;
|
||||||
clbBackColor: TColorButton;
|
clbBackColor: TColorButton;
|
||||||
|
edProxyHost: TEdit;
|
||||||
|
edProxyUserName: TEdit;
|
||||||
|
edProxyPassword: TEdit;
|
||||||
FontDialog: TFontDialog;
|
FontDialog: TFontDialog;
|
||||||
GbCenterCoords: TGroupBox;
|
GbCenterCoords: TGroupBox;
|
||||||
GbScreenSize: TGroupBox;
|
GbScreenSize: TGroupBox;
|
||||||
GbSearch: TGroupBox;
|
GbSearch: TGroupBox;
|
||||||
GbGPS: TGroupBox;
|
GbGPS: TGroupBox;
|
||||||
|
gbProxy: TGroupBox;
|
||||||
InfoCenterLatitude: TLabel;
|
InfoCenterLatitude: TLabel;
|
||||||
InfoViewportHeight: TLabel;
|
InfoViewportHeight: TLabel;
|
||||||
InfoCenterLongitude: TLabel;
|
InfoCenterLongitude: TLabel;
|
||||||
InfoBtnGPSPoints: TLabel;
|
InfoBtnGPSPoints: TLabel;
|
||||||
GPSPointInfo: TLabel;
|
GPSPointInfo: TLabel;
|
||||||
InfoViewportWidth: TLabel;
|
InfoViewportWidth: TLabel;
|
||||||
|
lblProxyUserName: TLabel;
|
||||||
|
lblProxyPort: TLabel;
|
||||||
|
lblProxyHost: TLabel;
|
||||||
LblPOITextBgColor: TLabel;
|
LblPOITextBgColor: TLabel;
|
||||||
|
lblProxyPassword: TLabel;
|
||||||
LblSelectLocation: TLabel;
|
LblSelectLocation: TLabel;
|
||||||
LblCenterLatitude: TLabel;
|
LblCenterLatitude: TLabel;
|
||||||
LblViewportHeight: TLabel;
|
LblViewportHeight: TLabel;
|
||||||
@ -69,6 +80,7 @@ type
|
|||||||
POIImages: TImageList;
|
POIImages: TImageList;
|
||||||
PrintDialog1: TPrintDialog;
|
PrintDialog1: TPrintDialog;
|
||||||
rgPOIMode: TRadioGroup;
|
rgPOIMode: TRadioGroup;
|
||||||
|
seProxyPort: TSpinEdit;
|
||||||
ZoomTrackBar: TTrackBar;
|
ZoomTrackBar: TTrackBar;
|
||||||
procedure BtnGoToClick(Sender: TObject);
|
procedure BtnGoToClick(Sender: TObject);
|
||||||
procedure BtnLoadGPXFileClick(Sender: TObject);
|
procedure BtnLoadGPXFileClick(Sender: TObject);
|
||||||
@ -85,6 +97,7 @@ type
|
|||||||
procedure cbPOITextBgColorChange(Sender: TObject);
|
procedure cbPOITextBgColorChange(Sender: TObject);
|
||||||
procedure CbPreviewTilesChange(Sender: TObject);
|
procedure CbPreviewTilesChange(Sender: TObject);
|
||||||
procedure CbProvidersChange(Sender: TObject);
|
procedure CbProvidersChange(Sender: TObject);
|
||||||
|
procedure rbProxyChange(Sender: TObject);
|
||||||
procedure CbShowPOIImageChange(Sender: TObject);
|
procedure CbShowPOIImageChange(Sender: TObject);
|
||||||
procedure CbUseThreadsChange(Sender: TObject);
|
procedure CbUseThreadsChange(Sender: TObject);
|
||||||
procedure CbDistanceUnitsChange(Sender: TObject);
|
procedure CbDistanceUnitsChange(Sender: TObject);
|
||||||
@ -112,6 +125,7 @@ type
|
|||||||
POIImage: TCustomBitmap;
|
POIImage: TCustomBitmap;
|
||||||
procedure ClearFoundLocations;
|
procedure ClearFoundLocations;
|
||||||
procedure UpdateCoords(X, Y: Integer);
|
procedure UpdateCoords(X, Y: Integer);
|
||||||
|
procedure UpdateDownloadEngineProxy;
|
||||||
procedure UpdateDropdownWidth(ACombobox: TCombobox);
|
procedure UpdateDropdownWidth(ACombobox: TCombobox);
|
||||||
procedure UpdateLocationHistory(ALocation: String);
|
procedure UpdateLocationHistory(ALocation: String);
|
||||||
procedure UpdateViewportSize;
|
procedure UpdateViewportSize;
|
||||||
@ -391,6 +405,11 @@ begin
|
|||||||
MapView.MapProvider := CbProviders.Text;
|
MapView.MapProvider := CbProviders.Text;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMainForm.rbProxyChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
UpdateDownloadEngineProxy;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMainForm.CbShowPOIImageChange(Sender: TObject);
|
procedure TMainForm.CbShowPOIImageChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
{
|
{
|
||||||
@ -773,6 +792,19 @@ begin
|
|||||||
List.Free;
|
List.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
i := ini.ReadInteger('Proxy', 'UseProxy', 0);
|
||||||
|
case i of
|
||||||
|
0: rbNoProxy.Checked := true;
|
||||||
|
1: rbSystemProxy.Checked := true;
|
||||||
|
2: rbProxyData.Checked := true;
|
||||||
|
end;
|
||||||
|
edProxyHost.Text := ini.ReadString('Proxy', 'ProxyHost', edProxyHost.Text);
|
||||||
|
seProxyPort.Value := ini.ReadInteger('Proxy', 'ProxyPort', seProxyPort.Value);
|
||||||
|
edProxyUserName.Text := ini.ReadString('Proxy', 'ProxyName', edProxyUserName.Text);
|
||||||
|
edProxyPassword.Text := ini.ReadString('Proxy', 'ProxyPassword', edProxyPassword.Text);
|
||||||
|
|
||||||
|
UpdateDownloadEngineProxy;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
ini.Free;
|
ini.Free;
|
||||||
end;
|
end;
|
||||||
@ -815,6 +847,26 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMainForm.UpdateDownloadEngineProxy;
|
||||||
|
begin
|
||||||
|
if MapView.DownloadEngine.HasProxySupport then
|
||||||
|
begin
|
||||||
|
MapView.DownloadEngine.SetProxy(
|
||||||
|
rbSystemProxy.Checked, rbProxyData.Checked,
|
||||||
|
edProxyHost.Name, seProxyPort.Value, edProxyUserName.Text, edProxyPassword.Text
|
||||||
|
);
|
||||||
|
rbSystemProxy.Enabled := MapView.DownloadEngine.SupportsSystemProxy;
|
||||||
|
lblProxyHost.Enabled := rbProxyData.Checked;
|
||||||
|
edProxyHost.Enabled := rbProxyData.Checked;
|
||||||
|
lblProxyPort.Enabled := rbProxyData.Checked;
|
||||||
|
seProxyPort.Enabled := rbProxyData.Checked;
|
||||||
|
lblProxyUserName.Enabled := rbProxyData.Checked;
|
||||||
|
edProxyUserName.Enabled := rbProxyData.Checked;
|
||||||
|
lblProxyPassword.Enabled := rbProxyData.Checked;
|
||||||
|
edProxyPassword.Enabled := rbProxyData.Checked;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMainForm.UpdateDropdownWidth(ACombobox: TCombobox);
|
procedure TMainForm.UpdateDropdownWidth(ACombobox: TCombobox);
|
||||||
var
|
var
|
||||||
cnv: TControlCanvas;
|
cnv: TControlCanvas;
|
||||||
@ -913,6 +965,19 @@ begin
|
|||||||
for i := 0 to CbLocations.Items.Count-1 do
|
for i := 0 to CbLocations.Items.Count-1 do
|
||||||
ini.WriteString('Locations', 'Item'+IntToStr(i), CbLocations.Items[i]);
|
ini.WriteString('Locations', 'Item'+IntToStr(i), CbLocations.Items[i]);
|
||||||
|
|
||||||
|
if rbSystemProxy.Checked then
|
||||||
|
i := 1
|
||||||
|
else if rbProxyData.Checked then
|
||||||
|
i := 2
|
||||||
|
else
|
||||||
|
i := 0;
|
||||||
|
ini.EraseSection('Proxy');
|
||||||
|
ini.WriteInteger('Proxy', 'UseProxy', i);
|
||||||
|
ini.WriteString('Proxy', 'ProxyHost', edProxyHost.Text);
|
||||||
|
ini.WriteInteger('Proxy', 'ProxyPort', seProxyPort.Value);
|
||||||
|
ini.WriteString('Proxy', 'ProxyName', edProxyUserName.Text);
|
||||||
|
ini.WriteString('Proxy', 'ProxyPassword', edProxyPassword.Text);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
ini.Free;
|
ini.Free;
|
||||||
end;
|
end;
|
||||||
|
@ -6,11 +6,11 @@ object MainForm: TMainForm
|
|||||||
Caption = 'LazMapViewer'
|
Caption = 'LazMapViewer'
|
||||||
ClientHeight = 640
|
ClientHeight = 640
|
||||||
ClientWidth = 883
|
ClientWidth = 883
|
||||||
|
ShowHint = True
|
||||||
|
LCLVersion = '3.99.0.0'
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
ShowHint = True
|
|
||||||
LCLVersion = '2.3.0.0'
|
|
||||||
object MapView: TMapView
|
object MapView: TMapView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 640
|
Height = 640
|
||||||
@ -57,9 +57,9 @@ object MainForm: TMainForm
|
|||||||
Width = 263
|
Width = 263
|
||||||
Max = 19
|
Max = 19
|
||||||
Min = 1
|
Min = 1
|
||||||
OnChange = ZoomTrackBarChange
|
|
||||||
Position = 1
|
Position = 1
|
||||||
TickMarks = tmBoth
|
TickMarks = tmBoth
|
||||||
|
OnChange = ZoomTrackBarChange
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 2
|
BorderSpacing.Left = 2
|
||||||
BorderSpacing.Right = 2
|
BorderSpacing.Right = 2
|
||||||
@ -317,10 +317,10 @@ object MainForm: TMainForm
|
|||||||
'km'
|
'km'
|
||||||
'miles'
|
'miles'
|
||||||
)
|
)
|
||||||
OnChange = CbDistanceUnitsChange
|
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
Text = 'km'
|
Text = 'km'
|
||||||
|
OnChange = CbDistanceUnitsChange
|
||||||
end
|
end
|
||||||
object GbSearch: TGroupBox
|
object GbSearch: TGroupBox
|
||||||
AnchorSideLeft.Control = GbScreenSize
|
AnchorSideLeft.Control = GbScreenSize
|
||||||
@ -370,8 +370,8 @@ object MainForm: TMainForm
|
|||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'Search'
|
Caption = 'Search'
|
||||||
OnClick = BtnSearchClick
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
OnClick = BtnSearchClick
|
||||||
end
|
end
|
||||||
object LblSelectLocation: TLabel
|
object LblSelectLocation: TLabel
|
||||||
AnchorSideLeft.Control = CbLocations
|
AnchorSideLeft.Control = CbLocations
|
||||||
@ -397,8 +397,8 @@ object MainForm: TMainForm
|
|||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
Caption = 'Go to'
|
Caption = 'Go to'
|
||||||
OnClick = BtnGoToClick
|
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
OnClick = BtnGoToClick
|
||||||
end
|
end
|
||||||
object CbFoundLocations: TComboBox
|
object CbFoundLocations: TComboBox
|
||||||
AnchorSideLeft.Control = LblSelectLocation
|
AnchorSideLeft.Control = LblSelectLocation
|
||||||
@ -416,11 +416,11 @@ object MainForm: TMainForm
|
|||||||
DropDownCount = 24
|
DropDownCount = 24
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
ItemWidth = -2
|
ItemWidth = -2
|
||||||
OnDrawItem = CbFoundLocationsDrawItem
|
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
Style = csOwnerDrawFixed
|
Style = csOwnerDrawFixed
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
OnDrawItem = CbFoundLocationsDrawItem
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object GbGPS: TGroupBox
|
object GbGPS: TGroupBox
|
||||||
@ -453,8 +453,8 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
Caption = 'List...'
|
Caption = 'List...'
|
||||||
OnClick = BtnGPSPointsClick
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
OnClick = BtnGPSPointsClick
|
||||||
end
|
end
|
||||||
object InfoBtnGPSPoints: TLabel
|
object InfoBtnGPSPoints: TLabel
|
||||||
AnchorSideLeft.Control = GbGPS
|
AnchorSideLeft.Control = GbGPS
|
||||||
@ -501,8 +501,8 @@ object MainForm: TMainForm
|
|||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
Caption = 'Save map to file'
|
Caption = 'Save map to file'
|
||||||
OnClick = BtnSaveToFileClick
|
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
|
OnClick = BtnSaveToFileClick
|
||||||
end
|
end
|
||||||
object BtnLoadGPXFile: TButton
|
object BtnLoadGPXFile: TButton
|
||||||
AnchorSideLeft.Control = BtnSaveToFile
|
AnchorSideLeft.Control = BtnSaveToFile
|
||||||
@ -515,8 +515,8 @@ object MainForm: TMainForm
|
|||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
Caption = 'Load GPX file...'
|
Caption = 'Load GPX file...'
|
||||||
OnClick = BtnLoadGPXFileClick
|
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
|
OnClick = BtnLoadGPXFileClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object PgConfig: TTabSheet
|
object PgConfig: TTabSheet
|
||||||
@ -528,9 +528,9 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Control = PgConfig
|
AnchorSideTop.Control = PgConfig
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 6
|
Top = 12
|
||||||
Width = 86
|
Width = 86
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 12
|
||||||
Caption = 'Drawing engine:'
|
Caption = 'Drawing engine:'
|
||||||
end
|
end
|
||||||
object CbDrawingEngine: TComboBox
|
object CbDrawingEngine: TComboBox
|
||||||
@ -541,7 +541,7 @@ object MainForm: TMainForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 23
|
Top = 29
|
||||||
Width = 255
|
Width = 255
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
@ -554,18 +554,18 @@ object MainForm: TMainForm
|
|||||||
'RGBGraphics'
|
'RGBGraphics'
|
||||||
'BGRABitmap'
|
'BGRABitmap'
|
||||||
)
|
)
|
||||||
OnChange = CbDrawingEngineChange
|
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Text = 'default'
|
Text = 'default'
|
||||||
|
OnChange = CbDrawingEngineChange
|
||||||
end
|
end
|
||||||
object LblProviders: TLabel
|
object LblProviders: TLabel
|
||||||
AnchorSideLeft.Control = CbProviders
|
AnchorSideLeft.Control = CbProviders
|
||||||
AnchorSideTop.Control = CbDownloadEngine
|
AnchorSideTop.Control = gbProxy
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 102
|
Top = 315
|
||||||
Width = 52
|
Width = 52
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
Caption = 'Providers:'
|
Caption = 'Providers:'
|
||||||
@ -578,26 +578,26 @@ object MainForm: TMainForm
|
|||||||
AnchorSideRight.Control = BtnLoadMapProviders
|
AnchorSideRight.Control = BtnLoadMapProviders
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 119
|
Top = 332
|
||||||
Width = 199
|
Width = 201
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 2
|
BorderSpacing.Top = 2
|
||||||
BorderSpacing.Right = 4
|
BorderSpacing.Right = 4
|
||||||
DropDownCount = 24
|
DropDownCount = 24
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
OnChange = CbProvidersChange
|
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
OnChange = CbProvidersChange
|
||||||
end
|
end
|
||||||
object BtnLoadMapProviders: TSpeedButton
|
object BtnLoadMapProviders: TSpeedButton
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = CbProviders
|
AnchorSideTop.Control = CbProviders
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideRight.Control = BtnSaveMapProviders
|
AnchorSideRight.Control = BtnSaveMapProviders
|
||||||
Left = 209
|
Left = 211
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 119
|
Top = 332
|
||||||
Width = 23
|
Width = 23
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
BorderSpacing.Right = 4
|
BorderSpacing.Right = 4
|
||||||
@ -646,12 +646,12 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideRight.Control = PgConfig
|
AnchorSideRight.Control = PgConfig
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 236
|
Left = 238
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 119
|
Top = 332
|
||||||
Width = 23
|
Width = 23
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 6
|
||||||
Glyph.Data = {
|
Glyph.Data = {
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
2000000000000004000064000000640000000000000000000000A4653455A465
|
2000000000000004000064000000640000000000000000000000A4653455A465
|
||||||
@ -696,15 +696,15 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 175
|
Top = 394
|
||||||
Width = 79
|
Width = 79
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 12
|
||||||
Caption = 'Use threads'
|
Caption = 'Use threads'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = CbUseThreadsChange
|
|
||||||
State = cbChecked
|
State = cbChecked
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
OnChange = CbUseThreadsChange
|
||||||
end
|
end
|
||||||
object CbDoubleBuffer: TCheckBox
|
object CbDoubleBuffer: TCheckBox
|
||||||
AnchorSideLeft.Control = CbUseThreads
|
AnchorSideLeft.Control = CbUseThreads
|
||||||
@ -712,15 +712,15 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 200
|
Top = 419
|
||||||
Width = 85
|
Width = 85
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
BorderSpacing.Right = 9
|
BorderSpacing.Right = 9
|
||||||
Caption = 'DblBuffering'
|
Caption = 'DblBuffering'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = CbDoubleBufferChange
|
|
||||||
State = cbChecked
|
State = cbChecked
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
OnChange = CbDoubleBufferChange
|
||||||
end
|
end
|
||||||
object CbDebugTiles: TCheckBox
|
object CbDebugTiles: TCheckBox
|
||||||
AnchorSideLeft.Control = CbDoubleBuffer
|
AnchorSideLeft.Control = CbDoubleBuffer
|
||||||
@ -728,12 +728,12 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 225
|
Top = 444
|
||||||
Width = 77
|
Width = 77
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'Debug tiles'
|
Caption = 'Debug tiles'
|
||||||
OnChange = CbDebugTilesChange
|
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
|
OnChange = CbDebugTilesChange
|
||||||
end
|
end
|
||||||
object CbShowPOIImage: TCheckBox
|
object CbShowPOIImage: TCheckBox
|
||||||
AnchorSideLeft.Control = CbDebugTiles
|
AnchorSideLeft.Control = CbDebugTiles
|
||||||
@ -741,25 +741,25 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 262
|
Top = 481
|
||||||
Width = 105
|
Width = 105
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'Show POI image'
|
Caption = 'Show POI image'
|
||||||
OnChange = CbShowPOIImageChange
|
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
|
OnChange = CbShowPOIImageChange
|
||||||
end
|
end
|
||||||
object BtnPOITextFont: TButton
|
object BtnPOITextFont: TButton
|
||||||
AnchorSideTop.Control = CbShowPOIImage
|
AnchorSideTop.Control = CbShowPOIImage
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 289
|
Top = 508
|
||||||
Width = 93
|
Width = 93
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
Caption = 'POI text font'
|
Caption = 'POI text font'
|
||||||
OnClick = BtnPOITextFontClick
|
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
|
OnClick = BtnPOITextFontClick
|
||||||
end
|
end
|
||||||
object cbPOITextBgColor: TColorBox
|
object cbPOITextBgColor: TColorBox
|
||||||
AnchorSideLeft.Control = LblPOITextBgColor
|
AnchorSideLeft.Control = LblPOITextBgColor
|
||||||
@ -770,15 +770,15 @@ object MainForm: TMainForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 154
|
Left = 154
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 290
|
Top = 509
|
||||||
Width = 107
|
Width = 107
|
||||||
NoneColorColor = clWhite
|
NoneColorColor = clWhite
|
||||||
Style = [cbStandardColors, cbExtendedColors, cbIncludeNone, cbCustomColor, cbPrettyNames, cbCustomColors]
|
Style = [cbStandardColors, cbExtendedColors, cbIncludeNone, cbCustomColor, cbPrettyNames, cbCustomColors]
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
ItemHeight = 16
|
ItemHeight = 16
|
||||||
OnChange = cbPOITextBgColorChange
|
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
|
OnChange = cbPOITextBgColorChange
|
||||||
end
|
end
|
||||||
object LblPOITextBgColor: TLabel
|
object LblPOITextBgColor: TLabel
|
||||||
AnchorSideLeft.Control = BtnPOITextFont
|
AnchorSideLeft.Control = BtnPOITextFont
|
||||||
@ -787,7 +787,7 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 107
|
Left = 107
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 294
|
Top = 513
|
||||||
Width = 39
|
Width = 39
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
Caption = 'Backgr.'
|
Caption = 'Backgr.'
|
||||||
@ -800,7 +800,7 @@ object MainForm: TMainForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 4
|
Height = 4
|
||||||
Top = 252
|
Top = 471
|
||||||
Width = 255
|
Width = 255
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
@ -812,15 +812,15 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 150
|
Top = 363
|
||||||
Width = 100
|
Width = 100
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
Caption = 'Zoom to cursor'
|
Caption = 'Zoom to cursor'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = CbZoomToCursorChange
|
|
||||||
State = cbChecked
|
State = cbChecked
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
|
OnChange = CbZoomToCursorChange
|
||||||
end
|
end
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
AnchorSideLeft.Control = CbDownloadEngine
|
AnchorSideLeft.Control = CbDownloadEngine
|
||||||
@ -828,7 +828,7 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 54
|
Top = 60
|
||||||
Width = 96
|
Width = 96
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
Caption = 'Download engine:'
|
Caption = 'Download engine:'
|
||||||
@ -841,7 +841,7 @@ object MainForm: TMainForm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 71
|
Top = 77
|
||||||
Width = 255
|
Width = 255
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
@ -855,10 +855,10 @@ object MainForm: TMainForm
|
|||||||
'FpHTTPClient'
|
'FpHTTPClient'
|
||||||
'WinInet'
|
'WinInet'
|
||||||
)
|
)
|
||||||
OnChange = CbDownloadEngineChange
|
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 9
|
TabOrder = 9
|
||||||
Text = 'default'
|
Text = 'default'
|
||||||
|
OnChange = CbDownloadEngineChange
|
||||||
end
|
end
|
||||||
object CbCyclic: TCheckBox
|
object CbCyclic: TCheckBox
|
||||||
AnchorSideLeft.Control = CbZoomToCursor
|
AnchorSideLeft.Control = CbZoomToCursor
|
||||||
@ -866,14 +866,14 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Control = CbZoomToCursor
|
AnchorSideTop.Control = CbZoomToCursor
|
||||||
Left = 130
|
Left = 130
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 150
|
Top = 363
|
||||||
Width = 77
|
Width = 77
|
||||||
BorderSpacing.Left = 24
|
BorderSpacing.Left = 24
|
||||||
Caption = 'Cyclic view'
|
Caption = 'Cyclic view'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = CbCyclicChange
|
|
||||||
State = cbChecked
|
State = cbChecked
|
||||||
TabOrder = 10
|
TabOrder = 10
|
||||||
|
OnChange = CbCyclicChange
|
||||||
end
|
end
|
||||||
object CbPreviewTiles: TCheckBox
|
object CbPreviewTiles: TCheckBox
|
||||||
AnchorSideLeft.Control = CbCyclic
|
AnchorSideLeft.Control = CbCyclic
|
||||||
@ -881,13 +881,13 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 130
|
Left = 130
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 175
|
Top = 394
|
||||||
Width = 83
|
Width = 83
|
||||||
Caption = 'Preview tiles'
|
Caption = 'Preview tiles'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = CbPreviewTilesChange
|
|
||||||
State = cbChecked
|
State = cbChecked
|
||||||
TabOrder = 11
|
TabOrder = 11
|
||||||
|
OnChange = CbPreviewTilesChange
|
||||||
end
|
end
|
||||||
object clbBackColor: TColorButton
|
object clbBackColor: TColorButton
|
||||||
AnchorSideLeft.Control = CbPreviewTiles
|
AnchorSideLeft.Control = CbPreviewTiles
|
||||||
@ -895,7 +895,7 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 130
|
Left = 130
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 197
|
Top = 416
|
||||||
Width = 105
|
Width = 105
|
||||||
BorderWidth = 2
|
BorderWidth = 2
|
||||||
ButtonColorAutoSize = False
|
ButtonColorAutoSize = False
|
||||||
@ -905,6 +905,171 @@ object MainForm: TMainForm
|
|||||||
Margin = 4
|
Margin = 4
|
||||||
OnColorChanged = clbBackColorColorChanged
|
OnColorChanged = clbBackColorColorChanged
|
||||||
end
|
end
|
||||||
|
object gbProxy: TGroupBox
|
||||||
|
AnchorSideLeft.Control = PgConfig
|
||||||
|
AnchorSideTop.Control = CbDownloadEngine
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = PgConfig
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 197
|
||||||
|
Top = 110
|
||||||
|
Width = 255
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'Proxy'
|
||||||
|
ClientHeight = 177
|
||||||
|
ClientWidth = 251
|
||||||
|
TabOrder = 12
|
||||||
|
object lblProxyHost: TLabel
|
||||||
|
AnchorSideLeft.Control = rbNoProxy
|
||||||
|
AnchorSideTop.Control = edProxyHost
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 28
|
||||||
|
Height = 15
|
||||||
|
Top = 69
|
||||||
|
Width = 28
|
||||||
|
BorderSpacing.Left = 18
|
||||||
|
Caption = 'Host:'
|
||||||
|
end
|
||||||
|
object edProxyHost: TEdit
|
||||||
|
AnchorSideLeft.Control = edProxyUserName
|
||||||
|
AnchorSideTop.Control = rbProxyData
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = gbProxy
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 95
|
||||||
|
Height = 23
|
||||||
|
Top = 65
|
||||||
|
Width = 148
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Right = 8
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = rbProxyChange
|
||||||
|
end
|
||||||
|
object lblProxyPort: TLabel
|
||||||
|
AnchorSideLeft.Control = lblProxyHost
|
||||||
|
AnchorSideTop.Control = seProxyPort
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 28
|
||||||
|
Height = 15
|
||||||
|
Top = 96
|
||||||
|
Width = 22
|
||||||
|
Caption = 'Port'
|
||||||
|
end
|
||||||
|
object seProxyPort: TSpinEdit
|
||||||
|
AnchorSideLeft.Control = lblProxyUserName
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = edProxyHost
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 95
|
||||||
|
Height = 23
|
||||||
|
Top = 92
|
||||||
|
Width = 104
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
MaxValue = 65535
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = rbProxyChange
|
||||||
|
end
|
||||||
|
object lblProxyUserName: TLabel
|
||||||
|
AnchorSideLeft.Control = lblProxyHost
|
||||||
|
AnchorSideTop.Control = edProxyUserName
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 28
|
||||||
|
Height = 15
|
||||||
|
Top = 123
|
||||||
|
Width = 59
|
||||||
|
BorderSpacing.Right = 8
|
||||||
|
Caption = 'User name:'
|
||||||
|
end
|
||||||
|
object edProxyUserName: TEdit
|
||||||
|
AnchorSideLeft.Control = lblProxyUserName
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = seProxyPort
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = gbProxy
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 95
|
||||||
|
Height = 23
|
||||||
|
Top = 119
|
||||||
|
Width = 148
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
BorderSpacing.Right = 8
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = rbProxyChange
|
||||||
|
end
|
||||||
|
object lblProxyPassword: TLabel
|
||||||
|
AnchorSideLeft.Control = lblProxyHost
|
||||||
|
AnchorSideTop.Control = edProxyPassword
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 28
|
||||||
|
Height = 15
|
||||||
|
Top = 150
|
||||||
|
Width = 50
|
||||||
|
Caption = 'Password'
|
||||||
|
end
|
||||||
|
object edProxyPassword: TEdit
|
||||||
|
AnchorSideLeft.Control = edProxyUserName
|
||||||
|
AnchorSideTop.Control = edProxyUserName
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = gbProxy
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 95
|
||||||
|
Height = 23
|
||||||
|
Top = 146
|
||||||
|
Width = 148
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
BorderSpacing.Right = 8
|
||||||
|
BorderSpacing.Bottom = 8
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = rbProxyChange
|
||||||
|
end
|
||||||
|
object rbNoProxy: TRadioButton
|
||||||
|
AnchorSideLeft.Control = gbProxy
|
||||||
|
AnchorSideTop.Control = gbProxy
|
||||||
|
Left = 10
|
||||||
|
Height = 19
|
||||||
|
Top = 0
|
||||||
|
Width = 67
|
||||||
|
BorderSpacing.Left = 10
|
||||||
|
Caption = 'No proxy'
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = rbProxyChange
|
||||||
|
end
|
||||||
|
object rbSystemProxy: TRadioButton
|
||||||
|
AnchorSideLeft.Control = rbNoProxy
|
||||||
|
AnchorSideTop.Control = rbNoProxy
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 10
|
||||||
|
Height = 19
|
||||||
|
Top = 23
|
||||||
|
Width = 110
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
Caption = 'Use system proxy'
|
||||||
|
Checked = True
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 5
|
||||||
|
TabStop = True
|
||||||
|
OnChange = rbProxyChange
|
||||||
|
end
|
||||||
|
object rbProxyData: TRadioButton
|
||||||
|
AnchorSideLeft.Control = rbNoProxy
|
||||||
|
AnchorSideTop.Control = rbSystemProxy
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 10
|
||||||
|
Height = 19
|
||||||
|
Top = 46
|
||||||
|
Width = 74
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
Caption = 'Proxy data'
|
||||||
|
TabOrder = 6
|
||||||
|
OnChange = rbProxyChange
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object GeoNames: TMVGeoNames
|
object GeoNames: TMVGeoNames
|
||||||
@ -921,7 +1086,7 @@ object MainForm: TMainForm
|
|||||||
object FontDialog: TFontDialog
|
object FontDialog: TFontDialog
|
||||||
MinFontSize = 0
|
MinFontSize = 0
|
||||||
MaxFontSize = 0
|
MaxFontSize = 0
|
||||||
Left = 808
|
Left = 800
|
||||||
Top = 216
|
Top = 472
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Types, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, Types, Forms, Controls, Graphics, Dialogs,
|
||||||
ExtCtrls, StdCtrls, ComCtrls, Buttons, IntfGraphics, ColorBox,
|
ExtCtrls, StdCtrls, ComCtrls, Buttons, IntfGraphics, ColorBox, Spin,
|
||||||
mvGeoNames, mvMapViewer, mvTypes, mvGpsObj, mvDrawingEngine,
|
mvGeoNames, mvMapViewer, mvTypes, mvGpsObj, mvDrawingEngine,
|
||||||
mvDE_RGBGraphics, mvDE_BGRA, mvDLEFPC, mvDLEWin, mvDLESynapse;
|
mvDE_RGBGraphics, mvDE_BGRA, mvDLEFPC, mvDLEWin, mvDLESynapse;
|
||||||
|
|
||||||
@ -27,6 +27,8 @@ type
|
|||||||
CbFoundLocations: TComboBox;
|
CbFoundLocations: TComboBox;
|
||||||
CbLocations: TComboBox;
|
CbLocations: TComboBox;
|
||||||
CbProviders: TComboBox;
|
CbProviders: TComboBox;
|
||||||
|
rbProxyData: TRadioButton;
|
||||||
|
rbSystemProxy: TRadioButton;
|
||||||
CbUseThreads: TCheckBox;
|
CbUseThreads: TCheckBox;
|
||||||
CbMouseCoords: TGroupBox;
|
CbMouseCoords: TGroupBox;
|
||||||
CbDistanceUnits: TComboBox;
|
CbDistanceUnits: TComboBox;
|
||||||
@ -38,8 +40,12 @@ type
|
|||||||
CbCyclic: TCheckBox;
|
CbCyclic: TCheckBox;
|
||||||
CbPreviewTiles: TCheckBox;
|
CbPreviewTiles: TCheckBox;
|
||||||
clbBackColor: TColorButton;
|
clbBackColor: TColorButton;
|
||||||
|
edProxyHost: TEdit;
|
||||||
|
edProxyPassword: TEdit;
|
||||||
|
edProxyUserName: TEdit;
|
||||||
FontDialog: TFontDialog;
|
FontDialog: TFontDialog;
|
||||||
GbCenterCoords: TGroupBox;
|
GbCenterCoords: TGroupBox;
|
||||||
|
gbProxy: TGroupBox;
|
||||||
GbScreenSize: TGroupBox;
|
GbScreenSize: TGroupBox;
|
||||||
GbSearch: TGroupBox;
|
GbSearch: TGroupBox;
|
||||||
GbGPS: TGroupBox;
|
GbGPS: TGroupBox;
|
||||||
@ -52,6 +58,10 @@ type
|
|||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
Label2: TLabel;
|
Label2: TLabel;
|
||||||
LblPOITextBgColor: TLabel;
|
LblPOITextBgColor: TLabel;
|
||||||
|
lblProxyHost: TLabel;
|
||||||
|
lblProxyPassword: TLabel;
|
||||||
|
lblProxyPort: TLabel;
|
||||||
|
lblProxyUserName: TLabel;
|
||||||
LblSelectLocation: TLabel;
|
LblSelectLocation: TLabel;
|
||||||
LblCenterLatitude: TLabel;
|
LblCenterLatitude: TLabel;
|
||||||
LblViewportHeight: TLabel;
|
LblViewportHeight: TLabel;
|
||||||
@ -71,6 +81,8 @@ type
|
|||||||
PageControl: TPageControl;
|
PageControl: TPageControl;
|
||||||
PgData: TTabSheet;
|
PgData: TTabSheet;
|
||||||
PgConfig: TTabSheet;
|
PgConfig: TTabSheet;
|
||||||
|
rbNoProxy: TRadioButton;
|
||||||
|
seProxyPort: TSpinEdit;
|
||||||
ZoomTrackBar: TTrackBar;
|
ZoomTrackBar: TTrackBar;
|
||||||
procedure BtnGoToClick(Sender: TObject);
|
procedure BtnGoToClick(Sender: TObject);
|
||||||
procedure BtnLoadGPXFileClick(Sender: TObject);
|
procedure BtnLoadGPXFileClick(Sender: TObject);
|
||||||
@ -108,6 +120,7 @@ type
|
|||||||
procedure MapViewZoomChange(Sender: TObject);
|
procedure MapViewZoomChange(Sender: TObject);
|
||||||
procedure BtnLoadMapProvidersClick(Sender: TObject);
|
procedure BtnLoadMapProvidersClick(Sender: TObject);
|
||||||
procedure BtnSaveMapProvidersClick(Sender: TObject);
|
procedure BtnSaveMapProvidersClick(Sender: TObject);
|
||||||
|
procedure rbProxyChange(Sender: TObject);
|
||||||
procedure ZoomTrackBarChange(Sender: TObject);
|
procedure ZoomTrackBarChange(Sender: TObject);
|
||||||
|
|
||||||
private
|
private
|
||||||
@ -121,6 +134,7 @@ type
|
|||||||
POIImage: TCustomBitmap;
|
POIImage: TCustomBitmap;
|
||||||
procedure ClearFoundLocations;
|
procedure ClearFoundLocations;
|
||||||
procedure UpdateCoords(X, Y: Integer);
|
procedure UpdateCoords(X, Y: Integer);
|
||||||
|
procedure UpdateDownloadEngineProxy;
|
||||||
procedure UpdateDropdownWidth(ACombobox: TCombobox);
|
procedure UpdateDropdownWidth(ACombobox: TCombobox);
|
||||||
procedure UpdateLocationHistory(ALocation: String);
|
procedure UpdateLocationHistory(ALocation: String);
|
||||||
procedure UpdateViewportSize;
|
procedure UpdateViewportSize;
|
||||||
@ -187,6 +201,11 @@ begin
|
|||||||
MapView.Engine.WriteProvidersToXML(Application.Location + MAP_PROVIDER_FILENAME);
|
MapView.Engine.WriteProvidersToXML(Application.Location + MAP_PROVIDER_FILENAME);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMainForm.rbProxyChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
UpdateDownloadEngineProxy;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMainForm.BtnSearchClick(Sender: TObject);
|
procedure TMainForm.BtnSearchClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ClearFoundLocations;
|
ClearFoundLocations;
|
||||||
@ -291,6 +310,7 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
UpdateDownloadEngineProxy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.CbDrawingEngineChange(Sender: TObject);
|
procedure TMainForm.CbDrawingEngineChange(Sender: TObject);
|
||||||
@ -659,6 +679,19 @@ begin
|
|||||||
List.Free;
|
List.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
i := ini.ReadInteger('Proxy', 'UseProxy', 0);
|
||||||
|
case i of
|
||||||
|
0: rbNoProxy.Checked := true;
|
||||||
|
1: rbSystemProxy.Checked := true;
|
||||||
|
2: rbProxyData.Checked := true;
|
||||||
|
end;
|
||||||
|
edProxyHost.Text := ini.ReadString('Proxy', 'ProxyHost', edProxyHost.Text);
|
||||||
|
seProxyPort.Value := ini.ReadInteger('Proxy', 'ProxyPort', seProxyPort.Value);
|
||||||
|
edProxyUserName.Text := ini.ReadString('Proxy', 'ProxyName', edProxyUserName.Text);
|
||||||
|
edProxyPassword.Text := ini.ReadString('Proxy', 'ProxyPassword', edProxyPassword.Text);
|
||||||
|
|
||||||
|
UpdateDownloadEngineProxy;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
ini.Free;
|
ini.Free;
|
||||||
end;
|
end;
|
||||||
@ -682,6 +715,26 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMainForm.UpdateDownloadEngineProxy;
|
||||||
|
begin
|
||||||
|
if MapView.DownloadEngine.HasProxySupport then
|
||||||
|
begin
|
||||||
|
MapView.DownloadEngine.SetProxy(
|
||||||
|
rbSystemProxy.Checked, rbProxyData.Checked,
|
||||||
|
edProxyHost.Name, seProxyPort.Value, edProxyUserName.Text, edProxyPassword.Text
|
||||||
|
);
|
||||||
|
rbSystemProxy.Enabled := MapView.DownloadEngine.SupportsSystemProxy;
|
||||||
|
lblProxyHost.Enabled := rbProxyData.Checked;
|
||||||
|
edProxyHost.Enabled := rbProxyData.Checked;
|
||||||
|
lblProxyPort.Enabled := rbProxyData.Checked;
|
||||||
|
seProxyPort.Enabled := rbProxyData.Checked;
|
||||||
|
lblProxyUserName.Enabled := rbProxyData.Checked;
|
||||||
|
edProxyUserName.Enabled := rbProxyData.Checked;
|
||||||
|
lblProxyPassword.Enabled := rbProxyData.Checked;
|
||||||
|
edProxyPassword.Enabled := rbProxyData.Checked;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMainForm.UpdateDropdownWidth(ACombobox: TCombobox);
|
procedure TMainForm.UpdateDropdownWidth(ACombobox: TCombobox);
|
||||||
var
|
var
|
||||||
cnv: TControlCanvas;
|
cnv: TControlCanvas;
|
||||||
@ -782,6 +835,16 @@ begin
|
|||||||
for i := 0 to CbLocations.Items.Count-1 do
|
for i := 0 to CbLocations.Items.Count-1 do
|
||||||
ini.WriteString('Locations', 'Item'+IntToStr(i), CbLocations.Items[i]);
|
ini.WriteString('Locations', 'Item'+IntToStr(i), CbLocations.Items[i]);
|
||||||
|
|
||||||
|
ini.EraseSection('Proxy');
|
||||||
|
if rbSystemProxy.Checked then i := 1
|
||||||
|
else if rbProxyData.Checked then i := 2
|
||||||
|
else i := 0;
|
||||||
|
ini.WriteInteger('Proxy', 'UseProxy', i);
|
||||||
|
ini.WriteString('Proxy', 'ProxyHost', edProxyHost.Text);
|
||||||
|
ini.WriteInteger('Proxy', 'ProxyPort', seProxyPort.Value);
|
||||||
|
ini.WriteString('Proxy', 'ProxyName', edProxyUserName.Text);
|
||||||
|
ini.WriteString('Proxy', 'ProxyPassword', edProxyPassword.Text);
|
||||||
|
|
||||||
finally
|
finally
|
||||||
ini.Free;
|
ini.Free;
|
||||||
end;
|
end;
|
||||||
|
@ -31,7 +31,10 @@ type
|
|||||||
FUseProxy: Boolean;
|
FUseProxy: Boolean;
|
||||||
protected
|
protected
|
||||||
procedure InternalDownloadFile(const Url: string; str: TStream); override;
|
procedure InternalDownloadFile(const Url: string; str: TStream); override;
|
||||||
|
public
|
||||||
|
constructor Create(AOwner: TComponent); override;
|
||||||
|
procedure SetProxy(AUseSystemProxy, AUseProxy: Boolean; AProxyHost: String;
|
||||||
|
AProxyPort: Word; AProxyUserName, AProxyPassword: String); override;
|
||||||
published
|
published
|
||||||
property UseProxy: Boolean read FUseProxy write FUseProxy default false;
|
property UseProxy: Boolean read FUseProxy write FUseProxy default false;
|
||||||
property ProxyHost: string read FProxyHost write FProxyHost;
|
property ProxyHost: string read FProxyHost write FProxyHost;
|
||||||
@ -55,6 +58,13 @@ end;
|
|||||||
|
|
||||||
{ TMvDESynapse }
|
{ TMvDESynapse }
|
||||||
|
|
||||||
|
constructor TMvDESynapse.Create(AOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
FProxySupport := true;
|
||||||
|
FSystemProxySupport := false;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMvDESynapse.InternalDownloadFile(const Url: string; str: TStream);
|
procedure TMvDESynapse.InternalDownloadFile(const Url: string; str: TStream);
|
||||||
var
|
var
|
||||||
FHttp: THTTPSend;
|
FHttp: THTTPSend;
|
||||||
@ -99,4 +109,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMvDESynapse.SetProxy(AUseSystemProxy, AUseProxy: Boolean;
|
||||||
|
AProxyHost: String; AProxyPort: Word; AProxyUserName, AProxyPassword: String);
|
||||||
|
begin
|
||||||
|
FUseProxy := AUseProxy;
|
||||||
|
FProxyHost := AProxyHost;
|
||||||
|
FProxyPort := AProxyPort;
|
||||||
|
FProxyUserName := AProxyUserName;
|
||||||
|
FProxyPassword := AProxyPassword;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -40,6 +40,9 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure InternalDownloadFile(const Url: string; AStream: TStream); override;
|
procedure InternalDownloadFile(const Url: string; AStream: TStream); override;
|
||||||
public
|
public
|
||||||
|
constructor Create(AOwner: TComponent); override;
|
||||||
|
procedure SetProxy(AUseSystemProxy, AUseProxy: Boolean; AProxyHost: String;
|
||||||
|
AProxyPort: Word; AProxyUserName, AProxyPassword: String); override;
|
||||||
{$IF FPC_FullVersion >= 30101}
|
{$IF FPC_FullVersion >= 30101}
|
||||||
published
|
published
|
||||||
property UseProxy: Boolean read FUseProxy write FUseProxy default false;
|
property UseProxy: Boolean read FUseProxy write FUseProxy default false;
|
||||||
@ -64,6 +67,15 @@ uses
|
|||||||
|
|
||||||
{ TMVDEFPC }
|
{ TMVDEFPC }
|
||||||
|
|
||||||
|
constructor TMvDEFpc.Create(AOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
{$IF FPC_FullVersion >= 30200}
|
||||||
|
FProxySupport := true;
|
||||||
|
{$IFEND}
|
||||||
|
FSystemProxySupport := false;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMVDEFPC.InternalDownloadFile(const Url: string; AStream: TStream);
|
procedure TMVDEFPC.InternalDownloadFile(const Url: string; AStream: TStream);
|
||||||
var
|
var
|
||||||
http: TFpHttpClient;
|
http: TFpHttpClient;
|
||||||
@ -98,4 +110,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMvDEFPC.SetProxy(AUseSystemProxy, AUseProxy: Boolean; AProxyHost: String;
|
||||||
|
AProxyPort: Word; AProxyUserName, AProxyPassword: String);
|
||||||
|
begin
|
||||||
|
{$IF FPC_FullVersion >= 30101}
|
||||||
|
FUseProxy := AUseProxy;
|
||||||
|
FProxyHost := AProxyHost;
|
||||||
|
FProxyPort := AProxyPort;
|
||||||
|
FProxyUserName := AProxyUserName;
|
||||||
|
FProxyPassword := AProxyPassword;
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -22,8 +22,25 @@ uses
|
|||||||
|
|
||||||
type
|
type
|
||||||
TMVDEWin = class(TMvCustomDownloadEngine)
|
TMVDEWin = class(TMvCustomDownloadEngine)
|
||||||
|
private
|
||||||
|
FUseSystemProxy: Boolean;
|
||||||
|
FUseProxy: Boolean;
|
||||||
|
FProxyHost: string;
|
||||||
|
FProxyPort: Word;
|
||||||
|
FProxyUserName: String;
|
||||||
|
FProxyPassWord: String;
|
||||||
protected
|
protected
|
||||||
procedure InternalDownloadFile(const Url: string; AStream: TStream); override;
|
procedure InternalDownloadFile(const Url: string; AStream: TStream); override;
|
||||||
|
public
|
||||||
|
constructor Create(AOwner: TComponent); override;
|
||||||
|
procedure SetProxy(AUseSystemProxy, AUseProxy: Boolean; AProxyHost: String;
|
||||||
|
AProxyPort: Word; AProxyUserName, AProxyPassword: String); override;
|
||||||
|
property UseProxy: Boolean read FUseProxy write FUseProxy default false;
|
||||||
|
property UseSystemProxy: Boolean read FUseSystemProxy write FUseSystemproxy default true;
|
||||||
|
property ProxyHost: String read FProxyHost write FProxyHost;
|
||||||
|
property ProxyPort: Word read FProxyPort write FProxyPort;
|
||||||
|
property ProxyUsername: String read FProxyUserName write FProxyUserName;
|
||||||
|
property ProxyPassword: String read FProxyPassword write FProxyPassword;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -31,10 +48,17 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$IFDEF MSWindows}
|
{$IFDEF MSWindows}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
windows, wininet;
|
windows, wininet;
|
||||||
|
|
||||||
|
constructor TMVDEWin.Create(AOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
FProxySupport := true;
|
||||||
|
FSystemProxySupport := true;
|
||||||
|
FUseSystemProxy := true;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMVDEWin.InternalDownloadFile(const Url: string; AStream: TStream);
|
procedure TMVDEWin.InternalDownloadFile(const Url: string; AStream: TStream);
|
||||||
const
|
const
|
||||||
KB = 1024;
|
KB = 1024;
|
||||||
@ -43,15 +67,47 @@ var
|
|||||||
urlHandle: HInternet;
|
urlHandle: HInternet;
|
||||||
buffer: array[0..4*KB-1] of Char;
|
buffer: array[0..4*KB-1] of Char;
|
||||||
bytesRead: dWord = 0;
|
bytesRead: dWord = 0;
|
||||||
errCode: Integer = 0;
|
|
||||||
header: String;
|
header: String;
|
||||||
|
accessType: Integer;
|
||||||
|
proxy: String = '';
|
||||||
|
username: WideString = '';
|
||||||
|
pwd: WideString = '';
|
||||||
begin
|
begin
|
||||||
NetHandle := InternetOpen('Mozilla/5.0(compatible; WinInet)', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
|
if FUseSystemProxy then
|
||||||
|
accessType := INTERNET_OPEN_TYPE_PRECONFIG
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
accessType := INTERNET_OPEN_TYPE_DIRECT;
|
||||||
|
if FUseProxy then
|
||||||
|
begin
|
||||||
|
if FProxyPort <> 0 then
|
||||||
|
proxy := Format('%s:%d', [FProxyHost, FProxyPort])
|
||||||
|
else
|
||||||
|
proxy := FProxyHost;
|
||||||
|
if proxy <> '' then
|
||||||
|
accessType := INTERNET_OPEN_TYPE_PROXY;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
netHandle := InternetOpen('Mozilla/5.0(compatible; WinInet)', accessType, PChar(proxy), nil, 0);
|
||||||
|
|
||||||
// NetHandle valid?
|
// NetHandle valid?
|
||||||
if netHandle = nil then
|
if netHandle = nil then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
if FUseProxy then
|
||||||
|
begin
|
||||||
|
if FProxyUsername <> '' then
|
||||||
|
begin
|
||||||
|
userName := WideString(FProxyUsername);
|
||||||
|
InternetSetOptionW(netHandle, INTERNET_OPTION_PROXY_USERNAME, PWideChar(userName), Length(userName));
|
||||||
|
end;
|
||||||
|
if FProxyPassword <> '' then
|
||||||
|
begin
|
||||||
|
pwd := WideString(FProxyPassword);
|
||||||
|
InternetSetOptionW(netHandle, INTERNET_OPTION_PROXY_PASSWORD, PWideChar(pwd), Length(pwd));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
try
|
try
|
||||||
header := '';
|
header := '';
|
||||||
urlHandle := InternetOpenUrl(netHandle, PChar(URL), PChar(header), Length(header), INTERNET_FLAG_RELOAD, 0);
|
urlHandle := InternetOpenUrl(netHandle, PChar(URL), PChar(header), Length(header), INTERNET_FLAG_RELOAD, 0);
|
||||||
@ -75,6 +131,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMvDEWin.SetProxy(AUseSystemProxy, AUseProxy: Boolean; AProxyHost: String;
|
||||||
|
AProxyPort: Word; AProxyUserName, AProxyPassword: String);
|
||||||
|
begin
|
||||||
|
FUseSystemProxy := AUseSystemProxy;
|
||||||
|
FUseProxy := AUseProxy;
|
||||||
|
FProxyHost := AProxyHost;
|
||||||
|
FProxyPort := AProxyPort;
|
||||||
|
FProxyUserName := AProxyUserName;
|
||||||
|
FProxyPassword := AProxyPassword;
|
||||||
|
end;
|
||||||
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -24,10 +24,16 @@ type
|
|||||||
|
|
||||||
TMvCustomDownloadEngine = class(TComponent)
|
TMvCustomDownloadEngine = class(TComponent)
|
||||||
protected
|
protected
|
||||||
|
FProxySupport: Boolean;
|
||||||
|
FSystemProxySupport: Boolean;
|
||||||
procedure InternalDownloadFile(const Url: String; AStream: TStream); virtual; abstract;
|
procedure InternalDownloadFile(const Url: String; AStream: TStream); virtual; abstract;
|
||||||
procedure LoadFromLocalFile(const AFileName: String; AStream: TStream);
|
procedure LoadFromLocalFile(const AFileName: String; AStream: TStream);
|
||||||
public
|
public
|
||||||
procedure DownloadFile(const Url: string; AStream: TStream); virtual;
|
procedure DownloadFile(const Url: string; AStream: TStream); virtual;
|
||||||
|
procedure SetProxy(AUseSystemProxy, AUseProxy: Boolean; AProxyHost: String;
|
||||||
|
AProxyPort: Word; AProxyUserName, AProxyPassword: String); virtual; abstract;
|
||||||
|
property HasProxySupport: Boolean read FProxySupport;
|
||||||
|
property SupportsSystemProxy: Boolean read FSystemProxySupport;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user