monster commit for zoo flow, prepare migration of cw
This commit is contained in:
@@ -43,9 +43,25 @@
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevExpress.Data.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.Printing.v18.1.Core, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.Sparkline.v18.1.Core, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.Utils.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.Linq" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -91,6 +107,7 @@
|
||||
<EmbeddedResource Include="frmMatch.resx">
|
||||
<DependentUpon>frmMatch.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\licenses.licx" />
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
@@ -108,6 +125,7 @@
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Modules.Config\Config.vbproj">
|
||||
@@ -118,14 +136,22 @@
|
||||
<Project>{eaf0ea75-5fa7-485d-89c7-b2d843b03a96}</Project>
|
||||
<Name>Database</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Modules.Language\Language.vbproj">
|
||||
<Project>{d3c8cfed-d6f6-43a8-9bdf-454145d0352f}</Project>
|
||||
<Name>Language</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Modules.Logging\Logging.vbproj">
|
||||
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
|
||||
<Name>Logging</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ZooFlow\ZooFlow.vbproj">
|
||||
<Project>{D0FB36EB-783D-40E1-B71E-A0B84B2FE567}</Project>
|
||||
<ProjectReference Include="..\Modules\ZooFlow\ZooFlow.vbproj">
|
||||
<Project>{81cac44f-3711-4c8f-ae98-e02a7448782a}</Project>
|
||||
<Name>ZooFlow</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Windows\Windows.vbproj">
|
||||
<Project>{5EFAEF9B-90B9-4F05-9F70-F79AD77FFF86}</Project>
|
||||
<Name>Windows</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
1
Products.ClipboardWatcher/My Project/licenses.licx
Normal file
1
Products.ClipboardWatcher/My Project/licenses.licx
Normal file
@@ -0,0 +1 @@
|
||||
DevExpress.XtraEditors.TileControl, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
62
Products.ClipboardWatcher/frmMatch.Designer.vb
generated
62
Products.ClipboardWatcher/frmMatch.Designer.vb
generated
@@ -22,16 +22,78 @@ Partial Class frmMatch
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.TileControlMatch = New DevExpress.XtraEditors.TileControl()
|
||||
Me.TileGroupDocumentsData = New DevExpress.XtraEditors.TileGroup()
|
||||
Me.TileGroupDocuments = New DevExpress.XtraEditors.TileGroup()
|
||||
Me.TileGroupData = New DevExpress.XtraEditors.TileGroup()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'TileControlMatch
|
||||
'
|
||||
Me.TileControlMatch.AllowDragTilesBetweenGroups = False
|
||||
Me.TileControlMatch.AppearanceGroupText.BackColor = System.Drawing.Color.Transparent
|
||||
Me.TileControlMatch.AppearanceGroupText.Font = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.TileControlMatch.AppearanceGroupText.ForeColor = System.Drawing.Color.White
|
||||
Me.TileControlMatch.AppearanceGroupText.Options.UseBackColor = True
|
||||
Me.TileControlMatch.AppearanceGroupText.Options.UseFont = True
|
||||
Me.TileControlMatch.AppearanceGroupText.Options.UseForeColor = True
|
||||
Me.TileControlMatch.BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
|
||||
Me.TileControlMatch.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TileControlMatch.Groups.Add(Me.TileGroupDocumentsData)
|
||||
Me.TileControlMatch.Groups.Add(Me.TileGroupDocuments)
|
||||
Me.TileControlMatch.Groups.Add(Me.TileGroupData)
|
||||
Me.TileControlMatch.Location = New System.Drawing.Point(0, 0)
|
||||
Me.TileControlMatch.Name = "TileControlMatch"
|
||||
Me.TileControlMatch.ShowGroupText = True
|
||||
Me.TileControlMatch.Size = New System.Drawing.Size(800, 450)
|
||||
Me.TileControlMatch.TabIndex = 0
|
||||
Me.TileControlMatch.Text = "TileControl1"
|
||||
'
|
||||
'TileGroupDocumentsData
|
||||
'
|
||||
Me.TileGroupDocumentsData.Name = "TileGroupDocumentsData"
|
||||
Me.TileGroupDocumentsData.Text = "Kombiniert"
|
||||
'
|
||||
'TileGroupDocuments
|
||||
'
|
||||
Me.TileGroupDocuments.Name = "TileGroupDocuments"
|
||||
Me.TileGroupDocuments.Text = "Dokumente"
|
||||
'
|
||||
'TileGroupData
|
||||
'
|
||||
Me.TileGroupData.Name = "TileGroupData"
|
||||
Me.TileGroupData.Text = "Daten"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
|
||||
Me.Label1.Font = New System.Drawing.Font("Segoe UI Semibold", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label1.ForeColor = System.Drawing.Color.White
|
||||
Me.Label1.Location = New System.Drawing.Point(12, 9)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(401, 21)
|
||||
Me.Label1.TabIndex = 1
|
||||
Me.Label1.Text = "Es wurde mehr als ein Match für Ihre Suche gefunden:"
|
||||
'
|
||||
'frmMatch
|
||||
'
|
||||
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.Label1)
|
||||
Me.Controls.Add(Me.TileControlMatch)
|
||||
Me.Name = "frmMatch"
|
||||
Me.Text = "frmMatch"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents TileControlMatch As DevExpress.XtraEditors.TileControl
|
||||
Friend WithEvents TileGroupDocumentsData As DevExpress.XtraEditors.TileGroup
|
||||
Friend WithEvents TileGroupDocuments As DevExpress.XtraEditors.TileGroup
|
||||
Friend WithEvents TileGroupData As DevExpress.XtraEditors.TileGroup
|
||||
Friend WithEvents Label1 As Windows.Forms.Label
|
||||
End Class
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports ZooFlow
|
||||
Imports System.Drawing
|
||||
Imports System.Windows.Forms
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Windows
|
||||
Imports DigitalData.Modules.ZooFlow
|
||||
Imports DigitalData.Modules.ZooFlow.Params
|
||||
|
||||
''' <summary>
|
||||
'''
|
||||
''' Selfcontained:
|
||||
@@ -16,15 +22,134 @@ Imports ZooFlow
|
||||
''' - Clipboard Content as String
|
||||
''' </summary>
|
||||
Public Class frmMatch
|
||||
Public Sub New(LogConfig As LogConfig, Environment As ClassEnvironment)
|
||||
Private _LogConfig As LogConfig
|
||||
Private _Logger As Logger
|
||||
Private _Environment As Environment
|
||||
Private _Params As ClipboardWatcherParams
|
||||
|
||||
Private PrimaryFont As New Font("Segoe UI", 12, FontStyle.Bold)
|
||||
Private SecondaryFont As New Font("Segoe UI", 10)
|
||||
|
||||
Private Const NO_COUNT_SQL As Integer = 99998
|
||||
Private Const INVALID_COUNT_SQL As Integer = 99999
|
||||
|
||||
Private Enum ProfileType
|
||||
ANY = 0
|
||||
DOCS_ONLY = 1
|
||||
DATA_ONLY = 2
|
||||
End Enum
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, Environment As Environment, Params As ClipboardWatcherParams)
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
|
||||
_LogConfig = LogConfig
|
||||
_Logger = LogConfig.GetLogger()
|
||||
_Environment = Environment
|
||||
_Params = Params
|
||||
End Sub
|
||||
|
||||
Private Sub frmMatch_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
Dim oCreatedTiles = CreateTiles()
|
||||
|
||||
If oCreatedTiles = -1 Then
|
||||
Exit Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Function CreateTiles() As Integer
|
||||
Try
|
||||
Dim oCreatedTiles As Integer = 0
|
||||
Dim oDocumentGroup = TileControlMatch.Groups.Item("TileGroupDocuments")
|
||||
Dim oDataGroup = TileControlMatch.Groups.Item("TileGroupData")
|
||||
Dim oDataDocumentsGroup = TileControlMatch.Groups.Item("TileGroupDocumentsData")
|
||||
|
||||
oDocumentGroup.Items.Clear()
|
||||
oDataGroup.Items.Clear()
|
||||
|
||||
For Each oProfile As ProfileData In _Params.MatchingProfiles
|
||||
If oProfile.ProfileType = ProfileType.ANY Then
|
||||
If oProfile.CountData > 0 And oProfile.CountDocs > 0 Then
|
||||
Dim oCountText = oProfile.CountData + oProfile.CountDocs
|
||||
Dim oItem = CreateTile(oProfile, $"{oCountText} Ergebnisse")
|
||||
oDataDocumentsGroup.Items.Add(oItem)
|
||||
oCreatedTiles += 1
|
||||
End If
|
||||
End If
|
||||
|
||||
If oProfile.ProfileType = ProfileType.ANY Or oProfile.ProfileType = ProfileType.DOCS_ONLY Then
|
||||
If oProfile.CountDocs > 0 Then
|
||||
Dim oItem = CreateTile(oProfile, $"{oProfile.CountDocs} Dokumente")
|
||||
oDocumentGroup.Items.Add(oItem)
|
||||
oCreatedTiles += 1
|
||||
End If
|
||||
End If
|
||||
|
||||
If oProfile.ProfileType = ProfileType.ANY Or oProfile.ProfileType = ProfileType.DATA_ONLY Then
|
||||
If oProfile.CountData > 0 Then
|
||||
Dim oItem = CreateTile(oProfile, $"{oProfile.CountData} Datensätze")
|
||||
oDataGroup.Items.Add(oItem)
|
||||
oCreatedTiles += 1
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Return oCreatedTiles
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
MsgBox("Error while creating profile tiles!" & vbNewLine & ex.Message)
|
||||
Return -1
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function CreateTile(Profile As ProfileData, CountText As String) As TileItem
|
||||
Dim oItem As New TileItem() With {.Tag = Profile.Guid}
|
||||
oItem.Elements.Clear()
|
||||
|
||||
Dim oNameElement = New TileItemElement With {
|
||||
.Text = Profile.Name,
|
||||
.TextAlignment = TileItemContentAlignment.TopLeft
|
||||
}
|
||||
oNameElement.Appearance.Normal.Font = PrimaryFont
|
||||
oItem.Elements.Add(oNameElement)
|
||||
|
||||
Dim oCommentElement = New TileItemElement With {
|
||||
.Text = Profile.Comment,
|
||||
.TextAlignment = TileItemContentAlignment.MiddleLeft
|
||||
}
|
||||
oCommentElement.Appearance.Normal.Font = SecondaryFont
|
||||
oItem.Elements.Add(oCommentElement)
|
||||
|
||||
Dim oCountElement = New TileItemElement With {
|
||||
.Text = GetCountText(Profile, CountText),
|
||||
.TextAlignment = TileItemContentAlignment.BottomRight
|
||||
}
|
||||
oCountElement.Appearance.Normal.Font = SecondaryFont
|
||||
oItem.Elements.Add(oCountElement)
|
||||
|
||||
Return oItem
|
||||
End Function
|
||||
|
||||
Private Function GetCountText(Profile As ProfileData, CountText As String) As String
|
||||
Dim oText As String = "No implemented"
|
||||
|
||||
If Profile.CountData = INVALID_COUNT_SQL Then
|
||||
oText = "Invalid SQL!"
|
||||
ElseIf Profile.CountData = NO_COUNT_SQL Then
|
||||
oText = "No SQL!"
|
||||
Else
|
||||
oText = CountText
|
||||
End If
|
||||
|
||||
If Profile.CountDocs = INVALID_COUNT_SQL Then
|
||||
oText = "Invalid SQL!"
|
||||
ElseIf Profile.CountDocs = NO_COUNT_SQL Then
|
||||
oText = "No SQL!"
|
||||
Else
|
||||
oText = CountText
|
||||
End If
|
||||
|
||||
Return oText
|
||||
End Function
|
||||
End Class
|
||||
|
||||
4
Products.ClipboardWatcher/packages.config
Normal file
4
Products.ClipboardWatcher/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user