File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ using System . ComponentModel ;
2+
3+ namespace OpenEphys . Onix1
4+ {
5+ internal class ContextDriverConverter : StringConverter
6+ {
7+ public override bool GetStandardValuesSupported ( ITypeDescriptorContext context )
8+ {
9+ return true ;
10+ }
11+
12+ public override bool GetStandardValuesExclusive ( ITypeDescriptorContext context )
13+ {
14+ return true ;
15+ }
16+
17+ public override StandardValuesCollection GetStandardValues ( ITypeDescriptorContext context )
18+ {
19+ return new StandardValuesCollection ( new [ ]
20+ {
21+ "riffa"
22+ } ) ;
23+ }
24+ }
25+ }
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ public class CreateContext
1919 /// </summary>
2020 [ Description ( "Specifies the device driver used to communicate with hardware." ) ]
2121 [ Category ( DeviceFactory . ConfigurationCategory ) ]
22+ [ TypeConverter ( typeof ( ContextDriverConverter ) ) ]
2223 public string Driver { get ; set ; } = ContextTask . DefaultDriver ;
2324
2425 /// <summary>
You can’t perform that action at this time.
0 commit comments