//constructor overloads public Broadcast_Connection_Settings(Form1 mf) // create new mode. will overload this for the edit mode. { InitializeComponent(); timerTransmissionDGVUpdater.Interval = 50; timerTransmissionDGVUpdater.Start(); //setup USB port boxes string[] serialPorts = System.IO.Ports.SerialPort.GetPortNames(); cbUSBPort.Items.AddRange(serialPorts); cbUSBBaud.Items.Add(2400); cbUSBBaud.Items.Add(4800); cbUSBBaud.Items.Add(9600); cbUSBBaud.Items.Add(14400); cbUSBBaud.Items.Add(19200); cbUSBBaud.Items.Add(28800); cbUSBBaud.Items.Add(38400); cbUSBBaud.Items.Add(57600); cbUSBBaud.Items.Add(115200); //cbUSBPort.SelectedIndex = 0; cbUSBBaud.SelectedIndex = 8; form1 = mf; //setting defaults //connectionType = 0; //triggerCheck(); newChecker = true; broadcast = new Broadcast(form1); TElement_Constant triggerElement = new TElement_Constant("trigger", CVRT.getBytes("#")); broadcast.transmission.AddTElement(triggerElement); dgvTransmission.AutoGenerateColumns = false; this.dgvTransmission.DataSource = broadcast.transmission.TElementList; }
public void addBroadcast(Broadcast newBroadcast) { this.broadcasts.Add(newBroadcast); this.dgvBroadcastList.DataSource = broadcasts; }