This commit is contained in:
SchreiberM 2022-05-10 16:28:24 +02:00
parent 6e8383d48d
commit 2dd19e6c3e
7 changed files with 142 additions and 36 deletions

View File

@ -23,7 +23,7 @@
<value>True</value>
</setting>
<setting name="UserConfig_Prefix" serializeAs="String">
<value>PROD</value>
<value>DEV</value>
</setting>
</DigitalData.GUIs.ZooFlow.Settings>
<DevExpress.LookAndFeel.Design.AppSettings>

View File

@ -192,7 +192,8 @@ Public Class ClassInit
Case MODULE_ZOOFLOW
HandleModuleInfo(MyApplication, oType, oRow)
Case MODULE_PROCESS_MANAGER
HandleModuleInfo(MyApplication, oType, oRow)
End Select
Next

View File

@ -14,7 +14,7 @@ Option Explicit On
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0"), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class Settings
Inherits Global.System.Configuration.ApplicationSettingsBase
@ -98,7 +98,7 @@ Partial Friend NotInheritable Class Settings
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("PROD")> _
Global.System.Configuration.DefaultSettingValueAttribute("DEV")> _
Public ReadOnly Property UserConfig_Prefix() As String
Get
Return CType(Me("UserConfig_Prefix"),String)

View File

