Skip to content

Commit 43c179a

Browse files
Add todos for MORYX 10 preparations
1 parent ea52e55 commit 43c179a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/Moryx.ControlSystem/VisualInstructions/VisualInstruction.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public class VisualInstruction
5454
/// <summary>
5555
/// Interface for classes that define instructions
5656
/// </summary>
57+
//TODO: remove in MORYX 10, will be replaced by VisualInstructionParameters
5758
public interface IVisualInstructions
5859
{
5960
/// <summary>

src/Moryx.ControlSystem/VisualInstructions/VisualInstructorExtensions.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public static long Display(this IVisualInstructor instructor, string title, IVis
2626
{
2727
Title = title,
2828
Instructions = parameter.Instructions,
29+
//TODO: remove the casting in MORYX 10
2930
Inputs = (parameter as VisualInstructionParameters)?.Inputs,
3031
});
3132
}
@@ -40,6 +41,7 @@ public static void Display(this IVisualInstructor instructor, string title, IVis
4041
{
4142
Title = title,
4243
Instructions = parameter.Instructions,
44+
//TODO: remove the casting in MORYX 10
4345
Inputs = (parameter as VisualInstructionParameters)?.Inputs,
4446
}, autoClearMs);
4547
}
@@ -54,6 +56,7 @@ public static long Display(this IVisualInstructor instructor, string title, Acti
5456
{
5557
Title = title,
5658
Instructions = instructions,
59+
//TODO: remove the casting in MORYX 10
5760
Inputs = (activityStart.Activity.Parameters as VisualInstructionParameters)?.Inputs,
5861
});
5962
}
@@ -127,6 +130,8 @@ public static long Execute(this IVisualInstructor instructor, string title, IVis
127130
Title = title,
128131
Instructions = parameter.Instructions,
129132
PossibleResults = results,
133+
Results = results.Select(r => new InstructionResult { Key = r, DisplayValue = r }).ToArray(),
134+
//TODO: remove the casting in MORYX 10
130135
Inputs = (parameter as VisualInstructionParameters)?.Inputs,
131136
}, callback);
132137
}
@@ -163,6 +168,7 @@ public static long Execute(this IVisualInstructor instructor, string title, Acti
163168
Instructions = instructions,
164169
PossibleResults = results,
165170
Results = results.Select(r => new InstructionResult { Key = r, DisplayValue = r }).ToArray(),
171+
//TODO: remove the casting in MORYX 10
166172
Inputs = (activityStart.Activity.Parameters as VisualInstructionParameters)?.Inputs,
167173
}, callback);
168174
}

0 commit comments

Comments
 (0)