Compare commits
5 Commits
2b6e06c3fa
...
180bbd0ffe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
180bbd0ffe | ||
|
|
1113cf9597 | ||
|
|
1b11cde174 | ||
|
|
0bc57ca2bb | ||
|
|
0197835eee |
@@ -297,6 +297,14 @@
|
||||
<Project>{3dcd6d1a-c830-4241-b7e4-27430e7ea483}</Project>
|
||||
<Name>LookupControl</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Controls.SQLEditor\SQLEditor.vbproj">
|
||||
<Project>{3e7bc8a9-91ef-49b8-8110-2c01f664c24a}</Project>
|
||||
<Name>SQLEditor</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\GUIs.Common\Common.vbproj">
|
||||
<Project>{D20A6BF2-C7C6-4A7A-B34D-FA27D775A049}</Project>
|
||||
<Name>Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Modules.Config\Config.vbproj">
|
||||
<Project>{44982f9b-6116-44e2-85d0-f39650b1ef99}</Project>
|
||||
<Name>Config</Name>
|
||||
|
||||
12
GUIs.Test.TestGUI/frmStart.Designer.vb
generated
12
GUIs.Test.TestGUI/frmStart.Designer.vb
generated
@@ -30,6 +30,7 @@ Partial Class frmStart
|
||||
Me.Button6 = New System.Windows.Forms.Button()
|
||||
Me.Button7 = New System.Windows.Forms.Button()
|
||||
Me.Button8 = New System.Windows.Forms.Button()
|
||||
Me.Button9 = New System.Windows.Forms.Button()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Button1
|
||||
@@ -104,11 +105,21 @@ Partial Class frmStart
|
||||
Me.Button8.Text = "IMAP"
|
||||
Me.Button8.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button9
|
||||
'
|
||||
Me.Button9.Location = New System.Drawing.Point(254, 134)
|
||||
Me.Button9.Name = "Button9"
|
||||
Me.Button9.Size = New System.Drawing.Size(236, 55)
|
||||
Me.Button9.TabIndex = 3
|
||||
Me.Button9.Text = "SQL Editor"
|
||||
Me.Button9.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmStart
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(800, 450)
|
||||
Me.Controls.Add(Me.Button9)
|
||||
Me.Controls.Add(Me.Button6)
|
||||
Me.Controls.Add(Me.Button5)
|
||||
Me.Controls.Add(Me.Button4)
|
||||
@@ -131,4 +142,5 @@ Partial Class frmStart
|
||||
Friend WithEvents Button6 As Button
|
||||
Friend WithEvents Button7 As Button
|
||||
Friend WithEvents Button8 As Button
|
||||
Friend WithEvents Button9 As Button
|
||||
End Class
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
Imports Microsoft.Win32
|
||||
Imports DigitalData.Controls.SQLEditor
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
|
||||
Public Class frmStart
|
||||
Private LogConfig As LogConfig
|
||||
Private Database As MSSQLServer
|
||||
|
||||
Private Sub frmStart_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
LogConfig = New LogConfig(New LogOptions With {
|
||||
.LogPath = LogConfig.PathType.Temp,
|
||||
.ProductName = "TestGUI",
|
||||
.CompanyName = "Digital Data"
|
||||
})
|
||||
Database = New MSSQLServer(LogConfig, "Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd")
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
frmRelations.Show()
|
||||
End Sub
|
||||
@@ -30,4 +45,11 @@ Public Class frmStart
|
||||
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click, Button8.Click
|
||||
frmEmail.Show()
|
||||
End Sub
|
||||
|
||||
Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
|
||||
Dim oForm As New frmSQLEditor(LogConfig, Database)
|
||||
oForm.Show()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@@ -7,6 +7,8 @@ Imports DigitalData.Modules.Logging
|
||||
''' Example: --start-search=id#7~doctype#ARE
|
||||
''' </summary>
|
||||
Public Class ClassCommandlineArgs
|
||||
Inherits Base.BaseClass
|
||||
|
||||
Private CommandLineArgTypes As New List(Of String) From {
|
||||
"show-profile",
|
||||
"start-search"
|
||||
@@ -18,12 +20,8 @@ Public Class ClassCommandlineArgs
|
||||
Public FunctionName As String
|
||||
Public FunctionArgs As New Dictionary(Of String, String)
|
||||
|
||||
Private LogConfig As LogConfig
|
||||
Private Logger As Logger
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig)
|
||||
LogConfig = pLogConfig
|
||||
Logger = LogConfig.GetLogger()
|
||||
MyBase.New(pLogConfig)
|
||||
End Sub
|
||||
|
||||
Public Sub Parse(Args As List(Of String))
|
||||
|
||||
@@ -4,19 +4,21 @@ Imports DevExpress.XtraGrid.Views.Grid.ViewInfo
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class ClassDragDrop
|
||||
Inherits Base.BaseClass
|
||||
|
||||
Private downHitInfo As GridHitInfo = Nothing
|
||||
Private _Logger As Logger
|
||||
Public Sub New()
|
||||
_Logger = My.LogConfig.GetLogger
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
MyBase.New(LogConfig)
|
||||
End Sub
|
||||
|
||||
Public Sub AddGridView(view As GridView)
|
||||
AddHandler view.MouseDown, AddressOf view_MouseDown
|
||||
AddHandler view.MouseMove, AddressOf view_MouseMove
|
||||
AddHandler view.GridControl.DragOver, AddressOf grid_DragOver
|
||||
AddHandler view.MouseDown, AddressOf View_MouseDown
|
||||
AddHandler view.MouseMove, AddressOf View_MouseMove
|
||||
AddHandler view.GridControl.DragOver, AddressOf GridControl_DragOver
|
||||
End Sub
|
||||
|
||||
Private Sub view_MouseDown(sender As Object, e As MouseEventArgs)
|
||||
Private Sub View_MouseDown(sender As Object, e As MouseEventArgs)
|
||||
Dim view As GridView = sender
|
||||
downHitInfo = Nothing
|
||||
Dim hitInfo As GridHitInfo = view.CalcHitInfo(New Point(e.X, e.Y))
|
||||
@@ -30,7 +32,7 @@ Public Class ClassDragDrop
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub view_MouseMove(sender As Object, e As MouseEventArgs)
|
||||
Private Sub View_MouseMove(sender As Object, e As MouseEventArgs)
|
||||
Try
|
||||
Dim view As GridView = sender
|
||||
Dim hitInfo As GridHitInfo = view.CalcHitInfo(New Point(e.X, e.Y))
|
||||
@@ -67,18 +69,18 @@ Public Class ClassDragDrop
|
||||
|
||||
DevExpress.Utils.DXMouseEventArgs.GetMouseArgs(e).Handled = True
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
MsgBox("Error in view_MouseMove: " & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub grid_DragOver(sender As Object, e As DragEventArgs)
|
||||
Private Sub GridControl_DragOver(sender As Object, e As DragEventArgs)
|
||||
If e.Data.GetDataPresent(DataFormats.Text) Then
|
||||
Dim data As String = e.Data.GetData(DataFormats.Text)
|
||||
Dim source = data.Split("|")(1)
|
||||
|
||||
@@ -14,9 +14,9 @@ Imports DigitalData.GUIs.ZooFlow.ClassInitLoader
|
||||
Imports DigitalData.Controls.SQLConfig
|
||||
|
||||
Public Class ClassInit
|
||||
Inherits Base.BaseClass
|
||||
|
||||
Private ReadOnly _MainForm As frmFlowForm
|
||||
Private ReadOnly _Logger As Logger
|
||||
Private ReadOnly _LogConfig As LogConfig
|
||||
Private ReadOnly _DataASorDB As ClassDataASorDB
|
||||
Private ReadOnly _Database As DatabaseWithFallback
|
||||
Private _Loader As ClassInitLoader
|
||||
@@ -24,9 +24,8 @@ Public Class ClassInit
|
||||
Public Event Completed As EventHandler
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, ParentForm As frmFlowForm)
|
||||
MyBase.New(LogConfig)
|
||||
_MainForm = ParentForm
|
||||
_LogConfig = LogConfig
|
||||
_Logger = LogConfig.GetLogger()
|
||||
|
||||
'TODO: Remove when Globix uses DatabaseWithFallback
|
||||
clsDataASorDB = New ClassDataASorDB(LogConfig)
|
||||
@@ -37,7 +36,7 @@ Public Class ClassInit
|
||||
MsgBox("Keine Verbindungs-Informationen hinterlegt. Anwendung wird beendet.", MsgBoxStyle.Critical, _MainForm.Text)
|
||||
Application.Exit()
|
||||
Else
|
||||
_Loader = New ClassInitLoader()
|
||||
_Loader = New ClassInitLoader(LogConfig)
|
||||
|
||||
' === Init Schritte definieren
|
||||
_Loader.AddStep("Initializing Base", AddressOf InitializeBase, True)
|
||||
@@ -68,7 +67,7 @@ Public Class ClassInit
|
||||
My.DatabaseECM = New MSSQLServer(My.LogConfig, oConnectionString)
|
||||
|
||||
If My.DatabaseECM.DBInitialized = False Then
|
||||
_Logger.Warn("Could not initialize DD_ECM-Database!")
|
||||
Logger.Warn("Could not initialize DD_ECM-Database!")
|
||||
Throw New InitException("Could not initialize ECM-Database!")
|
||||
|
||||
Else
|
||||
@@ -76,12 +75,12 @@ Public Class ClassInit
|
||||
Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSQl)
|
||||
|
||||
If IsNothing(oDatatable) OrElse oDatatable.Rows.Count = 0 Then
|
||||
_Logger.Warn("No IDB connection entries in TBDD_CONNECTION found!")
|
||||
Logger.Warn("No IDB connection entries in TBDD_CONNECTION found!")
|
||||
Throw New InitException("Fehler beim Laden der IDB Verbindungsdaten!")
|
||||
End If
|
||||
|
||||
If oDatatable.Rows.Count > 1 Then
|
||||
_Logger.Warn("Multiple IDB connection entries in TBDD_CONNECTION found!")
|
||||
Logger.Warn("Multiple IDB connection entries in TBDD_CONNECTION found!")
|
||||
Throw New InitException("Fehler beim Laden der IDB Verbindungsdaten!")
|
||||
End If
|
||||
|
||||
@@ -96,7 +95,7 @@ Public Class ClassInit
|
||||
End If
|
||||
|
||||
If My.DatabaseIDB.DBInitialized = False Then
|
||||
_Logger.Warn("Could not initialize IDB-Database!")
|
||||
Logger.Warn("Could not initialize IDB-Database!")
|
||||
Throw New InitException("Could not initialize IDB-Database!")
|
||||
End If
|
||||
End Sub
|
||||
@@ -105,7 +104,7 @@ Public Class ClassInit
|
||||
MyApplication.Service.Address = My.SystemConfig.AppServerConfig
|
||||
Dim oServerData = Client.ParseServiceAddress(My.SystemConfig.AppServerConfig)
|
||||
|
||||
My.Application.Service.Client = New Client(_LogConfig, oServerData.Item1, oServerData.Item2)
|
||||
My.Application.Service.Client = New Client(LogConfig, oServerData.Item1, oServerData.Item2)
|
||||
|
||||
If Not IsNothing(My.Application.Service.Client) Then
|
||||
If My.Application.Service.Client.Connect() Then
|
||||
@@ -113,15 +112,15 @@ Public Class ClassInit
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw New InitException("Error in InitializeService", ex)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub InitializeDatabaseWithFallback(MyApplication As My.MyApplication)
|
||||
Try
|
||||
My.Database = New DatabaseWithFallback(_LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB)
|
||||
My.Database = New DatabaseWithFallback(LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB)
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw New InitException("Error InitializeDatabaseWithFallback!", ex)
|
||||
End Try
|
||||
End Sub
|
||||
@@ -155,7 +154,7 @@ Public Class ClassInit
|
||||
Next
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw New InitException("Error while initializing user!", ex)
|
||||
End Try
|
||||
End Sub
|
||||
@@ -182,7 +181,7 @@ Public Class ClassInit
|
||||
|
||||
MyApplication.Settings.GdPictureKey = NotNull(oRow.Item("LICENSE"), String.Empty)
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw New InitException("Error Initialize3rdParty!", ex)
|
||||
End Try
|
||||
End Sub
|
||||
@@ -202,7 +201,7 @@ Public Class ClassInit
|
||||
End Select
|
||||
Next
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Logger.Error(ex)
|
||||
Throw New InitException("Error in InitBasicData", ex)
|
||||
End Try
|
||||
End Sub
|
||||
@@ -300,15 +299,15 @@ Public Class ClassInit
|
||||
|
||||
Case "RESULT"
|
||||
Dim oLines = oValue.ToString.Split("|"c)
|
||||
_Logger.Debug("Access Result for Module {0}", ModuleName)
|
||||
Logger.Debug("Access Result for Module {0}", ModuleName)
|
||||
For Each oLine In oLines
|
||||
_Logger.Debug(oLine.Trim)
|
||||
Logger.Debug(oLine.Trim)
|
||||
Next
|
||||
Case "WORKING_MODE"
|
||||
Dim oLines = oValue.ToString.Split("|"c)
|
||||
_Logger.Debug("WORKING_MODEs for Module {0}", ModuleName)
|
||||
Logger.Debug("WORKING_MODEs for Module {0}", ModuleName)
|
||||
For Each oLine In oLines
|
||||
_Logger.Debug(oLine.Trim)
|
||||
Logger.Debug(oLine.Trim)
|
||||
If oLine = "NO_BASICCONF" Then
|
||||
MyApplication.User.HideBasicConfig = True
|
||||
|
||||
@@ -328,7 +327,7 @@ Public Class ClassInit
|
||||
MyApplication.Search.SelectInIntegerAttributeIds = ""
|
||||
End Try
|
||||
Else
|
||||
_Logger.Info($"Wrong WorkingMode: {oLine}")
|
||||
Logger.Info($"Wrong WorkingMode: {oLine}")
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
@@ -3,16 +3,17 @@ Imports DigitalData.GUIs.ZooFlow.My
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class ClassInitLoader
|
||||
Inherits Base.BaseClass
|
||||
|
||||
Private _Worker As BackgroundWorker
|
||||
Private _Logger As Logger
|
||||
Private _CurrentStep As InitStep
|
||||
|
||||
Public Steps As New List(Of InitStep)
|
||||
Public Event ProgressChanged As EventHandler(Of InitProgress)
|
||||
Public Event InitCompleted As EventHandler(Of RunWorkerCompletedEventArgs)
|
||||
|
||||
Public Sub New()
|
||||
_Logger = My.LogConfig.GetLogger()
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
MyBase.New(LogConfig)
|
||||
End Sub
|
||||
|
||||
Public Sub AddStep(Name As String, Action As Action(Of Object), Optional Fatal As Boolean = False)
|
||||
@@ -61,11 +62,11 @@ Public Class ClassInitLoader
|
||||
My.Application.ClipboardWatcher = oMyApplication.ClipboardWatcher
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
_Logger.Warn("Init Step '{0}' failed!", oStep.Name)
|
||||
Logger.Error(ex)
|
||||
Logger.Warn("Init Step '{0}' failed!", oStep.Name)
|
||||
|
||||
If oStep.Fatal Then
|
||||
_Logger.Warn("Fatal error in '{0}'. Init will be aborted!", oStep.Name)
|
||||
Logger.Warn("Fatal error in '{0}'. Init will be aborted!", oStep.Name)
|
||||
Throw ex
|
||||
End If
|
||||
End Try
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
Public Class ClassWin32
|
||||
Public Const ULW_COLORKEY As Int32 = &H1
|
||||
Public Const ULW_ALPHA As Int32 = &H2
|
||||
Public Const ULW_OPAQUE As Int32 = &H4
|
||||
Public Const AC_SRC_OVER As Byte = &H0
|
||||
Public Const AC_SRC_ALPHA As Byte = &H1
|
||||
|
||||
Public Const WM_NCLBUTTONDOWN As Integer = &HA1
|
||||
Public Const HTCAPTION As Integer = &H2
|
||||
|
||||
Public Const WM_DRAWCLIPBOARD As Integer = &H308
|
||||
|
||||
Public Enum Bool
|
||||
[False] = 0
|
||||
[True]
|
||||
End Enum
|
||||
|
||||
<StructLayout(LayoutKind.Sequential)>
|
||||
Public Structure WINDOWPOS
|
||||
Public hwnd As IntPtr
|
||||
Public hwndInsertAfter As IntPtr
|
||||
Public x As Integer
|
||||
Public y As Integer
|
||||
Public cx As Integer
|
||||
Public cy As Integer
|
||||
Public flags As Integer
|
||||
End Structure
|
||||
|
||||
<StructLayout(LayoutKind.Sequential)>
|
||||
Public Structure Point
|
||||
Public x As Int32
|
||||
Public y As Int32
|
||||
|
||||
Public Sub New(ByVal x As Int32, ByVal y As Int32)
|
||||
Me.x = x
|
||||
Me.y = y
|
||||
End Sub
|
||||
End Structure
|
||||
|
||||
<StructLayout(LayoutKind.Sequential)>
|
||||
Public Structure Size
|
||||
Public cx As Int32
|
||||
Public cy As Int32
|
||||
|
||||
Public Sub New(ByVal cx As Int32, ByVal cy As Int32)
|
||||
Me.cx = cx
|
||||
Me.cy = cy
|
||||
End Sub
|
||||
End Structure
|
||||
|
||||
<StructLayout(LayoutKind.Sequential, Pack:=1)>
|
||||
Structure ARGB
|
||||
Public Blue As Byte
|
||||
Public Green As Byte
|
||||
Public Red As Byte
|
||||
Public Alpha As Byte
|
||||
End Structure
|
||||
|
||||
<StructLayout(LayoutKind.Sequential, Pack:=1)>
|
||||
Public Structure BLENDFUNCTION
|
||||
Public BlendOp As Byte
|
||||
Public BlendFlags As Byte
|
||||
Public SourceConstantAlpha As Byte
|
||||
Public AlphaFormat As Byte
|
||||
End Structure
|
||||
|
||||
<DllImport("user32.dll", ExactSpelling:=True, SetLastError:=True)>
|
||||
Public Shared Function UpdateLayeredWindow(ByVal hwnd As IntPtr, ByVal hdcDst As IntPtr, ByRef pptDst As Point, ByRef psize As Size, ByVal hdcSrc As IntPtr, ByRef pprSrc As Point, ByVal crKey As Int32, ByRef pblend As BLENDFUNCTION, ByVal dwFlags As Int32) As Bool
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", ExactSpelling:=True, SetLastError:=True)>
|
||||
Public Shared Function GetDC(ByVal hWnd As IntPtr) As IntPtr
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", ExactSpelling:=True)>
|
||||
Public Shared Function ReleaseDC(ByVal hWnd As IntPtr, ByVal hDC As IntPtr) As Integer
|
||||
End Function
|
||||
|
||||
<DllImport("gdi32.dll", ExactSpelling:=True, SetLastError:=True)>
|
||||
Public Shared Function CreateCompatibleDC(ByVal hDC As IntPtr) As IntPtr
|
||||
End Function
|
||||
|
||||
<DllImport("gdi32.dll", ExactSpelling:=True, SetLastError:=True)>
|
||||
Public Shared Function DeleteDC(ByVal hdc As IntPtr) As Bool
|
||||
End Function
|
||||
|
||||
<DllImport("gdi32.dll", ExactSpelling:=True)>
|
||||
Public Shared Function SelectObject(ByVal hDC As IntPtr, ByVal hObject As IntPtr) As IntPtr
|
||||
End Function
|
||||
|
||||
<DllImport("gdi32.dll", ExactSpelling:=True, SetLastError:=True)>
|
||||
Public Shared Function DeleteObject(ByVal hObject As IntPtr) As Bool
|
||||
End Function
|
||||
|
||||
<DllImport("User32.dll")>
|
||||
Public Shared Function ReleaseCapture() As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("User32.dll")>
|
||||
Public Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
|
||||
End Function
|
||||
|
||||
<DllImport("user32", EntryPoint:="AddClipboardFormatListener")>
|
||||
Public Shared Function AddClipboardFormatListener(ByVal hWnd As IntPtr) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("user32", EntryPoint:="RemoveClipboardFormatListener")>
|
||||
Public Shared Function RemoveClipboardFormatListener(ByVal hWnd As IntPtr) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("user32", EntryPoint:="SetClipboardViewer")>
|
||||
Public Shared Function SetClipboardViewer(ByVal hWnd As IntPtr) As IntPtr
|
||||
End Function
|
||||
End Class
|
||||
@@ -1,37 +1,52 @@
|
||||
Imports System.Xml
|
||||
Imports System.IO
|
||||
Imports DigitalData.Modules.Logging
|
||||
Public Class ClassWindowLocation
|
||||
Private _Logger As Logger
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
_Logger = LogConfig.GetLogger
|
||||
Public Class ClassWindowLayout
|
||||
Inherits Base.BaseClass
|
||||
|
||||
Private _FileName As String
|
||||
Private _Reader As XmlReader
|
||||
Private _Settings As XmlWriterSettings
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig)
|
||||
MyBase.New(pLogConfig)
|
||||
|
||||
_Settings = New XmlWriterSettings With {
|
||||
.Encoding = Text.Encoding.UTF8,
|
||||
.Indent = True
|
||||
}
|
||||
End Sub
|
||||
|
||||
Public Sub LoadFormLocationSize(ByRef form As Form, Optional LoadSize As Boolean = True)
|
||||
Public Sub LoadFormLocationSize(ByRef pForm As Form, Optional pLoadSize As Boolean = True)
|
||||
Try
|
||||
Dim _path, _pathold As String
|
||||
Dim oPath, oAlternatePath As String
|
||||
|
||||
oPath = Path.Combine(Application.UserAppDataPath(), pForm.Name & "-Layout.xml")
|
||||
oAlternatePath = oPath.Replace("frm", "frmfrm")
|
||||
If File.Exists(oAlternatePath) Then
|
||||
Dim oNewFilename = Path.GetFileName(oPath)
|
||||
|
||||
_path = Path.Combine(Application.UserAppDataPath(), form.Name & "-Layout.xml")
|
||||
_pathold = _path.Replace("frm", "frmfrm")
|
||||
If File.Exists(_pathold) Then
|
||||
Dim newfilename = Path.GetFileName(_path)
|
||||
Try
|
||||
My.Computer.FileSystem.RenameFile(_pathold, newfilename)
|
||||
My.Computer.FileSystem.RenameFile(oAlternatePath, oNewFilename)
|
||||
Catch ex As Exception
|
||||
My.Computer.FileSystem.DeleteFile(_pathold)
|
||||
Logger.Error(ex)
|
||||
My.Computer.FileSystem.DeleteFile(oAlternatePath)
|
||||
|
||||
End Try
|
||||
_path = Path.Combine(Application.UserAppDataPath(), form.Name & "-Layout.xml")
|
||||
|
||||
oPath = Path.Combine(Application.UserAppDataPath(), pForm.Name & "-Layout.xml")
|
||||
End If
|
||||
Dim layout As ClassLayout = New ClassLayout(_path)
|
||||
_FileName = oPath
|
||||
|
||||
Dim settings As System.Collections.Generic.List(Of ClassSetting)
|
||||
settings = layout.Load()
|
||||
settings = Load()
|
||||
|
||||
If settings.Count = 0 Then
|
||||
settings.Add(New ClassSetting("PositionX", form.Location.X))
|
||||
settings.Add(New ClassSetting("PositionY", form.Location.Y))
|
||||
settings.Add(New ClassSetting("Width", form.Size.Width))
|
||||
settings.Add(New ClassSetting("Height", form.Size.Height))
|
||||
layout.Save(settings)
|
||||
settings.Add(New ClassSetting("PositionX", pForm.Location.X))
|
||||
settings.Add(New ClassSetting("PositionY", pForm.Location.Y))
|
||||
settings.Add(New ClassSetting("Width", pForm.Size.Width))
|
||||
settings.Add(New ClassSetting("Height", pForm.Size.Height))
|
||||
Save(settings)
|
||||
End If
|
||||
Dim x, y, w, h As Integer
|
||||
For Each s As ClassSetting In settings
|
||||
@@ -50,16 +65,16 @@ Public Class ClassWindowLocation
|
||||
Dim screenWidth As Integer = Screen.PrimaryScreen.Bounds.Width
|
||||
Dim screenHeight As Integer = Screen.PrimaryScreen.Bounds.Height
|
||||
If x = 5000 Then
|
||||
form.WindowState = FormWindowState.Maximized
|
||||
pForm.WindowState = FormWindowState.Maximized
|
||||
Else
|
||||
|
||||
Dim rect As New Rectangle(x, y, 0, 0)
|
||||
If IsVisibleOnAnyScreen(rect) Then
|
||||
If x >= 0 And y >= 0 Then
|
||||
form.Location = New Point(x, y)
|
||||
pForm.Location = New Point(x, y)
|
||||
End If
|
||||
If w > 0 And h > 0 And LoadSize = True Then
|
||||
form.Size = New Size(w, h)
|
||||
If w > 0 And h > 0 And pLoadSize = True Then
|
||||
pForm.Size = New Size(w, h)
|
||||
End If
|
||||
End If
|
||||
' form.Size = New Size(310, 190)
|
||||
@@ -81,12 +96,12 @@ Public Class ClassWindowLocation
|
||||
End If
|
||||
Next
|
||||
If result = False Then
|
||||
_Logger.Info(">> Saved layout is not fitting to Resolution. Default is loaded.")
|
||||
Logger.Info(">> Saved layout is not fitting to Resolution. Default is loaded.")
|
||||
End If
|
||||
Return result
|
||||
Catch ex As Exception
|
||||
_Logger.Info("Error in IsVisibleOnAnyScreen: " & ex.Message)
|
||||
_Logger.Error(ex.Message)
|
||||
Logger.Info("Error in IsVisibleOnAnyScreen: " & ex.Message)
|
||||
Logger.Error(ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -120,7 +135,7 @@ Public Class ClassWindowLocation
|
||||
settings.Add(New ClassSetting("Width", width))
|
||||
settings.Add(New ClassSetting("Height", height))
|
||||
|
||||
layout.Save(settings)
|
||||
Save(settings)
|
||||
Catch notFoundEx As System.IO.FileNotFoundException
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -129,77 +144,79 @@ Public Class ClassWindowLocation
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
'-------------------------------------------------------------------
|
||||
|
||||
Public Class ClassSetting
|
||||
Public _name As String
|
||||
Public _value As Integer
|
||||
|
||||
Public Sub New(name As String, value As Integer)
|
||||
_name = name
|
||||
_value = value
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Public Class ClassLayout
|
||||
Private _filename As String
|
||||
Private _reader As XmlReader
|
||||
Private _settings As XmlWriterSettings
|
||||
|
||||
Public Sub New(filename As String)
|
||||
_filename = filename
|
||||
|
||||
_settings = New XmlWriterSettings()
|
||||
_settings.Encoding = System.Text.Encoding.UTF8
|
||||
_settings.Indent = True
|
||||
End Sub
|
||||
|
||||
Public Sub Save(settings As System.Collections.Generic.List(Of ClassSetting))
|
||||
Dim w = XmlTextWriter.Create(_filename, _settings)
|
||||
Try
|
||||
Dim w = XmlWriter.Create(_FileName, _Settings)
|
||||
|
||||
w.WriteStartDocument()
|
||||
w.WriteStartElement("Settings")
|
||||
w.WriteStartDocument()
|
||||
w.WriteStartElement("Settings")
|
||||
|
||||
For Each setting As ClassSetting In settings
|
||||
w.WriteStartElement("Setting")
|
||||
w.WriteAttributeString("name", setting._name)
|
||||
w.WriteAttributeString("value", setting._value.ToString())
|
||||
w.WriteEndElement()
|
||||
Next
|
||||
|
||||
For Each setting As ClassSetting In settings
|
||||
w.WriteStartElement("Setting")
|
||||
w.WriteAttributeString("name", setting._name)
|
||||
w.WriteAttributeString("value", setting._value.ToString())
|
||||
w.WriteEndElement()
|
||||
Next
|
||||
w.WriteEndDocument()
|
||||
|
||||
w.WriteEndElement()
|
||||
w.WriteEndDocument()
|
||||
|
||||
w.Dispose()
|
||||
w.Close()
|
||||
w.Dispose()
|
||||
w.Close()
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Function Load() As System.Collections.Generic.List(Of ClassSetting)
|
||||
Dim Result As System.Collections.Generic.List(Of ClassSetting) = New System.Collections.Generic.List(Of ClassSetting)()
|
||||
Public Function Load() As List(Of ClassSetting)
|
||||
Dim Result As List(Of ClassSetting) = New List(Of ClassSetting)()
|
||||
|
||||
If Not File.Exists(_filename) Then
|
||||
If Not File.Exists(_FileName) Then
|
||||
Return Result
|
||||
End If
|
||||
|
||||
_reader = XmlReader.Create(_filename)
|
||||
_Reader = XmlReader.Create(_FileName)
|
||||
|
||||
While _reader.Read()
|
||||
If _reader.IsStartElement() Then
|
||||
If _reader.Name = "Setting" Then
|
||||
Dim name As String = _reader("name")
|
||||
Dim value As Integer = Integer.Parse(_reader("value"))
|
||||
While _Reader.Read()
|
||||
If _Reader.IsStartElement() Then
|
||||
If _Reader.Name = "Setting" Then
|
||||
Dim name As String = _Reader("name")
|
||||
Dim value As Integer = Integer.Parse(_Reader("value"))
|
||||
Dim setting As ClassSetting = New ClassSetting(name, value)
|
||||
Result.Add(setting)
|
||||
End If
|
||||
End If
|
||||
End While
|
||||
|
||||
_reader.Dispose()
|
||||
_reader.Close()
|
||||
_Reader.Dispose()
|
||||
_Reader.Close()
|
||||
|
||||
Return Result
|
||||
End Function
|
||||
|
||||
Public Class ClassSetting
|
||||
Public _name As String
|
||||
Public _value As Integer
|
||||
|
||||
Public Sub New(name As String, value As Integer)
|
||||
_name = name
|
||||
_value = value
|
||||
End Sub
|
||||
End Class
|
||||
End Class
|
||||
|
||||
|
||||
'-------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
Public Class ClassLayout
|
||||
|
||||
|
||||
Public Sub New(filename As String)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports DigitalData.Modules.Windows
|
||||
|
||||
Namespace ClipboardWatcher
|
||||
Public Class Watcher
|
||||
@@ -12,12 +13,12 @@ Namespace ClipboardWatcher
|
||||
|
||||
Private Sub New()
|
||||
MyBase.CreateHandle(New CreateParams)
|
||||
_Handle = ClassWin32.SetClipboardViewer(Handle)
|
||||
_Handle = NativeMethods.SetClipboardViewer(Handle)
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub WndProc(ByRef m As Message)
|
||||
Select Case m.Msg
|
||||
Case ClassWin32.WM_DRAWCLIPBOARD
|
||||
Case NativeMethods.WM_DRAWCLIPBOARD
|
||||
Dim oData As IDataObject = Clipboard.GetDataObject
|
||||
RaiseEvent ClipboardChanged(Me, oData)
|
||||
End Select
|
||||
@@ -38,7 +39,7 @@ Namespace ClipboardWatcher
|
||||
' aufgerufen werden
|
||||
End If
|
||||
MyBase.DestroyHandle()
|
||||
Dim H As IntPtr = ClassWin32.SetClipboardViewer(_Handle)
|
||||
Dim H As IntPtr = NativeMethods.SetClipboardViewer(_Handle)
|
||||
End If
|
||||
_DisposedValue = True
|
||||
End Sub
|
||||
|
||||
@@ -34,7 +34,7 @@ Public Class frmGlobix_Index
|
||||
Private _LogConfig As LogConfig
|
||||
Private _Logger As Logger
|
||||
|
||||
Private clswindowLocation As ClassWindowLocation
|
||||
Private clswindowLocation As ClassWindowLayout
|
||||
Private clsPatterns As GlobixPatterns
|
||||
Private clsPostProcessing As GlobixPostprocessing
|
||||
Private _DataASorDB As ClassDataASorDB
|
||||
@@ -66,7 +66,7 @@ Public Class frmGlobix_Index
|
||||
_Logger = LogConfig.GetLogger()
|
||||
_LogConfig = LogConfig
|
||||
_DataASorDB = New ClassDataASorDB(LogConfig)
|
||||
clswindowLocation = New ClassWindowLocation(LogConfig)
|
||||
clswindowLocation = New ClassWindowLayout(LogConfig)
|
||||
clsPatterns = New GlobixPatterns(LogConfig)
|
||||
clsPostProcessing = New GlobixPostprocessing(LogConfig)
|
||||
_idbdata = New ClassIDBData(LogConfig)
|
||||
|
||||
171
GUIs.ZooFlow/Search/XtraForm1.Designer.vb
generated
Normal file
171
GUIs.ZooFlow/Search/XtraForm1.Designer.vb
generated
Normal file
@@ -0,0 +1,171 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class XtraForm1
|
||||
Inherits DevExpress.XtraEditors.XtraForm
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.SearchControl2 = New DevExpress.XtraEditors.TokenEdit()
|
||||
Me.ComboBoxEdit1 = New DevExpress.XtraEditors.ComboBoxEdit()
|
||||
Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl()
|
||||
Me.SidePanel1 = New DevExpress.XtraEditors.SidePanel()
|
||||
Me.NavBarControl1 = New DevExpress.XtraNavBar.NavBarControl()
|
||||
Me.NavBarGroup1 = New DevExpress.XtraNavBar.NavBarGroup()
|
||||
Me.NavBarItem1 = New DevExpress.XtraNavBar.NavBarItem()
|
||||
Me.NavBarItem2 = New DevExpress.XtraNavBar.NavBarItem()
|
||||
Me.NavBarItem3 = New DevExpress.XtraNavBar.NavBarItem()
|
||||
Me.NavBarGroup2 = New DevExpress.XtraNavBar.NavBarGroup()
|
||||
Me.NavBarGroup3 = New DevExpress.XtraNavBar.NavBarGroup()
|
||||
CType(Me.SearchControl2.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.ComboBoxEdit1.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.PanelControl1.SuspendLayout()
|
||||
Me.SidePanel1.SuspendLayout()
|
||||
CType(Me.NavBarControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'SearchControl2
|
||||
'
|
||||
Me.SearchControl2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.SearchControl2.Location = New System.Drawing.Point(227, 5)
|
||||
Me.SearchControl2.Name = "SearchControl2"
|
||||
Me.SearchControl2.Properties.Appearance.BackColor = System.Drawing.Color.Transparent
|
||||
Me.SearchControl2.Properties.Appearance.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.SearchControl2.Properties.Appearance.Options.UseBackColor = True
|
||||
Me.SearchControl2.Properties.Appearance.Options.UseFont = True
|
||||
Me.SearchControl2.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple
|
||||
Me.SearchControl2.Properties.EditMode = DevExpress.XtraEditors.TokenEditMode.Manual
|
||||
Me.SearchControl2.Properties.PopupFilterMode = DevExpress.XtraEditors.TokenEditPopupFilterMode.Contains
|
||||
Me.SearchControl2.Properties.Separators.AddRange(New String() {",", "-", "ODER", "OR", "AND", "UND"})
|
||||
Me.SearchControl2.Size = New System.Drawing.Size(894, 44)
|
||||
Me.SearchControl2.TabIndex = 0
|
||||
'
|
||||
'ComboBoxEdit1
|
||||
'
|
||||
Me.ComboBoxEdit1.Location = New System.Drawing.Point(5, 5)
|
||||
Me.ComboBoxEdit1.Name = "ComboBoxEdit1"
|
||||
Me.ComboBoxEdit1.Properties.Appearance.BackColor = System.Drawing.Color.Transparent
|
||||
Me.ComboBoxEdit1.Properties.Appearance.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.ComboBoxEdit1.Properties.Appearance.Options.UseBackColor = True
|
||||
Me.ComboBoxEdit1.Properties.Appearance.Options.UseFont = True
|
||||
Me.ComboBoxEdit1.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple
|
||||
Me.ComboBoxEdit1.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
|
||||
Me.ComboBoxEdit1.Properties.Items.AddRange(New Object() {"Alle", "Belege", "Rechnungen", "Lieferscheine", "Aufträge", "Angebote", "Kunde Schaum", "Kunde medacom"})
|
||||
Me.ComboBoxEdit1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor
|
||||
Me.ComboBoxEdit1.Size = New System.Drawing.Size(223, 44)
|
||||
Me.ComboBoxEdit1.TabIndex = 1
|
||||
'
|
||||
'PanelControl1
|
||||
'
|
||||
Me.PanelControl1.AutoSize = True
|
||||
Me.PanelControl1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
|
||||
Me.PanelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder
|
||||
Me.PanelControl1.Controls.Add(Me.ComboBoxEdit1)
|
||||
Me.PanelControl1.Controls.Add(Me.SearchControl2)
|
||||
Me.PanelControl1.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.PanelControl1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.PanelControl1.Name = "PanelControl1"
|
||||
Me.PanelControl1.Size = New System.Drawing.Size(1126, 52)
|
||||
Me.PanelControl1.TabIndex = 2
|
||||
'
|
||||
'SidePanel1
|
||||
'
|
||||
Me.SidePanel1.Controls.Add(Me.NavBarControl1)
|
||||
Me.SidePanel1.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.SidePanel1.Location = New System.Drawing.Point(0, 52)
|
||||
Me.SidePanel1.Name = "SidePanel1"
|
||||
Me.SidePanel1.Size = New System.Drawing.Size(228, 566)
|
||||
Me.SidePanel1.TabIndex = 3
|
||||
Me.SidePanel1.Text = "SidePanel1"
|
||||
'
|
||||
'NavBarControl1
|
||||
'
|
||||
Me.NavBarControl1.ActiveGroup = Me.NavBarGroup1
|
||||
Me.NavBarControl1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.NavBarControl1.Groups.AddRange(New DevExpress.XtraNavBar.NavBarGroup() {Me.NavBarGroup1, Me.NavBarGroup2, Me.NavBarGroup3})
|
||||
Me.NavBarControl1.Items.AddRange(New DevExpress.XtraNavBar.NavBarItem() {Me.NavBarItem1, Me.NavBarItem2, Me.NavBarItem3})
|
||||
Me.NavBarControl1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.NavBarControl1.Name = "NavBarControl1"
|
||||
Me.NavBarControl1.OptionsNavPane.ExpandedWidth = 227
|
||||
Me.NavBarControl1.Size = New System.Drawing.Size(227, 566)
|
||||
Me.NavBarControl1.TabIndex = 0
|
||||
Me.NavBarControl1.Text = "NavBarControl1"
|
||||
'
|
||||
'NavBarGroup1
|
||||
'
|
||||
Me.NavBarGroup1.Caption = "NavBarGroup1"
|
||||
Me.NavBarGroup1.Expanded = True
|
||||
Me.NavBarGroup1.ItemLinks.AddRange(New DevExpress.XtraNavBar.NavBarItemLink() {New DevExpress.XtraNavBar.NavBarItemLink(Me.NavBarItem1), New DevExpress.XtraNavBar.NavBarItemLink(Me.NavBarItem2), New DevExpress.XtraNavBar.NavBarItemLink(Me.NavBarItem3)})
|
||||
Me.NavBarGroup1.Name = "NavBarGroup1"
|
||||
'
|
||||
'NavBarItem1
|
||||
'
|
||||
Me.NavBarItem1.Caption = "NavBarItem1"
|
||||
Me.NavBarItem1.Name = "NavBarItem1"
|
||||
'
|
||||
'NavBarItem2
|
||||
'
|
||||
Me.NavBarItem2.Caption = "NavBarItem2"
|
||||
Me.NavBarItem2.Name = "NavBarItem2"
|
||||
'
|
||||
'NavBarItem3
|
||||
'
|
||||
Me.NavBarItem3.Caption = "NavBarItem3"
|
||||
Me.NavBarItem3.Name = "NavBarItem3"
|
||||
'
|
||||
'NavBarGroup2
|
||||
'
|
||||
Me.NavBarGroup2.Caption = "NavBarGroup2"
|
||||
Me.NavBarGroup2.Name = "NavBarGroup2"
|
||||
'
|
||||
'NavBarGroup3
|
||||
'
|
||||
Me.NavBarGroup3.Caption = "NavBarGroup3"
|
||||
Me.NavBarGroup3.Name = "NavBarGroup3"
|
||||
'
|
||||
'XtraForm1
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(1126, 618)
|
||||
Me.Controls.Add(Me.SidePanel1)
|
||||
Me.Controls.Add(Me.PanelControl1)
|
||||
Me.Name = "XtraForm1"
|
||||
Me.Text = "XtraForm1"
|
||||
CType(Me.SearchControl2.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.ComboBoxEdit1.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.PanelControl1.ResumeLayout(False)
|
||||
Me.SidePanel1.ResumeLayout(False)
|
||||
CType(Me.NavBarControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents SearchControl2 As DevExpress.XtraEditors.TokenEdit
|
||||
Friend WithEvents ComboBoxEdit1 As DevExpress.XtraEditors.ComboBoxEdit
|
||||
Friend WithEvents PanelControl1 As DevExpress.XtraEditors.PanelControl
|
||||
Friend WithEvents SidePanel1 As DevExpress.XtraEditors.SidePanel
|
||||
Friend WithEvents NavBarControl1 As DevExpress.XtraNavBar.NavBarControl
|
||||
Friend WithEvents NavBarGroup1 As DevExpress.XtraNavBar.NavBarGroup
|
||||
Friend WithEvents NavBarItem1 As DevExpress.XtraNavBar.NavBarItem
|
||||
Friend WithEvents NavBarItem2 As DevExpress.XtraNavBar.NavBarItem
|
||||
Friend WithEvents NavBarItem3 As DevExpress.XtraNavBar.NavBarItem
|
||||
Friend WithEvents NavBarGroup2 As DevExpress.XtraNavBar.NavBarGroup
|
||||
Friend WithEvents NavBarGroup3 As DevExpress.XtraNavBar.NavBarGroup
|
||||
End Class
|
||||
120
GUIs.ZooFlow/Search/XtraForm1.resx
Normal file
120
GUIs.ZooFlow/Search/XtraForm1.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
138
GUIs.ZooFlow/Search/XtraForm1.vb
Normal file
138
GUIs.ZooFlow/Search/XtraForm1.vb
Normal file
@@ -0,0 +1,138 @@
|
||||
Imports DevExpress.Utils
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraEditors.Repository
|
||||
|
||||
Public Class XtraForm1
|
||||
Private ReadOnly TokenListAttributes As New Dictionary(Of String, Object) From {
|
||||
{"Rechnungsnummer", New AttributeToken(7411)},
|
||||
{"Rechnungsdatum", New AttributeToken(7412)},
|
||||
{"Kundennummer", New AttributeToken(7413)}
|
||||
}
|
||||
|
||||
Private ReadOnly TokenListAttrValues As New Dictionary(Of String, Object) From {
|
||||
{"{1233}", New AttributeValueToken(1233)},
|
||||
{"{1234}", New AttributeValueToken(1234)},
|
||||
{"{1235}", New AttributeValueToken(1235)}
|
||||
}
|
||||
|
||||
Private ReadOnly TokenListDate As New Dictionary(Of String, Object) From {
|
||||
{"heute", New DateToken(Date.Now)},
|
||||
{"gestern", New DateToken(Date.Now.AddDays(-1))},
|
||||
{"letzte Woche", New DateToken(TimeSpan.FromDays(-7))},
|
||||
{"letzter Monat", New DateToken(TimeSpan.FromDays(-30))}
|
||||
}
|
||||
|
||||
Private TokenListDefault As Dictionary(Of String, Object)
|
||||
Private TokenListAll As Dictionary(Of String, Object)
|
||||
|
||||
Private Sub XtraForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
Dim TokenList As New Dictionary(Of String, Object)
|
||||
TokenListAll = TokenList.
|
||||
Concat(TokenListAttributes).
|
||||
Concat(TokenListAttrValues).
|
||||
Concat(TokenListDate).
|
||||
ToDictionary(Function(a) a.Key, Function(a) a.Value)
|
||||
|
||||
TokenListDefault = TokenList.
|
||||
Concat(TokenListAttributes).
|
||||
Concat(TokenListDate).
|
||||
ToDictionary(Function(a) a.Key, Function(a) a.Value)
|
||||
|
||||
AddTokens(SearchControl2, TokenListDefault)
|
||||
|
||||
ComboBoxEdit1.SelectedIndex = 0
|
||||
End Sub
|
||||
|
||||
Public Enum [ValueType]
|
||||
AttributeName
|
||||
AttributeValue
|
||||
End Enum
|
||||
|
||||
Public Enum [InputMode]
|
||||
[Default]
|
||||
Value
|
||||
End Enum
|
||||
|
||||
Public Class TokenValue
|
||||
Public Value As Object
|
||||
Public Type As [ValueType]
|
||||
|
||||
Public Overrides Function ToString() As String
|
||||
Return Value.ToString()
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Public Class AttributeToken
|
||||
Inherits TokenValue
|
||||
|
||||
Public Sub New(pValue As Object)
|
||||
Value = pValue
|
||||
Type = ValueType.AttributeName
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Public Class AttributeValueToken
|
||||
Inherits TokenValue
|
||||
|
||||
Public Sub New(pValue As Object)
|
||||
Value = pValue
|
||||
Type = ValueType.AttributeValue
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Public Class DateToken
|
||||
Inherits TokenValue
|
||||
|
||||
Public Sub New(pValue As Object)
|
||||
Value = pValue
|
||||
Type = ValueType.AttributeValue
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
Private Sub AddTokens(Editor As TokenEdit, Tokens As Dictionary(Of String, Object))
|
||||
For Each oToken In Tokens
|
||||
Editor.Properties.Tokens.Add(New DevExpress.XtraEditors.TokenEditToken With {
|
||||
.Description = oToken.Key,
|
||||
.Value = oToken.Value
|
||||
})
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub SearchControl2_Properties_TokenAdded(sender As Object, e As DevExpress.XtraEditors.TokenEditTokenAddedEventArgs) Handles SearchControl2.Properties.TokenAdded
|
||||
Dim oEditor As TokenEdit = sender
|
||||
SetNewTokens(oEditor)
|
||||
End Sub
|
||||
|
||||
Private Sub SearchControl2_Properties_TokenRemoved(sender As Object, e As TokenEditTokenRemovedEventArgs) Handles SearchControl2.Properties.TokenRemoved
|
||||
Dim oEditor As TokenEdit = sender
|
||||
SetNewTokens(oEditor)
|
||||
End Sub
|
||||
|
||||
Private Sub SetNewTokens(pEditor As TokenEdit)
|
||||
Dim oLastToken = pEditor.GetTokenList().LastOrDefault()
|
||||
pEditor.Properties.BeginUpdate()
|
||||
|
||||
If oLastToken IsNot Nothing Then
|
||||
pEditor.Properties.Tokens.Clear()
|
||||
|
||||
Select Case oLastToken.Value.GetType
|
||||
Case GetType(AttributeToken)
|
||||
AddTokens(pEditor, TokenListAttrValues)
|
||||
|
||||
Case GetType(AttributeValueToken)
|
||||
AddTokens(pEditor, TokenListAll)
|
||||
|
||||
Case Else
|
||||
AddTokens(pEditor, TokenListDefault)
|
||||
|
||||
End Select
|
||||
|
||||
pEditor.Properties.EndUpdate()
|
||||
Else
|
||||
pEditor.Properties.Tokens.Clear()
|
||||
AddTokens(pEditor, TokenListDefault)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -245,8 +245,7 @@
|
||||
<Compile Include="Globix\ClassFileDrop.vb" />
|
||||
<Compile Include="Globix\ClassFilehandle.vb" />
|
||||
<Compile Include="ClassInit.vb" />
|
||||
<Compile Include="ClassLayout.vb" />
|
||||
<Compile Include="ClassWin32.vb" />
|
||||
<Compile Include="ClassWindowLayout.vb" />
|
||||
<Compile Include="ClipboardWatcher\State.vb" />
|
||||
<Compile Include="ClassIDBData.vb" />
|
||||
<Compile Include="DSIDB_Stammdaten.Designer.vb">
|
||||
|
||||
@@ -104,9 +104,8 @@ Public Class frmFlowForm
|
||||
|
||||
Try
|
||||
' Marshal the LPARAM value which is a WINDOWPOS struct
|
||||
Dim NewPosition As New ClassWin32.WINDOWPOS
|
||||
NewPosition = CType(Marshal.PtrToStructure(
|
||||
LParam, GetType(ClassWin32.WINDOWPOS)), ClassWin32.WINDOWPOS)
|
||||
Dim NewPosition As New NativeMethods.WINDOWPOS
|
||||
NewPosition = CType(Marshal.PtrToStructure(LParam, GetType(NativeMethods.WINDOWPOS)), NativeMethods.WINDOWPOS)
|
||||
|
||||
If NewPosition.y = 0 OrElse NewPosition.x = 0 Then
|
||||
Return ' Nothing to do!
|
||||
@@ -372,8 +371,8 @@ Public Class frmFlowForm
|
||||
|
||||
Private Sub frmFlowForm_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Me.MouseMove, PictureBoxDragDrop.MouseMove
|
||||
If e.Button = MouseButtons.Left Then
|
||||
ClassWin32.ReleaseCapture()
|
||||
ClassWin32.SendMessage(Handle, ClassWin32.WM_NCLBUTTONDOWN, ClassWin32.HTCAPTION, 0)
|
||||
NativeMethods.ReleaseCapture()
|
||||
NativeMethods.SendMessage(Handle, NativeMethods.WM_NCLBUTTONDOWN, NativeMethods.HTCAPTION, 0)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -4,16 +4,21 @@ Imports System.Text
|
||||
Public Class NativeMethods
|
||||
Public Declare Function GetWindowTextLength Lib "user32.dll" Alias "GetWindowTextLengthA" (ByVal hwnd As Int32) As Integer
|
||||
Public Declare Function GetWindowText Lib "user32.dll" Alias "GetWindowTextA" (ByVal hWnd As IntPtr, ByVal WinTitle As String, ByVal MaxLength As Integer) As Integer
|
||||
|
||||
<DllImport("Shell32", CharSet:=CharSet.Auto, SetLastError:=True)>
|
||||
Public Shared Function ShellExecuteEx(ByRef lpExecInfo As ShellExecuteInfo) As Boolean
|
||||
End Function
|
||||
<DllImport("user32", EntryPoint:="SetClipboardViewer")>
|
||||
Public Shared Function SetClipboardViewer(ByVal hWnd As IntPtr) As IntPtr
|
||||
End Function
|
||||
<DllImport("user32.dll")>
|
||||
Public Shared Function GetDC(ByVal hwnd As IntPtr) As IntPtr
|
||||
End Function
|
||||
<DllImport("user32.dll")>
|
||||
Public Shared Function ReleaseDC(ByVal hwnd As IntPtr, ByVal hdc As IntPtr) As IntPtr
|
||||
End Function
|
||||
<DllImport("User32.dll")>
|
||||
Public Shared Function ReleaseCapture() As Boolean
|
||||
End Function
|
||||
<DllImport("user32.dll")>
|
||||
Public Shared Function GetWindowRect(ByVal hWnd As HandleRef, ByRef lpRect As RectangleAPI) As Boolean
|
||||
End Function
|
||||
@@ -101,6 +106,7 @@ Public Class NativeMethods
|
||||
Public Declare Function GlobalDeleteAtom Lib "kernel32" (ByVal Atom As Short) As Short
|
||||
|
||||
Public Const STANDARD_RIGHTS_REQUIRED As Integer = &HF0000
|
||||
|
||||
Public Const SECTION_QUERY As Short = &H1
|
||||
Public Const SECTION_MAP_WRITE As Short = &H2
|
||||
Public Const SECTION_MAP_READ As Short = &H4
|
||||
@@ -108,10 +114,12 @@ Public Class NativeMethods
|
||||
Public Const SECTION_EXTEND_SIZE As Short = &H10
|
||||
Public Const SECTION_ALL_ACCESS As Integer = STANDARD_RIGHTS_REQUIRED Or SECTION_QUERY Or SECTION_MAP_WRITE Or SECTION_MAP_READ Or SECTION_MAP_EXECUTE Or SECTION_EXTEND_SIZE
|
||||
Public Const FILE_MAP_ALL_ACCESS As Integer = SECTION_ALL_ACCESS
|
||||
|
||||
Public Const PROCESS_VM_OPERATION As Short = &H8
|
||||
Public Const PROCESS_VM_READ As Short = &H10
|
||||
Public Const PROCESS_VM_WRITE As Short = &H20
|
||||
Public Const PROCESS_ALL_ACCESS As Long = &H1F0FFF
|
||||
|
||||
Public Const MEM_COMMIT As Short = &H1000
|
||||
Public Const MEM_RESERVE As Short = &H2000
|
||||
Public Const MEM_DECOMMIT As Short = &H4000
|
||||
@@ -120,12 +128,26 @@ Public Class NativeMethods
|
||||
Public Const MEM_PRIVATE As Integer = &H20000
|
||||
Public Const MEM_MAPPED As Integer = &H40000
|
||||
Public Const MEM_TOP_DOWN As Integer = &H100000
|
||||
|
||||
Public Const INVALID_HANDLE_VALUE As Integer = -1
|
||||
Public Const SW_SHOW As Short = 5
|
||||
|
||||
Public Const SEE_MASK_INVOKEIDLIST = &HC
|
||||
Public Const SEE_MASK_NOCLOSEPROCESS = &H40
|
||||
Public Const SEE_MASK_FLAG_NO_UI = &H400
|
||||
|
||||
Public Const ULW_COLORKEY As Integer = &H1
|
||||
Public Const ULW_ALPHA As Integer = &H2
|
||||
Public Const ULW_OPAQUE As Integer = &H4
|
||||
|
||||
Public Const AC_SRC_OVER As Byte = &H0
|
||||
Public Const AC_SRC_ALPHA As Byte = &H1
|
||||
|
||||
Public Const HTCAPTION As Integer = &H2
|
||||
|
||||
Public Const WM_NCLBUTTONDOWN As Integer = &HA1
|
||||
Public Const WM_HOTKEY As Integer = &H312
|
||||
Public Const WM_DRAWCLIPBOARD As Integer = &H308
|
||||
|
||||
Public Enum PageProtection As UInteger
|
||||
NoAccess = &H1
|
||||
@@ -148,6 +170,17 @@ Public Class NativeMethods
|
||||
CWP_SKIPTRANSPARENT
|
||||
End Enum
|
||||
|
||||
<StructLayout(LayoutKind.Sequential)>
|
||||
Public Structure WINDOWPOS
|
||||
Public hwnd As IntPtr
|
||||
Public hwndInsertAfter As IntPtr
|
||||
Public x As Integer
|
||||
Public y As Integer
|
||||
Public cx As Integer
|
||||
Public cy As Integer
|
||||
Public flags As Integer
|
||||
End Structure
|
||||
|
||||
Public Structure RectangleAPI
|
||||
Public Left As Integer
|
||||
Public Top As Integer
|
||||
|
||||
Reference in New Issue
Block a user