Index: ActiviteitenOpvolging/ProductiePitching/configs/ConfigsLoader.vb =================================================================== diff -u -r1763 -r1765 --- ActiviteitenOpvolging/ProductiePitching/configs/ConfigsLoader.vb (.../ConfigsLoader.vb) (revision 1763) +++ ActiviteitenOpvolging/ProductiePitching/configs/ConfigsLoader.vb (.../ConfigsLoader.vb) (revision 1765) @@ -12,7 +12,7 @@ Dim configsTextMapper As New ConfigsTextmapper 'Load the configs that change for every work post. - Dim dynamicConfigFileName = System.Net.Dns.GetHostName() + "_DynamicConfigs.txt" + Dim dynamicConfigFileName = (New CommandLineMapper).ConfigurationName LoadDynamicConfigLines(configsTextMapper.GetAllValues(Path.Combine(My.Application.Info.DirectoryPath, dynamicConfigFileName))) ValidateDynamicConfigs() 'Load the general configs. Index: ActiviteitenOpvolging/ProductiePitching/ProductiePitching.vbproj.user =================================================================== diff -u -r1759 -r1765 --- ActiviteitenOpvolging/ProductiePitching/ProductiePitching.vbproj.user (.../ProductiePitching.vbproj.user) (revision 1759) +++ ActiviteitenOpvolging/ProductiePitching/ProductiePitching.vbproj.user (.../ProductiePitching.vbproj.user) (revision 1765) @@ -10,4 +10,7 @@ en-US false + + -Config KCA-W10_DynamicConfigs.txt + \ No newline at end of file Index: ActiviteitenOpvolging/ProductiePitching/mappers/CommandLineMapper.vb =================================================================== diff -u --- ActiviteitenOpvolging/ProductiePitching/mappers/CommandLineMapper.vb (revision 0) +++ ActiviteitenOpvolging/ProductiePitching/mappers/CommandLineMapper.vb (revision 1765) @@ -0,0 +1,24 @@ +Imports System.Text.RegularExpressions + +Public Class CommandLineMapper + + Public ReadOnly ConfigurationName As String + + Sub New() + Dim CommandLineArguments() As String = Environment.GetCommandLineArgs() + + ConfigurationName = System.Net.Dns.GetHostName() + "_DynamicConfigs.txt" + + For index As Integer = 1 To (CommandLineArguments.Count - 1) Step 2 + If CommandLineArguments(index).Contains("-Config") Then + If (CommandLineArguments.Count >= (index + 1)) Then + ConfigurationName = CommandLineArguments(index + 1) + Else + Throw New Exception($"Invalid commandline parameter. Example -Config VoormontageConfigs.txt") + End If + End If + Next + + End Sub + +End Class Index: ActiviteitenOpvolging/ProductiePitching/ProductiePitching.vbproj =================================================================== diff -u -r1762 -r1765 --- ActiviteitenOpvolging/ProductiePitching/ProductiePitching.vbproj (.../ProductiePitching.vbproj) (revision 1762) +++ ActiviteitenOpvolging/ProductiePitching/ProductiePitching.vbproj (.../ProductiePitching.vbproj) (revision 1765) @@ -119,6 +119,7 @@ + Form