diff --git a/OpenEphys.Onix1/ContextDriverConverter.cs b/OpenEphys.Onix1/ContextDriverConverter.cs new file mode 100644 index 0000000..5585b54 --- /dev/null +++ b/OpenEphys.Onix1/ContextDriverConverter.cs @@ -0,0 +1,25 @@ +using System.ComponentModel; + +namespace OpenEphys.Onix1 +{ + internal class ContextDriverConverter : StringConverter + { + public override bool GetStandardValuesSupported(ITypeDescriptorContext context) + { + return true; + } + + public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) + { + return true; + } + + public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) + { + return new StandardValuesCollection(new[] + { + "riffa" + }); + } + } +} diff --git a/OpenEphys.Onix1/CreateContext.cs b/OpenEphys.Onix1/CreateContext.cs index 2fb7711..447ac81 100644 --- a/OpenEphys.Onix1/CreateContext.cs +++ b/OpenEphys.Onix1/CreateContext.cs @@ -19,6 +19,7 @@ public class CreateContext /// [Description("Specifies the device driver used to communicate with hardware.")] [Category(DeviceFactory.ConfigurationCategory)] + [TypeConverter(typeof(ContextDriverConverter))] public string Driver { get; set; } = ContextTask.DefaultDriver; ///