private void searchDeviceAllInfo() { if (device is CardDevice) { if (deviceCom is CardDeviceCom) { CardDeviceCom cardDeviceCom = deviceCom as CardDeviceCom; cardDeviceCom.sendShowCardDeviceCom(); Thread.Sleep(120); cardDeviceCom.sendSearchRangeTime(); Thread.Sleep(120); cardDeviceCom.sendSearchStillTime(); Thread.Sleep(120); cardDeviceCom.sendSearchAccRange(); } } else if (device is WarningDevice) { if (deviceCom is WarningDeviceCom) { WarningDeviceCom warningDeviceCom = deviceCom as WarningDeviceCom; warningDeviceCom.sendSerachWarningLinkTimeCom(); Thread.Sleep(120); warningDeviceCom.sendSerachWarningSafeDistanceCom(); Thread.Sleep(120); warningDeviceCom.sendSerachWarningVolumeCom(); Thread.Sleep(120); warningDeviceCom.sendSerachWarningCardsCom(); } } }
private void Button7_Click(object sender, EventArgs e) { ////MessageBox.Show("Button7_Click"); //read Link time if (device is CardDevice) { if (deviceCom is CardDeviceCom) { CardDeviceCom cardDeviceCom = deviceCom as CardDeviceCom; clickEventNum = CLICKEVENTNUM.GETRANGETIME; cardDeviceCom.sendSearchRangeTime(); } } else if (device is WarningDevice) { if (deviceCom is WarningDeviceCom) { WarningDeviceCom warningDeviceCom = deviceCom as WarningDeviceCom; clickEventNum = CLICKEVENTNUM.GETLINKTIME; warningDeviceCom.sendSerachWarningLinkTimeCom(); } } }