1
1
using System ;
2
- using System . Collections . Generic ;
3
2
using System . Drawing ;
4
3
using System . Linq ;
5
4
using System . Windows . Forms ;
@@ -17,24 +16,24 @@ public partial class NeuropixelsV2eChannelConfigurationDialog : ChannelConfigura
17
16
internal event EventHandler OnFileLoad ;
18
17
19
18
/// <summary>
20
- /// Public <see cref="NeuropixelsV2QuadShankProbeConfiguration "/> object that is manipulated by
19
+ /// Public <see cref="NeuropixelsV2ProbeConfiguration "/> object that is manipulated by
21
20
/// <see cref="NeuropixelsV2eChannelConfigurationDialog"/>.
22
21
/// </summary>
23
- public NeuropixelsV2QuadShankProbeConfiguration ProbeConfiguration ;
22
+ public NeuropixelsV2ProbeConfiguration ProbeConfiguration ;
24
23
25
24
/// <summary>
26
25
/// Initializes a new instance of <see cref="NeuropixelsV2eChannelConfigurationDialog"/>.
27
26
/// </summary>
28
- /// <param name="probeConfiguration">A <see cref="NeuropixelsV2QuadShankProbeConfiguration "/> object holding the current configuration settings.</param>
29
- public NeuropixelsV2eChannelConfigurationDialog ( NeuropixelsV2QuadShankProbeConfiguration probeConfiguration )
27
+ /// <param name="probeConfiguration">A <see cref="NeuropixelsV2ProbeConfiguration "/> object holding the current configuration settings.</param>
28
+ public NeuropixelsV2eChannelConfigurationDialog ( NeuropixelsV2ProbeConfiguration probeConfiguration )
30
29
: base ( probeConfiguration . ProbeGroup )
31
30
{
32
31
zedGraphChannels . ZoomButtons = MouseButtons . None ;
33
32
zedGraphChannels . ZoomButtons2 = MouseButtons . None ;
34
33
35
34
zedGraphChannels . ZoomStepFraction = 0.5 ;
36
35
37
- ProbeConfiguration = probeConfiguration ;
36
+ ProbeConfiguration = new ( probeConfiguration ) ;
38
37
39
38
ZoomInBoundaryX = 600 ;
40
39
ZoomInBoundaryY = 600 ;
@@ -46,13 +45,16 @@ public NeuropixelsV2eChannelConfigurationDialog(NeuropixelsV2QuadShankProbeConfi
46
45
47
46
internal override ProbeGroup DefaultChannelLayout ( )
48
47
{
49
- return new NeuropixelsV2eProbeGroup ( ) ;
48
+ return new NeuropixelsV2eProbeGroup ( ProbeConfiguration . ProbeType ) ;
50
49
}
51
50
52
51
internal override void LoadDefaultChannelLayout ( )
53
52
{
54
- ProbeConfiguration = new ( ProbeConfiguration . Probe , ProbeConfiguration . Reference ) ;
55
- ProbeGroup = ProbeConfiguration . ProbeGroup ;
53
+ base . LoadDefaultChannelLayout ( ) ;
54
+ ProbeConfiguration = new ( ( NeuropixelsV2eProbeGroup ) ProbeGroup ,
55
+ ProbeConfiguration . Probe ,
56
+ ProbeConfiguration . ProbeType ,
57
+ ProbeConfiguration . Reference ) ;
56
58
57
59
OnFileOpenHandler ( ) ;
58
60
}
@@ -61,8 +63,6 @@ internal override bool OpenFile<T>()
61
63
{
62
64
if ( base . OpenFile < NeuropixelsV2eProbeGroup > ( ) )
63
65
{
64
- ProbeConfiguration = new ( ( NeuropixelsV2eProbeGroup ) ProbeGroup , ProbeConfiguration . Reference , ProbeConfiguration . Probe ) ;
65
-
66
66
OnFileOpenHandler ( ) ;
67
67
68
68
return true ;
@@ -173,7 +173,7 @@ internal override void DrawScale()
173
173
174
174
const float scaleBarWidth = 1 ;
175
175
176
- curve . Line . Width = scaleBarWidth ;
176
+ curve . Line . Width = scaleBarWidth ;
177
177
curve . Label . IsVisible = false ;
178
178
curve . Symbol . IsVisible = false ;
179
179
curve . Tag = ScalePointsTag ;
@@ -197,7 +197,7 @@ internal override void HighlightEnabledContacts()
197
197
var contactsToEnable = contactObjects . Where ( c =>
198
198
{
199
199
var tag = c . Tag as ContactTag ;
200
- var channel = NeuropixelsV2QuadShankElectrode . GetChannelNumber ( tag . ContactIndex ) ;
200
+ var channel = NeuropixelsV2Electrode . GetChannelNumber ( tag . ContactIndex , ProbeConfiguration . ProbeType ) ;
201
201
return ProbeConfiguration . ChannelMap [ channel ] . Index == tag . ContactIndex ;
202
202
} ) ;
203
203
@@ -227,7 +227,7 @@ internal override void UpdateContactLabels()
227
227
textObjsToUpdate = textObjs . Where ( c =>
228
228
{
229
229
var tag = c . Tag as ContactTag ;
230
- var channel = NeuropixelsV2QuadShankElectrode . GetChannelNumber ( tag . ContactIndex ) ;
230
+ var channel = NeuropixelsV2Electrode . GetChannelNumber ( tag . ContactIndex , ProbeConfiguration . ProbeType ) ;
231
231
return ProbeConfiguration . ChannelMap [ channel ] . Index == tag . ContactIndex ;
232
232
} ) ;
233
233
@@ -242,7 +242,7 @@ internal override string ContactString(int deviceChannelIndex, int index)
242
242
return index . ToString ( ) ;
243
243
}
244
244
245
- internal void EnableElectrodes ( NeuropixelsV2QuadShankElectrode [ ] electrodes )
245
+ internal void EnableElectrodes ( NeuropixelsV2Electrode [ ] electrodes )
246
246
{
247
247
ProbeConfiguration . SelectElectrodes ( electrodes ) ;
248
248
}
0 commit comments