private void btnDelete_Click(object sender, EventArgs e) { CANStreamer stream = SelectedStream(); if (stream.ConnectionState == ConnectionStateEnum.Connected) { stream.Disconnect(); } StreamManager.RemoveStream(stream); UpdateButtons(); }
private void btnConnect_Click(object sender, EventArgs e) { CANStreamer stream = SelectedStream(); if (stream.ConnectionState == ConnectionStateEnum.Connected) { stream.Disconnect(); } else if (stream.ConnectionState == ConnectionStateEnum.Disconnected) { stream.ConnectStream(); } UpdateButtons(); }