예제 #1
0
        private void Button6_Click(object sender, EventArgs e)
        {
            var device = this.manager.GetDevice(this.SelectIndex);

            if (device != null)
            {
                if (device.State == deviceState.CONNECT)
                {
                    manager.ChangeLed(this.SelectIndex);
                }
                else
                {
                    MessageBox.Show("设备未连接!");
                }
            }
        }
예제 #2
0
        public void ChangeLed(int index)
        {
            var device = this.manager.GetDevice(index);

            if (device != null)
            {
                if (device.State == deviceState.CONNECT)
                {
                    manager.ChangeLed(index);
                }
                else
                {
                    ShowMsg("设备未连接!");
                }
            }
        }
예제 #3
0
 private void Button6_Click(object sender, EventArgs e)
 {
     manager.ChangeLed(this.SelectIndex);
 }