gambas-source-code/app/examples/Networking/HTTPGet/.src/FConfig.class

76 lines
1.6 KiB
Text
Raw Normal View History

' Gambas class file
2019-05-17 09:04:14 +02:00
Public Sub ChkProxy_Click()
2019-05-17 09:04:14 +02:00
If ChkProxy.Value = True Then
TxtProxy.Enabled = True
LblAuth.Enabled = True
LblProxyUser.Enabled = True
TxtProxyUser.Enabled = True
LblProxyPassword.Enabled = True
TxtProxyPassword.Enabled = True
CmbProxyAuth.Enabled = True
Else
TxtProxy.Enabled = False
LblAuth.Enabled = False
LblProxyUser.Enabled = False
TxtProxyUser.Enabled = False
LblProxyPassword.Enabled = False
TxtProxyPassword.Enabled = False
CmbProxyAuth.Enabled = False
End If
2019-05-17 09:04:14 +02:00
End
2019-05-17 09:04:14 +02:00
Public Sub Form_Open()
TxtCookies.Text = ClsParams.CookiesFile
ChkUpdate.Value = ClsParams.UpdateCookies
ChkProxy.Value = ClsParams.UseProxy
TxtProxy.Text = ClsParams.ProxyHost
TxtProxyUser.Text = ClsParams.ProxyUser
TxtProxyPassword.Text = ClsParams.ProxyPwd
2019-05-17 09:04:14 +02:00
Select Case ClsParams.ProxyAuth
Case Net.AuthBasic
CmbProxyAuth.Index = 0
2019-05-17 09:04:14 +02:00
Case Net.AuthNTLM
CmbProxyAuth.Index = 1
2019-05-17 09:04:14 +02:00
End Select
2019-05-17 09:04:14 +02:00
End
2019-05-17 09:04:14 +02:00
Public Sub Form_Close()
ClsParams.CookiesFile = TxtCookies.Text
ClsParams.UpdateCookies = ChkUpdate.Value
ClsParams.UseProxy = ChkProxy.Value
ClsParams.ProxyHost = TxtProxy.Text
ClsParams.ProxyUser = TxtProxyUser.Text
ClsParams.ProxyPwd = TxtProxyPassword.Text
2019-05-17 09:04:14 +02:00
If ClsParams.ProxyUser = "" And ClsParams.ProxyPwd = "" Then
ClsParams.ProxyAuth = Net.AuthNone
2019-05-17 09:04:14 +02:00
Else
Select Case CmbProxyAuth.Index
Case 0
ClsParams.ProxyAuth = Net.AuthBasic
2019-05-17 09:04:14 +02:00
Case 1
ClsParams.ProxyAuth = Net.AuthNTLM
2019-05-17 09:04:14 +02:00
End Select
End If
End
2019-05-17 09:04:14 +02:00
Public Sub Button1_Click()
2019-05-17 09:04:14 +02:00
Me.Close
2019-05-17 09:04:14 +02:00
End