ClipboardWatcher: corporate identity for frmMatch, show overal match and search results for frmTreeview

This commit is contained in:
Jonathan Jenne 2021-01-11 16:10:57 +01:00
parent 5f147c5d75
commit 526e3669ef
8 changed files with 105 additions and 1811 deletions

View File

@ -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)

View File

@ -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

View File

@ -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>

View File

@ -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()

View File

@ -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

View File

@ -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

View File

@ -47,6 +47,7 @@ Partial Class frmSearchStart
Me.RepositoryItemComboBox2 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox()
Me.BarCheckboxOpenSearchInSameWindow = New DevExpress.XtraBars.BarCheckItem()
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem4 = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroupFunctions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroupProfiles = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
@ -76,7 +77,6 @@ Partial Class frmSearchStart
Me.KlammerRechtsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.KlammerEntfernenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.SplitContainerControlSearch = New DevExpress.XtraEditors.SplitContainerControl()
Me.BarButtonItem4 = New DevExpress.XtraBars.BarButtonItem()
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RepositoryItemRadioGroup1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RepositoryItemComboBox1, System.ComponentModel.ISupportInitialize).BeginInit()
@ -262,6 +262,13 @@ Partial Class frmSearchStart
Me.BarButtonItem1.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonItem1.Name = "BarButtonItem1"
'
'BarButtonItem4
'
Me.BarButtonItem4.Caption = "BarButtonItem4"
Me.BarButtonItem4.Id = 24
Me.BarButtonItem4.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem4.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonItem4.Name = "BarButtonItem4"
'
'RibbonPage1
'
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroupFunctions, Me.RibbonPageGroupProfiles, Me.RibbonPageGroupFilter, Me.RibbonPageGroupSettings, Me.RibbonPageGroup1})
@ -379,55 +386,55 @@ Partial Class frmSearchStart
'XtraTabPage2
'
Me.XtraTabPage2.Name = "XtraTabPage2"
Me.XtraTabPage2.Size = New System.Drawing.Size(1018, 242)
Me.XtraTabPage2.Size = New System.Drawing.Size(1018, 239)
Me.XtraTabPage2.Text = "Search#2"
'
'XtraTabPage3
'
Me.XtraTabPage3.Name = "XtraTabPage3"
Me.XtraTabPage3.Size = New System.Drawing.Size(1018, 242)
Me.XtraTabPage3.Size = New System.Drawing.Size(1018, 239)
Me.XtraTabPage3.Text = "Search#3"
'
'XtraTabPage4
'
Me.XtraTabPage4.Name = "XtraTabPage4"
Me.XtraTabPage4.Size = New System.Drawing.Size(1018, 242)
Me.XtraTabPage4.Size = New System.Drawing.Size(1018, 239)
Me.XtraTabPage4.Text = "Search#4"
'
'XtraTabPage5
'
Me.XtraTabPage5.Name = "XtraTabPage5"
Me.XtraTabPage5.Size = New System.Drawing.Size(1018, 242)
Me.XtraTabPage5.Size = New System.Drawing.Size(1018, 239)
Me.XtraTabPage5.Text = "Search#5"
'
'XtraTabPage6
'
Me.XtraTabPage6.Name = "XtraTabPage6"
Me.XtraTabPage6.Size = New System.Drawing.Size(1018, 242)
Me.XtraTabPage6.Size = New System.Drawing.Size(1018, 239)
Me.XtraTabPage6.Text = "Search#6"
'
'XtraTabPage7
'
Me.XtraTabPage7.Name = "XtraTabPage7"
Me.XtraTabPage7.Size = New System.Drawing.Size(1018, 242)
Me.XtraTabPage7.Size = New System.Drawing.Size(1018, 239)
Me.XtraTabPage7.Text = "Search#7"
'
'XtraTabPage8
'
Me.XtraTabPage8.Name = "XtraTabPage8"
Me.XtraTabPage8.Size = New System.Drawing.Size(1018, 242)
Me.XtraTabPage8.Size = New System.Drawing.Size(1018, 239)
Me.XtraTabPage8.Text = "Search#8"
'
'XtraTabPage9
'
Me.XtraTabPage9.Name = "XtraTabPage9"
Me.XtraTabPage9.Size = New System.Drawing.Size(1018, 242)
Me.XtraTabPage9.Size = New System.Drawing.Size(1018, 239)
Me.XtraTabPage9.Text = "Search#9"
'
'XtraTabPage10
'
Me.XtraTabPage10.Name = "XtraTabPage10"
Me.XtraTabPage10.Size = New System.Drawing.Size(1018, 242)
Me.XtraTabPage10.Size = New System.Drawing.Size(1018, 239)
Me.XtraTabPage10.Text = "Search#10"
'
'ContextMenuStripSearchTerms
@ -476,12 +483,6 @@ Partial Class frmSearchStart
Me.SplitContainerControlSearch.SplitterPosition = 310
Me.SplitContainerControlSearch.TabIndex = 16
'
'BarButtonItem4
'
Me.BarButtonItem4.Caption = "BarButtonItem4"
Me.BarButtonItem4.Id = 24
Me.BarButtonItem4.Name = "BarButtonItem4"
'
'frmSearchStart
'
Me.AllowFormGlass = DevExpress.Utils.DefaultBoolean.[True]
@ -493,8 +494,7 @@ Partial Class frmSearchStart
Me.Controls.Add(Me.pnlProfileChoose)
Me.Controls.Add(Me.RibbonStatusBar1)
Me.Controls.Add(Me.RibbonControl1)
Me.IconOptions.Icon = CType(resources.GetObject("frmSearchStart.IconOptions.Icon"), System.Drawing.Icon)
Me.IconOptions.SvgImage = CType(resources.GetObject("frmSearchStart.IconOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.IconOptions.Image = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.ZOO_FLOW__sysicon_256
Me.IconOptions.SvgImageColorizationMode = DevExpress.Utils.SvgImageColorizationMode.Full
Me.KeyPreview = True
Me.Name = "frmSearchStart"

File diff suppressed because it is too large Load Diff