@ -25,7 +25,7 @@
<Value Profile="(Default)" />
</Setting>
<Setting Name="UserConfig_Prefix" Type="System.String" Scope="Application">
<Value Profile="(Default)">PROD</Value>
<Value Profile="(Default)">DEV</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -39,8 +39,8 @@ Partial Class frmFlowForm
Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
Me.ZooFlowBeendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.PictureBoxPM = New DevExpress.XtraEditors.SvgImageBox()
Me.PictureBoxSearch = New DevExpress.XtraEditors.SvgImageBox()
Me.PictureBoxPM = New DevExpress.XtraEditors.SvgImageBox()
Me.TimerCheckFolderWatchTable = New System.Windows.Forms.Timer(Me.components)
Me.pnlQuicksearch1 = New System.Windows.Forms.Panel()
Me.txtQuicksearch1 = New DevExpress.XtraEditors.TextEdit()
@ -74,10 +74,13 @@ Partial Class frmFlowForm
Me.colSecondary = New DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn()
Me.LabelControl1 = New DevExpress.XtraEditors.LabelControl()
Me.AdornerUIManager1 = New DevExpress.Utils.VisualEffects.AdornerUIManager(Me.components)
Me.TaskBadge = New DevExpress.Utils.VisualEffects.Badge()
Me.PMTaskBadgeInd = New DevExpress.Utils.VisualEffects.Badge()
Me.PMTaskBadgeGroup = New DevExpress.Utils.VisualEffects.Badge()
Me.PMTaskBadgeIndividual = New DevExpress.Utils.VisualEffects.Badge()
Me.TimerDisplay = New System.Windows.Forms.Timer(Me.components)
Me.ContextMenuSystray.SuspendLayout()
CType(Me.PictureBoxPM, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureBoxSearch, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureBoxPM, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlQuicksearch1.SuspendLayout()
CType(Me.txtQuicksearch1.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureEditQuicksearch1.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
@ -155,20 +158,6 @@ Partial Class frmFlowForm
Me.ZooFlowBeendenToolStripMenuItem.Size = New System.Drawing.Size(169, 22)
Me.ZooFlowBeendenToolStripMenuItem.Text = "ZooFlow beenden"
'
'PictureBoxPM
'
Me.PictureBoxPM.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.PictureBoxPM.Cursor = System.Windows.Forms.Cursors.Hand
Me.PictureBoxPM.ItemHitTestType = DevExpress.XtraEditors.ItemHitTestType.BoundingBox
Me.PictureBoxPM.Location = New System.Drawing.Point(21, 6)
Me.PictureBoxPM.Name = "PictureBoxPM"
Me.PictureBoxPM.Size = New System.Drawing.Size(158, 50)
Me.PictureBoxPM.SizeMode = DevExpress.XtraEditors.SvgImageSizeMode.Zoom
Me.PictureBoxPM.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.FLOW_Sidebar_Task_inaktiv1
Me.PictureBoxPM.TabIndex = 14
Me.PictureBoxPM.Text = "SvgImageBox1"
Me.ToolTip1.SetToolTip(Me.PictureBoxPM, "ProcessManager - Workflow")
'
'PictureBoxSearch
'
Me.PictureBoxSearch.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
@ -184,6 +173,20 @@ Partial Class frmFlowForm
Me.PictureBoxSearch.Text = "X"
Me.ToolTip1.SetToolTip(Me.PictureBoxSearch, "FlowSearch öffnen")
'
'PictureBoxPM
'
Me.PictureBoxPM.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.PictureBoxPM.Cursor = System.Windows.Forms.Cursors.Hand
Me.PictureBoxPM.ItemHitTestType = DevExpress.XtraEditors.ItemHitTestType.BoundingBox
Me.PictureBoxPM.Location = New System.Drawing.Point(21, 6)
Me.PictureBoxPM.Name = "PictureBoxPM"
Me.PictureBoxPM.Size = New System.Drawing.Size(158, 50)
Me.PictureBoxPM.SizeMode = DevExpress.XtraEditors.SvgImageSizeMode.Zoom
Me.PictureBoxPM.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.FLOW_Sidebar_Task_inaktiv1
Me.PictureBoxPM.TabIndex = 14
Me.PictureBoxPM.Text = "SvgImageBox1"
Me.PictureBoxPM.Visible = False
'
'TimerCheckFolderWatchTable
'
Me.TimerCheckFolderWatchTable.Interval = 2000
@ -494,19 +497,49 @@ Partial Class frmFlowForm
'
'AdornerUIManager1
'
Me.AdornerUIManager1.Elements.Add(Me.TaskBadge)
Me.AdornerUIManager1.Elements.Add(Me.PMTaskBadgeInd)
Me.AdornerUIManager1.Elements.Add(Me.PMTaskBadgeGroup)
Me.AdornerUIManager1.Elements.Add(Me.PMTaskBadgeIndividual)
Me.AdornerUIManager1.Owner = Me
'
'TaskBadge
'PMTaskBadgeInd
'
Me.TaskBadge.Appearance.BackColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
Me.TaskBadge.Appearance.Options.UseBackColor = True
Me.TaskBadge.Properties.Location = System.Drawing.ContentAlignment.BottomRight
Me.TaskBadge.Properties.Offset = New System.Drawing.Point(0, 0)
Me.TaskBadge.Properties.PaintStyle = DevExpress.Utils.VisualEffects.BadgePaintStyle.[Default]
Me.TaskBadge.Properties.Text = "0"
Me.TaskBadge.TargetElement = Me.PictureBoxPM
Me.TaskBadge.TargetElementRegion = DevExpress.Utils.VisualEffects.TargetElementRegion.Control
Me.PMTaskBadgeInd.Appearance.BackColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
Me.PMTaskBadgeInd.Appearance.Options.UseBackColor = True
Me.PMTaskBadgeInd.Properties.Location = System.Drawing.ContentAlignment.TopRight
Me.PMTaskBadgeInd.Properties.Offset = New System.Drawing.Point(0, 0)
Me.PMTaskBadgeInd.Properties.PaintStyle = DevExpress.Utils.VisualEffects.BadgePaintStyle.[Default]
Me.PMTaskBadgeInd.Properties.Text = "0"
Me.PMTaskBadgeInd.TargetElement = Me.PictureBoxPM
Me.PMTaskBadgeInd.TargetElementRegion = DevExpress.Utils.VisualEffects.TargetElementRegion.Control
Me.PMTaskBadgeInd.Visible = False
'
'PMTaskBadgeGroup
'
Me.PMTaskBadgeGroup.Appearance.BackColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
Me.PMTaskBadgeGroup.Appearance.Options.UseBackColor = True
Me.PMTaskBadgeGroup.Properties.Location = System.Drawing.ContentAlignment.BottomRight
Me.PMTaskBadgeGroup.Properties.Text = "0"
Me.PMTaskBadgeGroup.TargetElement = Me.PictureBoxPM
Me.PMTaskBadgeGroup.TargetElementRegion = DevExpress.Utils.VisualEffects.TargetElementRegion.Control
Me.PMTaskBadgeGroup.Visible = False
'
'PMTaskBadgeIndividual
'
Me.PMTaskBadgeIndividual.Appearance.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(214, Byte), Integer), CType(CType(49, Byte), Integer))
Me.PMTaskBadgeIndividual.Appearance.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.PMTaskBadgeIndividual.Appearance.ForeColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
Me.PMTaskBadgeIndividual.Appearance.Options.UseBackColor = True
Me.PMTaskBadgeIndividual.Appearance.Options.UseFont = True
Me.PMTaskBadgeIndividual.Appearance.Options.UseForeColor = True
Me.PMTaskBadgeIndividual.Properties.Location = System.Drawing.ContentAlignment.TopLeft
Me.PMTaskBadgeIndividual.Properties.PaintStyle = DevExpress.Utils.VisualEffects.BadgePaintStyle.Information
Me.PMTaskBadgeIndividual.Properties.Text = "0"
Me.PMTaskBadgeIndividual.TargetElement = Me.PictureBoxPM
'
'TimerDisplay
'
Me.TimerDisplay.Interval = 60000
'
'frmFlowForm
'
@ -532,8 +565,8 @@ Partial Class frmFlowForm
Me.Text = "ZooFlow"
Me.TransparencyKey = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(214, Byte), Integer), CType(CType(49, Byte), Integer))
Me.ContextMenuSystray.ResumeLayout(False)
CType(Me.PictureBoxPM, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureBoxSearch, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureBoxPM, System.ComponentModel.ISupportInitialize).EndInit()
Me.pnlQuicksearch1.ResumeLayout(False)
CType(Me.txtQuicksearch1.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureEditQuicksearch1.Properties, System.ComponentModel.ISupportInitialize).EndInit()
@ -582,7 +615,7 @@ Partial Class frmFlowForm
Friend WithEvents Panel2 As Panel
Friend WithEvents btnGlobixConfig As DevExpress.XtraBars.BarButtonItem
Friend WithEvents AdornerUIManager1 As DevExpress.Utils.VisualEffects.AdornerUIManager
Friend WithEvents TaskBadge As DevExpress.Utils.VisualEffects.Badge
Friend WithEvents PMTaskBadgeInd As DevExpress.Utils.VisualEffects.Badge
Friend WithEvents PictureEditQuicksearch1 As PictureEdit
Friend WithEvents PictureEdit2 As PictureEdit
Friend WithEvents Panel3 As Panel
@ -595,4 +628,7 @@ Partial Class frmFlowForm
Friend WithEvents colPrimary As DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn
Friend WithEvents GridBand1 As DevExpress.XtraGrid.Views.BandedGrid.GridBand
Friend WithEvents LabelControl1 As LabelControl
Friend WithEvents PMTaskBadgeGroup As DevExpress.Utils.VisualEffects.Badge
Friend WithEvents TimerDisplay As Timer
Friend WithEvents PMTaskBadgeIndividual As DevExpress.Utils.VisualEffects.Badge
End Class

