ClipboardWatcher: corporate identity for frmMatch, show overal match and search results for frmTreeview
This commit is contained in:
@@ -33,6 +33,8 @@ Public Class ProfileFilter
|
||||
Public Const ERROR_EXECUTING_COUNT_SQL_FOR_DATA_SEARCH = "ERROR_EXECUTING_COUNT_SQL_FOR_DATA_SEARCH"
|
||||
Public Const ERROR_EXECUTING_COUNT_SQL_FOR_DOC_SEARCH = "ERROR_EXECUTING_COUNT_SQL_FOR_DOC_SEARCH"
|
||||
|
||||
Public Const NODE_ROOT = "ROOT"
|
||||
|
||||
Public Const PROCESS_NAME_CATCHALL = "_CATCHALL_"
|
||||
|
||||
Public ReadOnly Property Profiles As List(Of ProfileData)
|
||||
@@ -79,7 +81,7 @@ Public Class ProfileFilter
|
||||
|
||||
Dim oRootNode As TreeNode = New TreeNode() With {
|
||||
.Text = $"Suche nach '{ClipboardContents}'",
|
||||
.Tag = "ROOT",
|
||||
.Tag = NODE_ROOT,
|
||||
.ImageIndex = ImageIndex.Root
|
||||
}
|
||||
_TreeView.Nodes.Clear()
|
||||
@@ -460,6 +462,13 @@ Public Class ProfileFilter
|
||||
Next
|
||||
|
||||
For Each oProfile In Profiles
|
||||
Dim oProfileNode = _ProfileMatch.FindNodeByTag(_TreeView.Nodes, oProfile.Name & "-PROFILE")
|
||||
Dim oCombinedResults = oProfile.CountDocs + oProfile.CountData
|
||||
Dim oHasResults = oCombinedResults > 0
|
||||
|
||||
oProfileNode.Text = $"{oProfileNode.Text} ({oCombinedResults} Ergebnisse)"
|
||||
oProfileNode.BackColor = _ProfileMatch.GetMatchColor(oHasResults)
|
||||
|
||||
If oProfile.CountData > 0 Or oProfile.CountDocs > 0 Then
|
||||
oProfiles.Add(oProfile)
|
||||
_Logger.Info("Profile [{0}] matched in FilterProfilesBySearchResults!", oProfile.Name)
|
||||
|
||||
@@ -108,11 +108,11 @@ Public Class ProfileMatch
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function GetMatchText(IsMatch As Boolean)
|
||||
Public Function GetMatchText(IsMatch As Boolean)
|
||||
Return IIf(IsMatch, "MATCH", "NO MATCH")
|
||||
End Function
|
||||
|
||||
Private Function GetMatchColor(IsMatch As Boolean)
|
||||
Public Function GetMatchColor(IsMatch As Boolean)
|
||||
Return IIf(IsMatch, Color.LightGreen, Color.LightCoral)
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -1,5 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System">
|
||||
<section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<applicationSettings>
|
||||
<DevExpress.LookAndFeel.Design.AppSettings>
|
||||
<setting name="DefaultAppSkin" serializeAs="String">
|
||||
<value>Skin/Office 2019 Colorful</value>
|
||||
</setting>
|
||||
<setting name="DefaultPalette" serializeAs="String">
|
||||
<value>Fire Brick</value>
|
||||
</setting>
|
||||
<setting name="TouchUI" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="CompactUI" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="TouchScaleFactor" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="DirectX" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="RegisterUserSkins" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="RegisterBonusSkins" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="FontBehavior" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="DefaultAppFont" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="DPIAwarenessMode" serializeAs="String">
|
||||
<value></value>
|
||||
</setting>
|
||||
<setting name="CustomPaletteCollection" serializeAs="Xml">
|
||||
<value />
|
||||
</setting>
|
||||
</DevExpress.LookAndFeel.Design.AppSettings>
|
||||
</applicationSettings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
|
||||
8
GUIs.ClipboardWatcher/frmMatch.Designer.vb
generated
8
GUIs.ClipboardWatcher/frmMatch.Designer.vb
generated
@@ -39,7 +39,7 @@ Partial Class frmMatch
|
||||
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.BackColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
|
||||
Me.TileControlMatch.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TileControlMatch.Groups.Add(Me.TileGroupDocumentsData)
|
||||
Me.TileControlMatch.Groups.Add(Me.TileGroupDocuments)
|
||||
@@ -70,7 +70,7 @@ Partial Class frmMatch
|
||||
'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.BackColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, 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)
|
||||
@@ -83,7 +83,7 @@ Partial Class frmMatch
|
||||
'
|
||||
Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
|
||||
Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
|
||||
Me.Label2.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.Label2.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label2.ForeColor = System.Drawing.SystemColors.Control
|
||||
@@ -103,7 +103,7 @@ Partial Class frmMatch
|
||||
Me.Controls.Add(Me.TileControlMatch)
|
||||
Me.IconOptions.ShowIcon = False
|
||||
Me.Name = "frmMatch"
|
||||
Me.Text = "Profile gefunden"
|
||||
Me.Text = "Clipboard Watcher - Profile gefunden"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ Public Class frmMatch
|
||||
|
||||
Private PrimaryFont As New Font("Segoe UI", 12, FontStyle.Bold)
|
||||
Private SecondaryFont As New Font("Segoe UI", 10)
|
||||
Private TileForeColor As Color = Color.Black
|
||||
Private TileBackColor As Color = Color.FromArgb(255, 214, 47)
|
||||
|
||||
Private OpenForms As New List(Of IResultForm)
|
||||
Private ShouldHideInitially As Boolean = False
|
||||
@@ -179,6 +181,7 @@ Public Class frmMatch
|
||||
|
||||
Private Function CreateTile(Profile As ProfileData, CountText As String) As TileItem
|
||||
Dim oItem As New TileItem() With {.Tag = Profile.Guid}
|
||||
oItem.AppearanceItem.Normal.BackColor = TileBackColor
|
||||
oItem.Elements.Clear()
|
||||
|
||||
Dim oNameElement = New TileItemElement With {
|
||||
@@ -186,6 +189,7 @@ Public Class frmMatch
|
||||
.TextAlignment = TileItemContentAlignment.TopLeft
|
||||
}
|
||||
oNameElement.Appearance.Normal.Font = PrimaryFont
|
||||
oNameElement.Appearance.Normal.ForeColor = TileForeColor
|
||||
oItem.Elements.Add(oNameElement)
|
||||
|
||||
Dim oCommentElement = New TileItemElement With {
|
||||
@@ -193,6 +197,7 @@ Public Class frmMatch
|
||||
.TextAlignment = TileItemContentAlignment.MiddleLeft
|
||||
}
|
||||
oCommentElement.Appearance.Normal.Font = SecondaryFont
|
||||
oCommentElement.Appearance.Normal.ForeColor = TileForeColor
|
||||
oItem.Elements.Add(oCommentElement)
|
||||
|
||||
Dim oCountElement = New TileItemElement With {
|
||||
@@ -200,6 +205,7 @@ Public Class frmMatch
|
||||
.TextAlignment = TileItemContentAlignment.BottomRight
|
||||
}
|
||||
oCountElement.Appearance.Normal.Font = SecondaryFont
|
||||
oCountElement.Appearance.Normal.ForeColor = TileForeColor
|
||||
oItem.Elements.Add(oCountElement)
|
||||
|
||||
Return oItem
|
||||
|
||||
@@ -19,7 +19,8 @@ Public Class frmTreeView
|
||||
tvProfileMatch.Nodes.Add(oNode.Clone())
|
||||
Next
|
||||
|
||||
tvProfileMatch.ExpandAll()
|
||||
tvProfileMatch.Nodes.Item(0).Expand()
|
||||
'tvProfileMatch.ExpandAll()
|
||||
tvProfileMatch.EndUpdate()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user