Windream: add basepath

This commit is contained in:
Jonathan Jenne 2019-08-29 15:48:54 +02:00
parent 64a195018a
commit dd0f99ebda
9 changed files with 2489 additions and 2449 deletions

View File

@ -46,6 +46,7 @@ Partial Class frmLookupGrid
' '
Me.viewLookup.GridControl = Me.gridLookup Me.viewLookup.GridControl = Me.gridLookup
Me.viewLookup.Name = "viewLookup" Me.viewLookup.Name = "viewLookup"
Me.viewLookup.OptionsView.ShowGroupPanel = False
' '
'Panel1 'Panel1
' '

View File

@ -8,7 +8,7 @@ Public Class Form1
Dim MyLogger As LogConfig Dim MyLogger As LogConfig
Dim Logger As Logger Dim Logger As Logger
Protected _windream2 As Windream2 Protected _windream2 As Windream
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim serverName As String = TextBox1.Text Dim serverName As String = TextBox1.Text

View File

@ -7,12 +7,15 @@ Public Class ConnectionBuilder
Private ReadOnly LogConfig As LogConfig Private ReadOnly LogConfig As LogConfig
Private SessionReconnect As Boolean = False Private SessionReconnect As Boolean = False
Private DriveLetter As String = "W" Private DriveLetter As String = "W"
Private BasePath As String = BASE_PATH
Private Support64Bit As Boolean = False Private Support64Bit As Boolean = False
Private ServerName As String = Nothing Private ServerName As String = Nothing
Private UserName As String = Nothing Private UserName As String = Nothing
Private Password As String = Nothing Private Password As String = Nothing
Private Domain As String = Nothing Private Domain As String = Nothing
Private Const BASE_PATH As String = "\\windream\objects"
Public Sub New(LogConfig As LogConfig) Public Sub New(LogConfig As LogConfig)
Me.LogConfig = LogConfig Me.LogConfig = LogConfig
End Sub End Sub
@ -33,9 +36,32 @@ Public Class ConnectionBuilder
''' <returns>A IConnectionBuilder instance to allow for chaining</returns> ''' <returns>A IConnectionBuilder instance to allow for chaining</returns>
Public Function WithDriveLetter(driveLetter As String) As IConnectionBuilder Implements IConnectionBuilder.WithDriveLetter Public Function WithDriveLetter(driveLetter As String) As IConnectionBuilder Implements IConnectionBuilder.WithDriveLetter
Me.DriveLetter = driveLetter Me.DriveLetter = driveLetter
BasePath = String.Empty
Return Me Return Me
End Function End Function
''' <summary>
''' Sets the drive letter to String.Empty, use \\windream\objects as Windream base path
''' </summary>
''' <param name="BasePath">The windream base path, eg. \\windream\objects</param>
''' <returns>A IConnectionBuilder instance to allow for chaining</returns>
Public Function WithWindreamObjects(BasePath As String) As IConnectionBuilder Implements IConnectionBuilder.WithWindreamObjects
BasePath = BasePath
DriveLetter = String.Empty
Return Me
End Function
''' <summary>
''' Sets the drive letter to String.Empty, use \\windream\objects as Windream base path
''' </summary>
''' <returns>A IConnectionBuilder instance to allow for chaining</returns>
Public Function WithWindreamObjects() As IConnectionBuilder Implements IConnectionBuilder.WithWindreamObjects
BasePath = BASE_PATH
DriveLetter = String.Empty
Return Me
End Function
''' <summary> ''' <summary>
''' Sets flag in Windream class to indicate 64-bit support ''' Sets flag in Windream class to indicate 64-bit support
''' </summary> ''' </summary>
@ -74,8 +100,8 @@ Public Class ConnectionBuilder
''' </summary> ''' </summary>
''' <exception cref="Exceptions.SessionException">If there was an error while establishing the connection</exception> ''' <exception cref="Exceptions.SessionException">If there was an error while establishing the connection</exception>
''' <returns>A Windream Object</returns> ''' <returns>A Windream Object</returns>
Public Function Connect() As Windream2 Implements IConnectionBuilder.Connect Public Function Connect() As Windream Implements IConnectionBuilder.Connect
Return New Windream2(LogConfig, SessionReconnect, DriveLetter, Support64Bit, ServerName, UserName, Password, Domain) Return New Windream(LogConfig, SessionReconnect, DriveLetter, BasePath, Support64Bit, ServerName, UserName, Password, Domain)
End Function End Function
End Class End Class

View File

@ -55,5 +55,6 @@
' COM Events ' COM Events
Public Const COM_EVENT_SESSION_NEED_INDEX = 1 Public Const COM_EVENT_SESSION_NEED_INDEX = 1
' Regexes
Public Const REGEX_CLEAN_FILENAME As String = "[?*^""<>|]"
End Class End Class

View File

@ -1,8 +1,10 @@
Public Interface IConnectionBuilder Public Interface IConnectionBuilder
Function WithSessionReconnect() As IConnectionBuilder Function WithSessionReconnect() As IConnectionBuilder
Function WithDriveLetter(driveLetter As String) As IConnectionBuilder Function WithDriveLetter(driveLetter As String) As IConnectionBuilder
Function WithWindreamObjects() As IConnectionBuilder
Function WithWindreamObjects(BasePath As String) As IConnectionBuilder
Function With64BitSupport() As IConnectionBuilder Function With64BitSupport() As IConnectionBuilder
Function WithServerName(serverName As String) As IConnectionBuilder Function WithServerName(serverName As String) As IConnectionBuilder
Function WithImpersonation(userName As String, password As String, domain As String) As IConnectionBuilder Function WithImpersonation(userName As String, password As String, domain As String) As IConnectionBuilder
Function Connect() As Windream2 Function Connect() As Windream
End Interface End Interface

File diff suppressed because it is too large Load Diff

View File

@ -112,8 +112,8 @@
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
<Compile Include="Windream_alt.vb" />
<Compile Include="Windream.vb" /> <Compile Include="Windream.vb" />
<Compile Include="Windream2.vb" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx"> <EmbeddedResource Include="My Project\Resources.resx">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff