diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs index 92ad1c536..a64cd7908 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs @@ -10,6 +10,7 @@ using System.Xml.Serialization; using Tango.Core; using Tango.Core.Helpers; using Tango.Integration.Observables; +using System.Reflection; namespace Tango.MachineStudio.Technician.TechItems { @@ -22,6 +23,7 @@ namespace Tango.MachineStudio.Technician.TechItems [XmlInclude(typeof(SingleGraphItem))] [XmlInclude(typeof(ThreadMotionItem))] [XmlInclude(typeof(MotorGroupItem))] + [XmlInclude(typeof(DigitalInItem))] public abstract class TechItem : ExtendedObject { public TechItem() @@ -177,7 +179,7 @@ namespace Tango.MachineStudio.Technician.TechItems { List<TechItem> items = new List<TechItem>(); - foreach (var type in typeof(TechItem).Assembly.GetTypes().Where(x => typeof(TechItem).IsAssignableFrom(x) && !x.IsAbstract)) + foreach (var type in typeof(TechItem).Assembly.GetTypes().Where(x => typeof(TechItem).IsAssignableFrom(x) && !x.IsAbstract).OrderBy(x => x.GetCustomAttribute<TechItemAttribute>().Index)) { items.Add(Activator.CreateInstance(type) as TechItem); } |
