jj: Update TesTGUI & EDM Designer
This commit is contained in:
@@ -4,19 +4,18 @@ Imports System.ComponentModel
|
||||
|
||||
Public Class Form1
|
||||
Dim MyLogger As LogConfig
|
||||
Shared Logger As NLog.Logger
|
||||
Dim Logger As Logger
|
||||
|
||||
Protected _windream As Windream
|
||||
Protected _windream2 As Windream2
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Dim serverName As String = TextBox1.Text
|
||||
|
||||
' Windream.vb
|
||||
'_windream = New Windream("W", True, False)
|
||||
'_windream2 = New Windream("W", True, False)
|
||||
|
||||
' Windream2.vb
|
||||
Try
|
||||
_windream2 = New ConnectionBuilder(MyLogger.LogFactory).
|
||||
_windream2 = New ConnectionBuilder(MyLogger).
|
||||
WithDriveLetter("W").
|
||||
WithSessionReconnect().
|
||||
With64BitSupport().
|
||||
@@ -40,7 +39,7 @@ Public Class Form1
|
||||
|
||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
MyLogger = New LogConfig(LogConfig.PathType.CurrentDirectory, Nothing, "MAIN")
|
||||
Logger = MyLogger.LogFactory.GetCurrentClassLogger()
|
||||
Logger = MyLogger.GetLogger()
|
||||
|
||||
Dim MySecondLogger = New LogConfig(LogConfig.PathType.CurrentDirectory, Nothing, "MAIN2")
|
||||
Dim SecondLogger = MySecondLogger.LogFactory.GetCurrentClassLogger()
|
||||
@@ -56,42 +55,43 @@ Public Class Form1
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles GetValue.Click
|
||||
My.Settings.Save()
|
||||
If IsNothing(_windream) Then
|
||||
If IsNothing(_windream2) Then
|
||||
MsgBox("windream initialisieren")
|
||||
Exit Sub
|
||||
End If
|
||||
Dim result As DataTable = _windream.GetValueforIndex(txtWMFile.Text, txtWMIndex.Text)
|
||||
If result.Rows.Count = 0 Then
|
||||
Dim result As List(Of String) = _windream2.GetIndexValue(txtWMFile.Text, txtWMIndex.Text)
|
||||
If result.Count = 0 Then
|
||||
MsgBox("No result")
|
||||
Else
|
||||
txtWMValue.Text = result.Rows(0).Item(0).ToString
|
||||
txtWMValue.Text = result.Item(0).ToString
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub IndexFile_Click(sender As Object, e As EventArgs) Handles IndexFile.Click
|
||||
My.Settings.Save()
|
||||
If IsNothing(_windream) Then
|
||||
If IsNothing(_windream2) Then
|
||||
MsgBox("windream initialisieren")
|
||||
Exit Sub
|
||||
End If
|
||||
Dim arrValue() As String = Nothing
|
||||
ReDim Preserve arrValue(0)
|
||||
arrValue(0) = txtWMValue.Text
|
||||
If _windream.NewIndexFile(txtWMFile.Text, txtWMIndex.Text, arrValue) = True Then
|
||||
MsgBox("Success")
|
||||
Else
|
||||
MsgBox("no indexing")
|
||||
End If
|
||||
'If _windream2.NewIndexFile(txtWMFile.Text, txtWMIndex.Text, arrValue) = True Then
|
||||
' MsgBox("Success")
|
||||
'Else
|
||||
' MsgBox("no indexing")
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
My.Settings.Save()
|
||||
If IsNothing(_windream) Then
|
||||
If IsNothing(_windream2) Then
|
||||
MsgBox("windream initialisieren")
|
||||
Exit Sub
|
||||
End If
|
||||
Dim DTResults As DataTable = _windream.GetSearchDocuments(txtwmsearch.Text, "Dokument-ID")
|
||||
|
||||
Dim DTResults As DataTable = _windream2.GetSearchDocuments(txtwmsearch.Text, "Dokument-ID")
|
||||
If DTResults.Rows.Count > 0 Then
|
||||
GridControl1.DataSource = DTResults
|
||||
Else
|
||||
@@ -103,13 +103,13 @@ Public Class Form1
|
||||
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
|
||||
Dim items As New List(Of String)
|
||||
|
||||
items = _windream.GetChoicelistItems(ComboBox1.Text)
|
||||
items = _windream2.GetChoiceListItems(ComboBox1.Text)
|
||||
|
||||
MsgBox("choicelist items:" & vbNewLine & (String.Join(vbNewLine, items.ToArray)))
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox1_Click(sender As Object, e As EventArgs) Handles ComboBox1.Click
|
||||
Dim lists = _windream.GetChoiceLists()
|
||||
Dim lists = _windream2.GetChoiceLists()
|
||||
|
||||
ComboBox1.Items.Clear()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user