diff --git a/VERSION b/VERSION index fbb9ea1..2b0aa21 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.2.0 +8.2.1 diff --git a/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs b/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs index 1ea7a19..dc900cd 100644 --- a/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs +++ b/src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs @@ -96,7 +96,8 @@ public static long Execute(this IVisualInstructor instructor, string title, Acti { Title = title, Instructions = instructions, - PossibleResults = results + PossibleResults = results, + Results = results.Select(r => new InstructionResult { Key = r, DisplayValue = r }).ToArray() }, callback); } @@ -161,11 +162,13 @@ private static long ExecuteWithEnum(this IVisualInstructor instructor, string ti throw new ArgumentException("Result type is not an enum!"); var results = EnumInstructionResult.PossibleResults(attr.ResultEnum); + var resultObjects = EnumInstructionResult.PossibleInstructionResults(attr.ResultEnum); return instructor.Execute(new ActiveInstruction { Title = title, Instructions = parameters, PossibleResults = results, + Results = resultObjects.ToArray(), Inputs = inputs }, instructionResponse => callback(EnumInstructionResult.ResultToEnumValue(attr.ResultEnum, instructionResponse.Result), instructionResponse.Inputs, activityStart)); }