private void button_read_bool_Click(object sender, EventArgs e) { // 读取bool变量 if (textBox12.Text == "1") { DemoUtils.ReadResultRender(panasonicMewtocol.ReadBool(textBox3.Text), textBox3.Text, textBox4); } else { DemoUtils.ReadResultRender(panasonicMewtocol.ReadBool(textBox3.Text, ushort.Parse(textBox12.Text)), textBox3.Text, textBox4); } }
private void Test1() { OperateResult <bool[]> read = panasonicMewtocol.ReadBool("100", 10); if (read.IsSuccess) { bool coil_100 = read.Content[0]; // and so on bool coil_109 = read.Content[9]; } else { // failed string err = read.Message; } }
private void button_read_bool_Click(object sender, EventArgs e) { // 读取bool变量 DemoUtils.ReadResultRender(panasonicMewtocol.ReadBool(textBox3.Text), textBox3.Text, textBox4); }