private void 停止同步数据ToolStripMenuItemClick(object sender, EventArgs e) { DeviceAdapter.Stop(); 步数据ToolStripMenuItem.Enabled = true; 停止同步数据ToolStripMenuItem.Enabled = false; timer1.Enabled = false; }
public void AdapterTest() { IDevice device = new DeviceAdapter(); device.Start(); Assert.IsTrue(device.IsRunning); device.Stop(); Assert.IsFalse(device.IsRunning); }
protected override void OnStop() { device.Stop(); }