From 9f740ee8ecee08b994ebd71e03761f56f7e35277 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Wed, 14 Sep 2016 14:46:05 +0200
Subject: [PATCH] adapt output format (msgbox) for vehicle validation

---
 VECTO/Input Files/Vehicle.vb | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/VECTO/Input Files/Vehicle.vb b/VECTO/Input Files/Vehicle.vb
index e282fd90d1..a9242fbddf 100644
--- a/VECTO/Input Files/Vehicle.vb	
+++ b/VECTO/Input Files/Vehicle.vb	
@@ -95,7 +95,8 @@ Public Class Vehicle
 
 		Dim vehicleData As VehicleData
 
-		Dim modeService As ExecutionModeServiceContainer = TryCast(validationContext.GetService(GetType(ExecutionMode)), ExecutionModeServiceContainer)
+		Dim modeService As ExecutionModeServiceContainer = TryCast(validationContext.GetService(GetType(ExecutionMode)), 
+																	ExecutionModeServiceContainer)
 		Dim mode = If(modeService Is Nothing, ExecutionMode.Declaration, modeService.Mode)
 
 		Try
@@ -114,7 +115,7 @@ Public Class Vehicle
 
 			If Not result.Any() Then Return ValidationResult.Success
 
-			Return New ValidationResult("Vehicle Configuration is invalid", result.Select(Function(r) r.ErrorMessage).ToList())
+			Return New ValidationResult("Vehicle Configuration is invalid. ", result.Select(Function(r) r.ErrorMessage).ToList())
 		Catch ex As Exception
 			Return New ValidationResult(ex.Message)
 		End Try
@@ -292,7 +293,7 @@ Public Class Vehicle
 
 		If validationResults.Count > 0 Then
 			Dim messages = validationResults.Select(Function(r) r.ErrorMessage + String.Join(", ", r.MemberNames.Distinct()))
-			MsgBox(String.Format("Invalid input: \n{0}", String.Join("; ", messages)), MsgBoxStyle.OkOnly,
+			MsgBox("Invalid input." + Environment.NewLine + String.Join("; ", messages), MsgBoxStyle.OkOnly,
 					"Failed to save vehicle")
 			Return False
 		End If
@@ -396,7 +397,7 @@ Public Class Vehicle
 
 	Public ReadOnly Property [Date] As String Implements IComponentInputData.[Date]
 		Get
-			Now.ToUniversalTime().ToString("o")
+			Return Now.ToUniversalTime().ToString("o")
 		End Get
 	End Property
 
-- 
GitLab