gambas-source-code/app/examples/Networking/WebBrowser/.src/FOption.class
Benoît Minisini c6a9cd69c2 [EXAMPLES]
* NEW: Add examples again. I hope correctly this time.


git-svn-id: svn://localhost/gambas/trunk@6726 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-12-12 19:58:52 +00:00

67 lines
1.1 KiB
Text

' Gambas class file
Static Public Type As Integer
Static Public Host As String
Static Public Port As Integer
Static Public User As String
Static Public Password As String
Public Sub Run() As Boolean
Return Not Me.ShowModal()
End
Public Sub btnOK_Click()
Select Case cmbType.Index
Case 0
Type = WebSettings.NoProxy
Case 1
Type = WebSettings.HttpProxy
Case 2
Type = WebSettings.Socks5Proxy
End Select
Host = Trim(txtHost.Text)
Port = txtPort.Value
User = Trim(txtUser.Text)
Password = txtPassword.Text
Me.Close(True)
End
Public Sub btnCancel_Click()
Me.Close
End
Public Sub cmbType_Click()
txtHost.Enabled = cmbType.Index > 0
txtPassword.Enabled = cmbType.Index > 0
txtPort.Enabled = cmbType.Index > 0
txtUser.Enabled = cmbType.Index > 0
End
Public Sub Form_Open()
Select Type
Case WebSettings.NoProxy
cmbType.Index = 0
Case WebSettings.HttpProxy
cmbType.Index = 1
Case WebSettings.Socks5Proxy
cmbType.Index = 2
End Select
txtHost.Text = Host
txtPort.Value = Port
txtUser.Text = User
txtPassword.Text = Password
End