View File

@ -2039,6 +2039,9 @@
</value>
</data>
<metadata name="AdornerUIManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
<value>906, 17</value>
</metadata>
<metadata name="TimerDisplay.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1069, 17</value>
</metadata>
</root>

View File

@ -333,7 +333,9 @@ Public Class frmFlowForm
' TODO: This needs an update of the function FNZF_GET_MODULE_INFO
If My.Application.ModulesActive.Contains(MODULE_PROCESS_MANAGER) Then
TimerDisplay.Enabled = True
PictureBoxPM.Visible = True
DISPLAY_TASKS()
End If
If IsNothing(My.Tables.DTIDB_CATALOG_USER) Then
@ -1192,14 +1194,33 @@ Public Class frmFlowForm
Private Sub PictureBoxPM_Click(sender As Object, e As EventArgs) Handles PictureBoxPM.Click
Try
Dim oProcessManagerPath = Modules.GetProductProgramPath(DigitalData.Modules.Base.ECM.Product.ProcessManager)
If PM_Running() = True Then
NotifyIcon.ShowBalloonTip(30000, NI_TITLE, "TaskFlow already running", 1)
Exit Sub
End If
If oProcessManagerPath IsNot Nothing AndAlso IO.File.Exists(oProcessManagerPath) Then
Process.Start(oProcessManagerPath)
Else
NotifyIcon.ShowBalloonTip(30000, NI_TITLE, "Path to TaskFlow not properly configured", 3)
End If
Catch ex As Exception
ShowErrorMessage(ex)
End Try
End Sub
Private Function PM_Running() As Boolean
Dim p() As Process
p = Process.GetProcessesByName("DD_ProcessManager")
If p.Count > 0 Then
' Process is running
Return True
Else
' Process is not running
Return False
End If
End Function
Private Sub PictureBoxPM_MouseEnter(sender As Object, e As EventArgs) Handles PictureBoxPM.MouseEnter
PictureBoxPM.SvgImage = My.Resources.FLOW_Sidebar_Task_aktiv1
End Sub
@ -1249,5 +1270,50 @@ Public Class frmFlowForm
End Try
End If
End Sub
Private Sub TimerDisplay_Tick(sender As Object, e As EventArgs) Handles TimerDisplay.Tick
DISPLAY_TASKS()
End Sub
Sub DISPLAY_TASKS()
Try
Dim oSQL = $"SELECT * FROM TBZF_USER_DISPLAY_JOBS WHERE USR_ID = {My.Application.User.UserId}"
Dim oDT As DataTable = My.Database.GetDatatable("TBZF_USER_DISPLAY_JOBS", oSQL, EDMI.API.Constants.DatabaseType.ECM, $"USR_ID = {My.Application.User.UserId}")
If Not IsNothing(oDT) Then
If oDT.Rows.Count > 0 Then
Dim oTooLTip = "TaskFlow "
PMTaskBadgeGroup.Visible = False
PMTaskBadgeInd.Visible = False
PMTaskBadgeIndividual.Visible = False
For Each oRow As DataRow In oDT.Rows
If oRow.Item("JOB_TITLE") = "PM_INDIVIDUAL_JOB" Then
PMTaskBadgeInd.Properties.Text = oRow.Item("DESCR")
PMTaskBadgeIndividual.Properties.Text = oRow.Item("DESCR")
PMTaskBadgeInd.Visible = True
PMTaskBadgeIndividual.Visible = True
oTooLTip += $"({PMTaskBadgeInd.Properties.Text} Individual"
ElseIf oRow.Item("JOB_TITLE") = "PM_GROUP_JOB" Then
PMTaskBadgeGroup.Properties.Text = oRow.Item("DESCR")
oTooLTip += $"- and {PMTaskBadgeGroup.Properties.Text} Group-"
PMTaskBadgeGroup.Visible = True
End If
Next
oTooLTip += $"Tasks)"
PictureBoxPM.ToolTip = oTooLTip
Else
PMTaskBadgeGroup.Visible = False
PMTaskBadgeInd.Visible = False
PMTaskBadgeIndividual.Visible = False
End If
Else
PMTaskBadgeGroup.Visible = False
PMTaskBadgeInd.Visible = False
PMTaskBadgeIndividual.Visible = False
End If
Catch ex As Exception
End Try
End Sub
End Class