public frmMain() { InitializeComponent(); string[] ports = System.IO.Ports.SerialPort.GetPortNames(); cmbPort.Items.AddRange(ports); cmbPort.SelectedIndex = 0; mPlot = new frmPlot(); }
private void btnPlot_Click(object sender, EventArgs e) { mPlot.Close(); mPlot = new frmPlot(); if (mPlot.plot(dataArr)) mPlot.Show(); }