public GroupChannelSelection() { InitializeComponent(); groupChannelData = new AnalogGroupChannelData(null, false, false); logicalChannel = new LogicalChannel(); logicalChannel.Name = "Placeholder Channel"; this.commonWaveformSelector.Items.Add("Manual"); this.commonWaveformSelector.SelectedItem = "Manual"; this.setButtonAppearance(); }
public GroupChannelSelection(LogicalChannel logicalChannel, AnalogGroupChannelData groupChannelData, int channelID) : this() { this.groupChannelData = groupChannelData; setCommonWaveforms(); layout(); this.logicalChannel = logicalChannel; this.toolTip1.SetToolTip(channelNameLabel, logicalChannel.Description); channelNameLabel.Text = channelID.ToString() + " " + logicalChannel.Name; }
private void layoutGraphCollection() { waveformEditor1.setWaveform(null); if (WordGenerator.MainClientForm.instance != null) { WordGenerator.MainClientForm.instance.cursorWait(); } try { List <Waveform> waveformsToDisplay = new List <Waveform>(); List <string> channelNamesToDisplay = new List <string>(); List <bool> waveformsEditable = new List <bool>(); // figure out what to display in the waveform graph if (analogGroup != null) { List <int> usedChannelIDs = analogGroup.getChannelIDs(); for (int i = 0; i < usedChannelIDs.Count; i++) { int id = usedChannelIDs[i]; if (analogChannelCollection.Channels.ContainsKey(id)) { AnalogGroupChannelData channelData = analogGroup.ChannelDatas[id]; if (channelData.ChannelEnabled /*&& !channelData.ChannelWaveformIsCommon*/) { waveformsToDisplay.Add(channelData.waveform); waveformsEditable.Add(!channelData.ChannelWaveformIsCommon); channelNamesToDisplay.Add(analogChannelCollection.Channels[id].Name); } } } } waveformGraphCollection1.deactivateAllGraphs(); waveformGraphCollection1.setWaveforms(waveformsToDisplay, waveformsEditable); waveformGraphCollection1.setChannelNames(channelNamesToDisplay); waveformGraphCollection1.setWaveformEditor(waveformEditor1); } finally { if (WordGenerator.MainClientForm.instance != null) { WordGenerator.MainClientForm.instance.cursorWaitRelease(); } } }
public void setChannelData(AnalogGroupChannelData channelData) { this.groupChannelData = channelData; layout(); }