FishEye: Tag 1695 refers to a dead (removed) revision in file `ActiviteitenOpvolging/ActiviteitenOpvolging/enums/DueOutStateEnum.vb'.
FishEye: No comparison available. Pass `N' to diff?
Index: ActiviteitenOpvolging/ActiviteitenOpvolging/ActiviteitenOpvolging.vbproj
===================================================================
diff -u -r1682 -r1695
--- ActiviteitenOpvolging/ActiviteitenOpvolging/ActiviteitenOpvolging.vbproj (.../ActiviteitenOpvolging.vbproj) (revision 1682)
+++ ActiviteitenOpvolging/ActiviteitenOpvolging/ActiviteitenOpvolging.vbproj (.../ActiviteitenOpvolging.vbproj) (revision 1695)
@@ -82,7 +82,6 @@
-
Form
@@ -143,6 +142,8 @@
-
+
+
+
\ No newline at end of file
Index: ActiviteitenOpvolging/ActiviteitenOpvolging/configs/ConfigsLoader.vb
===================================================================
diff -u -r1693 -r1695
--- ActiviteitenOpvolging/ActiviteitenOpvolging/configs/ConfigsLoader.vb (.../ConfigsLoader.vb) (revision 1693)
+++ ActiviteitenOpvolging/ActiviteitenOpvolging/configs/ConfigsLoader.vb (.../ConfigsLoader.vb) (revision 1695)
@@ -5,7 +5,7 @@
Namespace configs
Public Module ConfigsLoader
Const MaxIntervalSeconds As Integer = 3600 'Max of 6 hours
- public Const GridColumnAmount As Integer = 5 'Batch, DueOut, Product, Naar, Opmerking
+ Public Const GridColumnAmount As Integer = 5 'Batch, DueOut, Product, Naar, Opmerking
Sub New()
Try
@@ -246,16 +246,12 @@
Public ReadOnly Property CacheWebserviceUrl As Url
Public ReadOnly Property StartBeforeTimeThreshold As TimeSpan
Public ReadOnly Property StartAlmostTimeThreshold As TimeSpan
-#Region "Colors"
+#Region "Colors and images"
Public ReadOnly Property AgColorBatch As Color
Public ReadOnly Property AgColorProductGroup As Color
Public ReadOnly Property AgColorTo As Color
- Private ReadOnly Property _colorsDueOut As New Dictionary(Of DueOutStateEnum, Color)
- Public ReadOnly Property ColorsDueOut As Dictionary(Of DueOutStateEnum, Color)
- Get
- Return New Dictionary(Of DueOutStateEnum, Color)(_colorsDueOut)
- End Get
- End Property
+ Public ReadOnly Property ActivityBeforeStatusImage As Image
+ Public ReadOnly Property ActivityAlmostStatusImage As Image
Private ReadOnly Property _colorsActivities As New Dictionary(Of ActivityStateEnum, Color)
Public ReadOnly Property ColorsActivities As Dictionary(Of ActivityStateEnum, Color)
Get
@@ -306,8 +302,14 @@
_AgColorProductGroup = GetColorFromHexStringValue(value)
ElseIf identifier.Equals("AgColorTo") Then
_AgColorTo = GetColorFromHexStringValue(value)
- ElseIf identifier.Contains("AgColorDueOut") Then
- AddColorDueOut(identifier, value)
+ ElseIf identifier.Equals("ImageBefore") Then
+ If File.Exists(value) Then
+ _ActivityBeforeStatusImage = Image.FromFile(value)
+ End If
+ ElseIf identifier.Equals("ImageAlmost") Then
+ If File.Exists(value) Then
+ _ActivityAlmostStatusImage = Image.FromFile(value)
+ End If
ElseIf identifier.Contains("AgColorActivityReadOnly") Then
AddColorActivity(identifier, value, True)
ElseIf identifier.Contains("AgColorActivity") Then
@@ -330,35 +332,6 @@
'''
''' The identifier of the state
''' The hexadecimal string value of the color
- Private Sub AddColorDueOut(identifier As String, value As String)
- Try
- 'Extract the state name.
- 'Invoke the Match method, all text after AgColorDueOut.
- Dim m As Match = Regex.Match(identifier, "AgColorDueOut(.*)")
-
- If Not m.Success Then
- 'No results.
- Throw New ConfigurationException($"Could not get the state for assigning a color for DueOut. Identifier is '{identifier}'.")
- End If
-
- 'If successful, extract the state name.
- Dim stateName = m.Groups(1).Value
-
- 'Convert string value to enum value.
- Dim enumValue = DueOutStateEnumMapper.GetEnumValueFromString(stateName)
-
- 'Add to library, key is the enum value, value is the color.
- _colorsDueOut.Add(enumValue, GetColorFromHexStringValue(value))
- Catch ex As Exception
- Throw New ConfigurationException($"ColorDueOut with name: '{identifier}' and value '{value}' is invalid.{vbNewLine}{ex.Message}")
- End Try
- End Sub
-
- '''
- ''' Add a color for a due out state to the dictionary.
- '''
- ''' The identifier of the state
- ''' The hexadecimal string value of the color
''' Whether or not the activity is readonly
Private Sub AddColorActivity(identifier As String, value As String, isReadOnly As Boolean)
Try
@@ -431,13 +404,16 @@
Throw New ConfigurationException("The Ag color to is not defined.")
End If
- 'Colors due out.
- If _colorsDueOut.Keys.Count <> [Enum].GetValues(GetType(DueOutStateEnum)).Length Then
- 'Amount of enum values and entries in the dictionary differ.
- Throw New ConfigurationException($"The amount of colors defined for the different states of DueOut differs from the amount of states.
- There are {[Enum].GetValues(GetType(DueOutStateEnum)).Length} total states and {_colorsDueOut.Keys.Count} colors are defined.")
+ 'Before activity status image.
+ If _ActivityBeforeStatusImage is Nothing Then
+ Throw New ConfigurationException("The activity before status image is not correctly defined.")
End If
+ 'Almost activity status image.
+ If _ActivityAlmostStatusImage is Nothing Then
+ Throw New ConfigurationException("The activity almost status image is not correctly defined.")
+ End If
+
'Colors activities.
If _colorsActivities.Keys.Count <> [Enum].GetValues(GetType(ActivityStateEnum)).Length Then
'Amount of enum values and entries in the dictionary differ.
Index: ActiviteitenOpvolging/ActiviteitenOpvolging/grids/DataGridViewUserControl.vb
===================================================================
diff -u -r1694 -r1695
--- ActiviteitenOpvolging/ActiviteitenOpvolging/grids/DataGridViewUserControl.vb (.../DataGridViewUserControl.vb) (revision 1694)
+++ ActiviteitenOpvolging/ActiviteitenOpvolging/grids/DataGridViewUserControl.vb (.../DataGridViewUserControl.vb) (revision 1695)
@@ -216,7 +216,7 @@
'If all activities of a batch have status "F" (excluding ReadOnly Activities) => AgColorDueOutDefault
If workItem.Activities.All(Function(activity) activity.Status = ActivityStateEnum.Finished And activity.IsReadOnly = False) Then
- cell.Style.BackColor = ConfigsLoader.ColorsDueOut(DueOutStateEnum.Defaulted)
+ 'todo cell.Style.BackColor = ConfigsLoader.ColorsDueOut(DueOutStateEnum.Defaulted)
Return
End If