private void bAntSet_Click(object sender, EventArgs e) { byte ant_sel = 0; byte antH = 0; int status = 0; if (ant1.Checked) { ant_sel |= 0x01; } if (ant2.Checked) { ant_sel |= 0x02; } if (ant3.Checked) { ant_sel |= 0x04; } if (ant4.Checked) { ant_sel |= 0x08; } status = Reader1.SetAnt(ant_sel); if (status != 0) { lInfo.Items.Add("Set ant failed!"); return; } lInfo.Items.Add("Set ant success!"); }
private void Set_Ant() { byte ant_sel = 0; int status; ant_sel |= 0x01; status = Api.SetAnt(ant_sel); if (status != 0) { listView1.Items.Add("Set ant failed!"); return; } listView1.Items.Add("Set ant success!"); }