コード例 #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            CANStreamer stream = SelectedStream();

            if (stream.ConnectionState == ConnectionStateEnum.Connected)
            {
                stream.Disconnect();
            }

            StreamManager.RemoveStream(stream);

            UpdateButtons();
        }
コード例 #2
0
        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();
        }