private void SetupChannelGroupBox() { ChannelNameTextBox.Text = selectedChannel.Name; List <Parameter> parameters = selectedChannel.GetParameters(); ChannelParameterListPanel.LoadParameters(parameters); VirtualChannelGroupBox.Visible = false; ChannelGroupBox.Visible = true; }
private Channel SaveChannel(Instrument inst, Channel chan) { // Validate input if (chan.Name != ChannelNameTextBox.Text && siteMan.ContainsName(ChannelNameTextBox.Text)) { MessageBox.Show("All items in the Site Manager require a unique name!"); return(null); } if (!ChannelParameterListPanel.ValidateInput()) { return(null); } // Apply new settings chan.Name = ChannelNameTextBox.Text; chan.ApplyParameters(ChannelParameterListPanel.Parameters); return(chan); }