Exemplo n.º 1
0
 private void  步数据ToolStripMenuItemClick(object sender, EventArgs e)
 {
     DeviceAdapter.Start();
     步数据ToolStripMenuItem.Enabled    = false;
     停止同步数据ToolStripMenuItem.Enabled = true;
     timer1.Enabled = true;
 }
Exemplo n.º 2
0
        protected override void OnStart(string[] args)
        {
            var config = ConfigurationHelper.CreateConfiguration();

            device = new Rld.DeviceSystem.DeviceAdapter.ZDC2911.DeviceAdapter();
            if (!device.Start(config))
            {
                throw new Exception("device starts fails");
            }
        }
        public void AdapterTest()
        {
            IDevice device = new DeviceAdapter();

            device.Start();

            Assert.IsTrue(device.IsRunning);

            device.Stop();
            Assert.IsFalse(device.IsRunning);
        }