예제 #1
0
        public void Alarm()
        {
            var stream = new TestStream();

            using var device = new CyberCard(stream);

            // enable
            device.AlarmDisable();
            Assert.Equal("C7:0\r", Encoding.ASCII.GetString(stream.ToWrittenArray()));

            // enable
            device.AlarmEnable();
            Assert.Equal("C7:0\rC7:1\r", Encoding.ASCII.GetString(stream.ToWrittenArray()));
        }
예제 #2
0
 private void buttonAlarmEnable_Click(object sender, EventArgs e)
 {
     Device.AlarmEnable();
 }