public WatchView GetWatch(string watch) { var watchIndex = Watches.IndexOf(watch); if (watchIndex != -1 && DataGroupSize is int dataGroupSize) { return(new WatchView(_data, GroupIndex, GroupSize, dataGroupSize, laneDataOffset: watchIndex + 1 /* system */, _laneDataSize)); } return(null); }
public SliceWatchView GetSliceWatch(string watch, int groupsInRow, int nGroups) { int laneDataOffset; if (watch == "System") { laneDataOffset = 0; } else { var watchIndex = Watches.IndexOf(watch); if (watchIndex == -1) { return(null); } laneDataOffset = watchIndex + 1; } return(new SliceWatchView(_data, groupsInRow, GroupSize, WaveSize, GetGroupCount(GroupSize, WaveSize, nGroups), laneDataOffset, _laneDataSize, watch)); }