WIP: first pass of depending controls
This commit is contained in:
parent
ee404100a4
commit
acf61c9ca5
@ -1,10 +1,15 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports Oracle.ManagedDataAccess.Client
|
||||
Imports DigitalData.Controls.LookupGrid
|
||||
|
||||
Public Class ClassControls
|
||||
Private Property Form As frmIndex
|
||||
Private Property Panel As Panel
|
||||
|
||||
Public Class ControlMeta
|
||||
Public Property IndexName As String
|
||||
End Class
|
||||
|
||||
Public Sub New(Panel As Panel, Form As frmIndex)
|
||||
Me.Form = Form
|
||||
Me.Panel = Panel
|
||||
@ -17,6 +22,9 @@ Public Class ClassControls
|
||||
chk.Name = "chk" & indexname
|
||||
chk.Size = New Size(100, 27)
|
||||
chk.Location = New Point(11, y)
|
||||
chk.Tag = New ControlMeta() With {
|
||||
.IndexName = indexname
|
||||
}
|
||||
|
||||
If caption <> "" Then
|
||||
chk.Text = caption
|
||||
@ -33,6 +41,8 @@ Public Class ClassControls
|
||||
chk.Checked = value
|
||||
End If
|
||||
|
||||
AddHandler chk.CheckedChanged, AddressOf Checkbox_CheckedChanged
|
||||
|
||||
Return chk
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unhandled Exception in AddCheckBox: " & ex.Message, True)
|
||||
@ -40,91 +50,43 @@ Public Class ClassControls
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Sub Checkbox_CheckedChanged(sender As CheckBox, e As EventArgs)
|
||||
PrepareDependingControl(sender)
|
||||
End Sub
|
||||
|
||||
Public Function AddVorschlag_ComboBox(indexname As String, y As Integer, conid As Integer, sql_Vorschlag As String, Multiselect As Boolean, Optional Vorgabe As String = "", Optional AddNewValues As Boolean = False, Optional PreventDuplicateValues As Boolean = False) As Control
|
||||
Try
|
||||
Dim connectionString As String
|
||||
Dim sqlCnn As SqlConnection
|
||||
Dim sqlCmd As SqlCommand
|
||||
Dim adapter As New SqlDataAdapter
|
||||
Dim oSql As String = sql_Vorschlag
|
||||
Dim oConnectionString As String
|
||||
Dim oControl As New DigitalData.Controls.LookupGrid.LookupControl2 With {
|
||||
.MultiSelect = Multiselect,
|
||||
.AllowAddNewValues = AddNewValues,
|
||||
.PreventDuplicates = PreventDuplicateValues,
|
||||
.Location = New Point(11, y),
|
||||
.Size = New Size(300, 27),
|
||||
.Name = "cmbMulti" & indexname,
|
||||
.Tag = New ControlMeta() With {
|
||||
.IndexName = indexname
|
||||
}
|
||||
}
|
||||
|
||||
Dim oracleConn As OracleConnection
|
||||
Dim oracleCmd As OracleCommand
|
||||
Dim oracleadapter As New OracleDataAdapter
|
||||
AddHandler oControl.
|
||||
|
||||
Dim NewDataset As New DataSet
|
||||
Dim i As Integer
|
||||
Dim sql As String
|
||||
Dim runinLZ As Boolean = False
|
||||
|
||||
connectionString = ClassFormFunctions.GetConnectionString(conid)
|
||||
If connectionString Is Nothing = False Then
|
||||
'SQL Befehl füllt die Auswahlliste
|
||||
sql = sql_Vorschlag
|
||||
If Not sql.Contains("@") Then
|
||||
If connectionString.Contains("Initial Catalog=") Then
|
||||
sqlCnn = New SqlConnection(connectionString)
|
||||
sqlCnn.Open()
|
||||
sqlCmd = New SqlCommand(sql, sqlCnn)
|
||||
adapter.SelectCommand = sqlCmd
|
||||
adapter.Fill(NewDataset)
|
||||
ElseIf connectionString.StartsWith("Data Source=") And connectionString.Contains("SERVICE_NAME") Then
|
||||
|
||||
oracleConn = New OracleConnection(connectionString)
|
||||
' Try
|
||||
oracleConn.Open()
|
||||
oracleCmd = New OracleCommand(sql_Vorschlag, oracleConn)
|
||||
oracleadapter.SelectCommand = oracleCmd
|
||||
oracleadapter.Fill(NewDataset)
|
||||
End If
|
||||
oConnectionString = ClassFormFunctions.GetConnectionString(conid)
|
||||
If oConnectionString IsNot Nothing Then
|
||||
If ClassPatterns.HasComplexPatterns(oSql) Then
|
||||
LOGGER.Debug(" >>sql enthält Platzhalter und wird erst während der Laufzeit gefüllt!", False)
|
||||
Else
|
||||
runinLZ = True
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >>sql enthält Platzhalter und wird erst während der Laufzeit gefüllt!", False)
|
||||
End If
|
||||
|
||||
|
||||
If runinLZ = True Then
|
||||
'Die Standardcombobox anlegen
|
||||
Dim oCombobox As ComboBox
|
||||
oCombobox = AddCombobox(indexname, y)
|
||||
oCombobox.Size = New Size(300, 27)
|
||||
Return oCombobox
|
||||
Else
|
||||
Dim table As DataTable = NewDataset.Tables(0)
|
||||
Dim oControl As New DigitalData.Controls.LookupGrid.LookupControl2 With {
|
||||
.DataSource = table,
|
||||
.MultiSelect = Multiselect,
|
||||
.AllowAddNewValues = AddNewValues,
|
||||
.PreventDuplicates = PreventDuplicateValues,
|
||||
.Location = New Point(11, y),
|
||||
.Size = New Size(300, 27),
|
||||
.Name = "cmbMulti" & indexname
|
||||
}
|
||||
|
||||
If connectionString.Contains("Initial Catalog=") Then
|
||||
Try
|
||||
adapter.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
sqlCnn.Close()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
Else
|
||||
Try
|
||||
oracleadapter.Dispose()
|
||||
oracleCmd.Dispose()
|
||||
oracleConn.Close()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
Return oControl
|
||||
Dim oDatatable = ClassDatabase.Return_Datatable_Combined(oSql, oConnectionString, False)
|
||||
oControl.DataSource = oDatatable
|
||||
End If
|
||||
End If
|
||||
|
||||
Return oControl
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(" - Unvorhergesehener Unexpected error in AddVorschlag_ComboBox - Indexname: " & indexname & " - Fehler: " & vbNewLine & ex.Message)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unvorhergesehener Unexpected error in AddVorschlag_ComboBox:")
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
@ -134,10 +96,12 @@ Public Class ClassControls
|
||||
cmb.AutoSize = True
|
||||
cmb.Size = New Size(300, 27)
|
||||
cmb.Location = New Point(11, y)
|
||||
'cmb.AutoCompleteMode = AutoCompleteMode.SuggestAppend
|
||||
'cmb.AutoCompleteSource = AutoCompleteSource.ListItems
|
||||
|
||||
'AddHandler cmb.KeyUp, AddressOf AutoCompleteCombo_KeyUp
|
||||
cmb.Tag = New ControlMeta() With {
|
||||
.IndexName = indexname
|
||||
}
|
||||
|
||||
|
||||
AddHandler cmb.SelectedIndexChanged, AddressOf OncmbSIndexChanged
|
||||
AddHandler cmb.GotFocus, AddressOf OncmbGotFocus
|
||||
AddHandler cmb.LostFocus, AddressOf OncmbLostFocus
|
||||
@ -310,6 +274,9 @@ Public Class ClassControls
|
||||
|
||||
txt.Size = New Size(260, 27)
|
||||
txt.Location = New Point(11, y)
|
||||
txt.Tag = New ControlMeta() With {
|
||||
.IndexName = indexname
|
||||
}
|
||||
|
||||
If text <> "" Then
|
||||
txt.Text = text
|
||||
@ -343,8 +310,86 @@ Public Class ClassControls
|
||||
|
||||
Public Sub OnTextBoxKeyUp(sender As System.Object, e As System.Windows.Forms.KeyEventArgs)
|
||||
Dim oTextbox As TextBox = sender
|
||||
|
||||
If oTextbox.Text = String.Empty Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If e.KeyCode = Keys.Return Or e.KeyCode = Keys.Enter Or e.KeyCode = Keys.Tab Then
|
||||
PrepareDependingControl(oTextbox)
|
||||
End If
|
||||
|
||||
If (e.KeyCode = Keys.Return) Then
|
||||
SendKeys.Send("{TAB}")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PrepareDependingControl(Control As Control)
|
||||
If TypeOf Control Is Label Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Try
|
||||
Dim oMeta = DirectCast(Control.Tag, ClassControls.ControlMeta)
|
||||
Dim oIndexName As String = oMeta.IndexName
|
||||
Dim oSQL = $"SELECT * FROM TBDD_INDEX_MAN WHERE SQL_RESULT LIKE '%{oIndexName}%'"
|
||||
Dim oDatatable As DataTable = ClassDatabase.Return_Datatable(oSQL)
|
||||
|
||||
If Not IsNothing(oDatatable) Then
|
||||
For Each oRow As DataRow In oDatatable.Rows
|
||||
Dim oControlName As String = NotNull(oRow.Item("NAME"), "")
|
||||
Dim oConnectionId As Integer = NotNull(oRow.Item("CONNECTION_ID"), -1)
|
||||
Dim oControlSql As String = NotNull(oRow.Item("SQL_RESULT"), "")
|
||||
|
||||
If oConnectionId = -1 Or oControlSql = String.Empty Then
|
||||
LOGGER.Warn("Missing SQL Query or ConnectionId for Control [{0}]! Continuing.", oControlName)
|
||||
Continue For
|
||||
End If
|
||||
|
||||
oControlSql = ClassPatterns.ReplaceUserValues(oControlSql, USER_PRENAME, USER_SURNAME, USER_SHORT_NAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_DOKART_ID)
|
||||
oControlSql = ClassPatterns.ReplaceInternalValues(oControlSql)
|
||||
oControlSql = ClassPatterns.ReplaceControlValues(oControlSql, Panel)
|
||||
|
||||
SetDependingControlResult(oControlName, oControlSql, oConnectionId)
|
||||
Next
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub SetDependingControlResult(IndexName As String, SqlCommand As String, SqlConnectionId As Integer)
|
||||
Try
|
||||
Dim oConnectionString = ClassFormFunctions.GetConnectionString(SqlConnectionId)
|
||||
Dim oDatatable As DataTable = ClassDatabase.Return_Datatable_CS(SqlCommand, oConnectionString)
|
||||
Dim oFoundControl As Control = Nothing
|
||||
|
||||
For Each oControl As Control In Panel.Controls
|
||||
If TypeOf oControl Is Label Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
Dim oMeta = DirectCast(oControl.Tag, ClassControls.ControlMeta)
|
||||
Dim oIndex As String = oMeta.IndexName
|
||||
|
||||
If oIndex = IndexName Then
|
||||
oFoundControl = oControl
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If oFoundControl IsNot Nothing Then
|
||||
If TypeOf oFoundControl Is TextBox Then
|
||||
DirectCast(oFoundControl, TextBox).Text = oDatatable.Rows.Item(0).Item(0)
|
||||
ElseIf TypeOf oFoundControl Is LookupControl2 Then
|
||||
DirectCast(oFoundControl, LookupControl2).DataSource = oDatatable
|
||||
ElseIf TypeOf oFoundControl Is ComboBox Then
|
||||
DirectCast(oFoundControl, ComboBox).DataSource = oDatatable
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@ -62,6 +62,14 @@ Public Class ClassDatabase
|
||||
Return connectionString
|
||||
End Function
|
||||
|
||||
Public Shared Function Return_Datatable_Combined(SqlCommand As String, ConnectionString As String, Optional userInput As Boolean = False)
|
||||
If ConnectionString.Contains("Initial Catalog=") Then
|
||||
Return Return_Datatable(SqlCommand, userInput)
|
||||
Else
|
||||
Return Oracle_Return_Datatable(SqlCommand, ConnectionString, userInput)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function Return_Datatable(sql_command As String, Optional userInput As Boolean = False)
|
||||
Try
|
||||
Dim SQLconnect As New SqlConnection
|
||||
|
||||
@ -214,11 +214,16 @@ Public Class ClassInit
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
sql = "SELECT SHORTNAME FROM TBDD_USER WHERE GUID = " & USER_ID
|
||||
USER_SHORT_NAME = ClassDatabase.Execute_Scalar(sql, MyConnectionString)
|
||||
If IsNothing(USER_SHORT_NAME) Or IsDBNull(USER_SHORT_NAME) Then
|
||||
USER_SHORT_NAME = ""
|
||||
Dim oUserDatatable As DataTable = ClassDatabase.Return_Datatable($"SELECT * FROM TBDD_USER WHERE GUID = {USER_ID}")
|
||||
If Not IsNothing(oUserDatatable) AndAlso Not IsDBNull(oUserDatatable.Rows.Item(0)) Then
|
||||
Dim oRow As DataRow = oUserDatatable.Rows.Item(0)
|
||||
USER_SHORT_NAME = NotNull(oRow.Item("SHORTNAME"), String.Empty)
|
||||
USER_PRENAME = NotNull(oRow.Item("PRENAME"), String.Empty)
|
||||
USER_SURNAME = NotNull(oRow.Item("NAME"), String.Empty)
|
||||
USER_EMAIL = NotNull(oRow.Item("EMAIL"), String.Empty)
|
||||
USER_USERNAME = NotNull(oRow.Item("USERNAME"), String.Empty)
|
||||
End If
|
||||
|
||||
'Check_User_Exists_in_GIGroups()
|
||||
sql = String.Format("SELECT * FROM [dbo].[FNDD_CHECK_USER_MODULE] ('{0}','GLOBIX',{1})", Environment.UserName, 1)
|
||||
Dim DT_CHECKUSER_MODULE As DataTable = ClassDatabase.Return_Datatable(sql)
|
||||
|
||||
@ -151,11 +151,35 @@ Public Class ClassPatterns
|
||||
End If
|
||||
|
||||
Dim controlName As String = GetNextPattern(result, PATTERN_CTRL).Value
|
||||
Dim control As Control = panel.Controls.Find(controlName, False).FirstOrDefault()
|
||||
'Dim control As Control = panel.Controls.Find(controlName, False).FirstOrDefault()
|
||||
Dim oFoundControl As Control = Nothing
|
||||
|
||||
If control IsNot Nothing Then
|
||||
Dim value As String = control.Text
|
||||
result = ReplacePattern(result, PATTERN_CTRL, value)
|
||||
For Each oControl As Control In panel.Controls
|
||||
If TypeOf oControl Is Label Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
Dim oMeta = DirectCast(oControl.Tag, ClassControls.ControlMeta)
|
||||
Dim oIndex As String = oMeta.IndexName
|
||||
|
||||
If oIndex = controlName Then
|
||||
oFoundControl = oControl
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If oFoundControl IsNot Nothing Then
|
||||
Dim oValue As String = String.Empty
|
||||
|
||||
If TypeOf oFoundControl Is TextBox Then
|
||||
oValue = DirectCast(oFoundControl, TextBox).Text
|
||||
ElseIf TypeOf oFoundControl Is CheckBox Then
|
||||
oValue = IIf(DirectCast(oFoundControl, CheckBox).Checked, 1, 0)
|
||||
Else
|
||||
oValue = ""
|
||||
End If
|
||||
|
||||
result = ReplacePattern(result, PATTERN_CTRL, oValue)
|
||||
End If
|
||||
|
||||
oTryCounter += 1
|
||||
|
||||
@ -376,6 +376,7 @@
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ModuleCURRENT.vb" />
|
||||
<Compile Include="ModuleHelpers.vb" />
|
||||
<Compile Include="ModuleMySettings.vb" />
|
||||
<Compile Include="ModuleUserSavings.vb" />
|
||||
<Compile Include="ModuleWindowHandles.vb" />
|
||||
|
||||
@ -31,10 +31,14 @@ Module ModuleCURRENT
|
||||
Public USER_ID
|
||||
Public USER_IN_MODULE As Boolean = False
|
||||
Public USER_IS_ADMIN As Boolean = False
|
||||
Public USER_SHORT_NAME
|
||||
Public UserLoggedin As Integer = 0
|
||||
Public USER_LANGUAGE As String = "DE"
|
||||
|
||||
Public USER_SHORT_NAME As String = ""
|
||||
Public USER_PRENAME As String = ""
|
||||
Public USER_SURNAME As String = ""
|
||||
Public USER_EMAIL As String = ""
|
||||
Public USER_LANGUAGE As String = "DE"
|
||||
Public USER_USERNAME As String = ""
|
||||
|
||||
Public CURRENT_FOLDERWATCH As String = ""
|
||||
Public CURRENT_SCAN_FOLDERWATCH As String = ""
|
||||
|
||||
15
Global_Indexer/ModuleHelpers.vb
Normal file
15
Global_Indexer/ModuleHelpers.vb
Normal file
@ -0,0 +1,15 @@
|
||||
Module ModuleHelpers
|
||||
''' <summary>
|
||||
''' Überprüft einen Wert auf verschiedene Arten von "Null" und gibt einen Standard-Wert zurück, wenn der Wert "Null" ist.
|
||||
''' </summary>
|
||||
''' <param name="value">Der zu überprüfende Wert</param>
|
||||
''' <param name="defaultValue">Der Standard Wert</param>
|
||||
''' <returns>value oder wenn dieser "Null" ist, defaultValue</returns>
|
||||
Public Function NotNull(Of T)(ByVal value As T, ByVal defaultValue As T) As T
|
||||
If IsNothing(value) OrElse String.IsNullOrEmpty(value.ToString) OrElse IsDBNull(value) Then
|
||||
Return defaultValue
|
||||
Else
|
||||
Return value
|
||||
End If
|
||||
End Function
|
||||
End Module
|
||||
@ -551,10 +551,15 @@ Public Class frmAdministration
|
||||
Dim oSQL = $"SELECT SQL_RESULT, CONNECTION_ID FROM TBDD_INDEX_MAN WHERE GUID = {oIndexGuid}"
|
||||
Dim oDatatable As DataTable = ClassDatabase.Return_Datatable(oSQL)
|
||||
Dim oRow = oDatatable.Rows.Item(0)
|
||||
Dim oConnection As Integer = 1
|
||||
|
||||
If Not IsDBNull(oRow.Item("CONNECTION_ID")) Then
|
||||
oConnection = oRow.Item("CONNECTION_ID")
|
||||
End If
|
||||
|
||||
Dim oForm As New frmSQL_DESIGNER(oIndexGuid, oDocTypeGuid) With {
|
||||
.SQLCommand = oRow.Item("SQL_RESULT"),
|
||||
.ConnectionID = oRow.Item("CONNECTION_ID")
|
||||
.ConnectionID = oConnection
|
||||
}
|
||||
|
||||
If oForm.ShowDialog() = DialogResult.OK Then
|
||||
|
||||
29
Global_Indexer/frmIndexFileList.Designer.vb
generated
29
Global_Indexer/frmIndexFileList.Designer.vb
generated
@ -34,9 +34,11 @@ Partial Class frmIndexFileList
|
||||
Me.TBGI_FILES_USERTableAdapter = New Global_Indexer.MyDatasetTableAdapters.TBGI_FILES_USERTableAdapter()
|
||||
Me.TableAdapterManager = New Global_Indexer.MyDatasetTableAdapters.TableAdapterManager()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
Me.btnstartIndex = New System.Windows.Forms.Button()
|
||||
Me.Panel1.SuspendLayout()
|
||||
CType(Me.CheckedListBoxControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.TBGI_FILES_USERBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.MyDataset1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Panel1
|
||||
@ -56,6 +58,11 @@ Partial Class frmIndexFileList
|
||||
resources.ApplyResources(Me.Label1, "Label1")
|
||||
Me.Label1.Name = "Label1"
|
||||
'
|
||||
'CheckedListBoxControl1
|
||||
'
|
||||
resources.ApplyResources(Me.CheckedListBoxControl1, "CheckedListBoxControl1")
|
||||
Me.CheckedListBoxControl1.Name = "CheckedListBoxControl1"
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
resources.ApplyResources(Me.Button1, "Button1")
|
||||
@ -63,6 +70,11 @@ Partial Class frmIndexFileList
|
||||
Me.Button1.TabStop = False
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'MyDataset1
|
||||
'
|
||||
Me.MyDataset1.DataSetName = "MyDataset"
|
||||
Me.MyDataset1.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
|
||||
'
|
||||
'TBGI_FILES_USERTableAdapter
|
||||
'
|
||||
Me.TBGI_FILES_USERTableAdapter.ClearBeforeFill = True
|
||||
@ -82,6 +94,7 @@ Partial Class frmIndexFileList
|
||||
Me.TableAdapterManager.TBDD_USERTableAdapter = Nothing
|
||||
Me.TableAdapterManager.TBGI_CONFIGURATIONTableAdapter = Nothing
|
||||
Me.TableAdapterManager.TBGI_OBJECTTYPE_EMAIL_INDEXTableAdapter = Nothing
|
||||
Me.TableAdapterManager.TBGI_REGEX_DOCTYPETableAdapter = Nothing
|
||||
Me.TableAdapterManager.TBHOTKEY_PATTERNS_REWORKTableAdapter = Nothing
|
||||
Me.TableAdapterManager.TBHOTKEY_PATTERNSTableAdapter = Nothing
|
||||
Me.TableAdapterManager.TBHOTKEY_PROFILETableAdapter = Nothing
|
||||
@ -96,16 +109,10 @@ Partial Class frmIndexFileList
|
||||
Me.Button2.TabStop = False
|
||||
Me.Button2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnCancel
|
||||
'
|
||||
resources.ApplyResources(Me.btnCancel, "btnCancel")
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.TabStop = False
|
||||
Me.btnCancel.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnstartIndex
|
||||
'
|
||||
resources.ApplyResources(Me.btnstartIndex, "btnstartIndex")
|
||||
Me.btnstartIndex.Image = Global.Global_Indexer.My.Resources.Resources.Go
|
||||
Me.btnstartIndex.Name = "btnstartIndex"
|
||||
Me.btnstartIndex.UseVisualStyleBackColor = True
|
||||
'
|
||||
@ -113,8 +120,6 @@ Partial Class frmIndexFileList
|
||||
'
|
||||
resources.ApplyResources(Me, "$this")
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ControlBox = False
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
Me.Controls.Add(Me.Button2)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.Controls.Add(Me.CheckedListBoxControl1)
|
||||
@ -126,6 +131,9 @@ Partial Class frmIndexFileList
|
||||
Me.TopMost = True
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.Panel1.PerformLayout()
|
||||
CType(Me.CheckedListBoxControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.TBGI_FILES_USERBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.MyDataset1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
@ -139,6 +147,5 @@ Partial Class frmIndexFileList
|
||||
Friend WithEvents CheckedListBoxControl1 As DevExpress.XtraEditors.CheckedListBoxControl
|
||||
Friend WithEvents Button1 As System.Windows.Forms.Button
|
||||
Friend WithEvents Button2 As System.Windows.Forms.Button
|
||||
Friend WithEvents btnCancel As System.Windows.Forms.Button
|
||||
Friend WithEvents Label2 As Label
|
||||
End Class
|
||||
|
||||
@ -117,63 +117,15 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name=">>Label2.Name" xml:space="preserve">
|
||||
<value>Label2</value>
|
||||
</data>
|
||||
<data name=">>Label2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>Label2.Parent" xml:space="preserve">
|
||||
<value>Panel1</value>
|
||||
</data>
|
||||
<data name=">>Label2.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>Label1.Name" xml:space="preserve">
|
||||
<value>Label1</value>
|
||||
</data>
|
||||
<data name=">>Label1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>Label1.Parent" xml:space="preserve">
|
||||
<value>Panel1</value>
|
||||
</data>
|
||||
<data name=">>Label1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="Panel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="Panel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>655, 57</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Panel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>Panel1.Name" xml:space="preserve">
|
||||
<value>Panel1</value>
|
||||
</data>
|
||||
<data name=">>Panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>Panel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>Panel1.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="Label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="Label2.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9.75pt, style=Bold</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
@ -231,6 +183,42 @@
|
||||
<data name=">>Label1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="Panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
<data name="Panel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="Panel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>647, 57</value>
|
||||
</data>
|
||||
<data name="Panel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>Panel1.Name" xml:space="preserve">
|
||||
<value>Panel1</value>
|
||||
</data>
|
||||
<data name=">>Panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>Panel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>Panel1.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="CheckedListBoxControl1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Bottom, Left, Right</value>
|
||||
</data>
|
||||
<data name="CheckedListBoxControl1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 63</value>
|
||||
</data>
|
||||
<data name="CheckedListBoxControl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>647, 261</value>
|
||||
</data>
|
||||
<data name="CheckedListBoxControl1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name=">>CheckedListBoxControl1.Name" xml:space="preserve">
|
||||
<value>CheckedListBoxControl1</value>
|
||||
</data>
|
||||
@ -241,16 +229,16 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>CheckedListBoxControl1.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="Button1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Left</value>
|
||||
</data>
|
||||
<data name="Button1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>6, 292</value>
|
||||
<value>12, 344</value>
|
||||
</data>
|
||||
<data name="Button1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>115, 23</value>
|
||||
<value>115, 36</value>
|
||||
</data>
|
||||
<data name="Button1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@ -268,8 +256,14 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>Button1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>1</value>
|
||||
</data>
|
||||
<metadata name="TBGI_FILES_USERBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="MyDataset1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>240, 17</value>
|
||||
</metadata>
|
||||
<metadata name="TBGI_FILES_USERTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>357, 17</value>
|
||||
</metadata>
|
||||
@ -280,16 +274,16 @@
|
||||
<value>Bottom, Left</value>
|
||||
</data>
|
||||
<data name="Button2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>6, 319</value>
|
||||
<value>133, 344</value>
|
||||
</data>
|
||||
<data name="Button2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>115, 23</value>
|
||||
<value>115, 36</value>
|
||||
</data>
|
||||
<data name="Button2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="Button2.Text" xml:space="preserve">
|
||||
<value>Alle unselektieren</value>
|
||||
<value>Alle abwählen</value>
|
||||
</data>
|
||||
<data name=">>Button2.Name" xml:space="preserve">
|
||||
<value>Button2</value>
|
||||
@ -301,39 +295,6 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>Button2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="btnCancel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
</data>
|
||||
<data name="btnCancel.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleLeft</value>
|
||||
</data>
|
||||
<data name="btnCancel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>406, 292</value>
|
||||
</data>
|
||||
<data name="btnCancel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>86, 36</value>
|
||||
</data>
|
||||
<data name="btnCancel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="btnCancel.Text" xml:space="preserve">
|
||||
<value>Abbruch</value>
|
||||
</data>
|
||||
<data name="btnCancel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleRight</value>
|
||||
</data>
|
||||
<data name=">>btnCancel.Name" xml:space="preserve">
|
||||
<value>btnCancel</value>
|
||||
</data>
|
||||
<data name=">>btnCancel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>btnCancel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>btnCancel.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="btnstartIndex.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
@ -346,7 +307,7 @@
|
||||
<value>MiddleLeft</value>
|
||||
</data>
|
||||
<data name="btnstartIndex.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>498, 292</value>
|
||||
<value>490, 344</value>
|
||||
</data>
|
||||
<data name="btnstartIndex.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>145, 36</value>
|
||||
@ -370,7 +331,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>btnstartIndex.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
@ -379,7 +340,7 @@
|
||||
<value>7, 15</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>655, 354</value>
|
||||
<value>647, 392</value>
|
||||
</data>
|
||||
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
Public Class frmIndexFileList
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class frmIndexFileList
|
||||
|
||||
Private Sub frmIndexFileList_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
Try
|
||||
@ -15,7 +17,7 @@
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Load Form: " & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnstartIndex_Click(sender As Object, e As EventArgs) Handles btnstartIndex.Click
|
||||
@ -39,7 +41,7 @@
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Clear Multiple Documents: " & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
@ -56,8 +58,7 @@
|
||||
CheckedListBoxControl1.Focus()
|
||||
End Sub
|
||||
|
||||
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||
Private Sub frmIndexFileList_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
||||
ClassDatabase.Execute_non_Query("DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')", True)
|
||||
Me.Close()
|
||||
End Sub
|
||||
End Class
|
||||
@ -284,31 +284,19 @@ Public Class frmStart
|
||||
End Try
|
||||
Me.TopMost = True
|
||||
End Sub
|
||||
Sub MyBackgroundThread()
|
||||
|
||||
|
||||
Dim frmCollection = System.Windows.Forms.Application.OpenForms
|
||||
Do While frmCollection.OfType(Of frmIndex).Any
|
||||
|
||||
Loop
|
||||
End Sub
|
||||
Sub Open_IndexDialog()
|
||||
Try
|
||||
Me.Hide()
|
||||
Me.TopMost = False
|
||||
frmIndex.Show()
|
||||
'Dim thread As New Thread(AddressOf MyBackgroundThread)
|
||||
'thread.Start()
|
||||
'Do While thread.IsAlive
|
||||
|
||||
'Loop
|
||||
Me.Visible = True
|
||||
Me.TopMost = True
|
||||
Me.BringToFront()
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub frmStart_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user