Ege,
Not sure how much detail you are looking for but here is how I implemented a similar type 'Test' link in my FTP Export Activity;
Add a 'User Control' to the project that contains a link label control;

Then modify the new User Control to inherit the EditPanelControlBase and override some of the default methods;
Imports System.ComponentModel
Imports System.Windows.Forms
Imports System.Net
Imports Laserfiche.Connection
Imports Laserfiche.Custom.Activities
Imports Laserfiche.UI
Imports Laserfiche.UI.EditPanel
Imports Laserfiche.Workflow.ComponentModel
Public Class DestinationControl
Inherits EditPanelControlBase
Private Updating As Boolean = False
#Region "Default Method Overrides"
Protected Overrides Sub OnValueChanged(e As Laserfiche.ComponentModel.PropertyValueChangedEventArgs)
MyBase.OnValueChanged(e)
Me.UpdatePropertyPane()
End Sub
Protected Overrides Sub OnContextChanged()
MyBase.OnContextChanged()
Me.UpdatePropertyPane()
End Sub
Public Overrides Sub Save()
'Deserialize the property value into a usable object...
Dim request As FtpDestination = ObjectSerializer.Deserialize(Of FtpDestination)(Me.Value)
request.FtpFolder = Me.uiFolderTextBox.Text
request.Filename = Me.uiFilenameTextBox.Value
Me.Value = ObjectSerializer.Serialize(request)
Me.UpdatePropertyPane()
End Sub
#End Region
#Region "Helpers"
Protected Sub UpdatePropertyPane()
Try
Me.Updating = True
'Deserialize the property value into a usable object...
Dim request As FtpDestination = ObjectSerializer.Deserialize(Of FtpDestination)(Me.Value)
Me.uiFolderTextBox.Text = request.FtpFolder
Me.uiFilenameTextBox.Context = Me.Context
Me.uiFilenameTextBox.ShowTokenButton = True
Me.uiFilenameTextBox.Value = request.Filename
Me.Updating = False
request = Nothing
Catch ex As Exception
LfMessageBox.Show(ex.Message, "Error", LfMessageBoxConfiguration.OK)
End Try
End Sub
Private Sub TestConnection()
Try
'If the FTP service is not configured then show error dialog...
If String.IsNullOrEmpty(Me.SelectedService.Name) Then
LfMessageBox.Show("There is no FTP service selected and configured.", "Error", LfMessageBoxConfiguration.OK)
Else
Dim service As FtpService = Me.SelectedService
Dim hostURI As New Uri(FixURI(service.Host, service.Port, Me.uiFolderTextBox.Text))
Dim request = DirectCast(WebRequest.Create(hostURI), FtpWebRequest)
request.Method = WebRequestMethods.Ftp.ListDirectory
request.Timeout = service.Timeout
request.EnableSsl = service.UseSSL
request.UsePassive = service.PassiveMode
request.KeepAlive = False
request.UseBinary = True
If SelectedService.AuthenticationMode = FtpService.FtpAuthenticationMode.Credentials Then
request.Credentials = New System.Net.NetworkCredential(service.UserName, service.Password)
End If
'Set callback routine if we can allow for insecure certificates...
If SelectedService.AllowInsecureCertifications Then
CertificateValidation.SelectedService = service
ServicePointManager.ServerCertificateValidationCallback = AddressOf CertificateValidation.AcceptAllCertifications
Else
ServicePointManager.ServerCertificateValidationCallback = Nothing
End If
Try
Using response As FtpWebResponse = DirectCast(request.GetResponse(), FtpWebResponse)
LfMessageBox.Show("Folder '" & hostURI.ToString & "' can be accessed", "Success", LfMessageBoxConfiguration.OK)
response.Close()
End Using
Catch ex As WebException
Using response As FtpWebResponse = DirectCast(ex.Response, FtpWebResponse)
LfMessageBox.Show("Unable to access folder '" & hostURI.ToString & "'. " & response.StatusDescription, "Failed", LfMessageBoxConfiguration.OK)
response.Close()
End Using
Finally
'Make sure we set the servicepointmanager back to its default certificate setting...
ServicePointManager.ServerCertificateValidationCallback = Nothing
End Try
request = Nothing
service = Nothing
End If
Catch ex As Exception
LfMessageBox.Show(ex.Message, "Error", LfMessageBoxConfiguration.OK)
End Try
End Sub
Private Function FixURI(ByVal host As String, ByVal port As Integer, ByVal folder As String) As String
Dim returnURI As String
If host.EndsWith("/") Then
returnURI = host.Substring(0, host.Length - 1) & ":" & port.ToString & "/"
Else
returnURI = host & ":" & port.ToString & "/"
End If
If folder.StartsWith("/") Then folder = folder.Substring(1, folder.Length - 1)
returnURI &= folder
Return returnURI
End Function
#End Region
#Region "Control Events"
Private Sub uiTestLink_LinkClicked(sender As System.Object, e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles uiTestLink.LinkClicked
Me.TestConnection()
End Sub
Private Sub TextBox_ValueChanged(sender As Object, e As Laserfiche.ComponentModel.PropertyValueChangedEventArgs) Handles uiFilenameTextBox.ValueChanged
If Not Me.Updating Then
Me.Save()
End If
End Sub
Private Sub uiFolderTextBox_TextChanged(sender As Object, e As System.EventArgs) Handles uiFolderTextBox.TextChanged
If Not Me.Updating Then
Me.Save()
End If
End Sub
#End Region
#Region "Properties"
<Browsable(False), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)>
Protected ReadOnly Property SelectedService As FtpService
Get
Dim service As FtpService = New FtpService
Dim context As ITypeDescriptorContext = Me.Context
Dim xml As String = DirectCast(context.Instance, FtpExport.FtpExport.FtpExportActivityProxy).Services
Dim services As FtpServices = ObjectSerializer.Deserialize(Of FtpServices)(xml)
service = services.Item(services.SelectedService)
Return service
End Get
End Property
#End Region
Private Sub uiExploreButton_Click(sender As System.Object, e As System.EventArgs) Handles uiExploreButton.Click
'If the FTP service is not configured then show error dialog...
If String.IsNullOrEmpty(Me.SelectedService.Name) Then
LfMessageBox.Show("There is no FTP service selected and configured.", "Error", LfMessageBoxConfiguration.OK)
Else
Dim service As FtpService = Me.SelectedService
Dim folderPath As String = FixURI(service.Host, service.Port, Me.uiFolderTextBox.Text)
Using dialog As FtpBrowserDialog = New FtpBrowserDialog
dialog.Service = service
dialog.SelectedFolder = folderPath
dialog.ShowDialog()
If dialog.DialogResult = DialogResult.OK Then
Me.uiFolderTextBox.Text = dialog.SelectedFolder
End If
End Using
End If
End Sub
End Class
Next, add the new User Control as a property of your custom activity (Note: I usually set the object type to 'Object' so that when I run the Activity Proxy Generator I can select the proper edit control)
Private _destination As Object = String.Empty
Public Property Destination As Object
Get
Return _destination
End Get
Set(value As Object)
_destination = value
End Set
End Property
Finally when you run the Activity Proxy Generator select the new edit control for the property;

Here is what the proxy code should look like;
'''<summary>
'''Gets or sets the Destination property.
'''</summary>
<DisplayNameAttribute("FTP Destination"), _
SortIndexAttribute(14), _
CustomEditControlAttribute(GetType(DestinationControl))> _
Public Property Destination() As Object
Get
Return Me._Destination
End Get
Set(value As Object)
If (Object.Equals(Me._Destination, value) = False) Then
Dim old As Object = Me._Destination
Me._Destination = value
Me.OnPropertyChanged(DestinationPropertyName, old, value)
End If
End Set
End Property
I know this is a lot of code and I am sure you can pare it down if you don't need all of the functionality. Let me know if you need anything else.