Beispiel #1
0
        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();
                }
            }
        }
Beispiel #2
0
 private void Button11_Click(object sender, EventArgs e)
 {
     //read volume
     if (device is CardDevice)
     {
         if (deviceCom is CardDeviceCom)
         {
             CardDeviceCom cardDeviceCom = deviceCom as CardDeviceCom;
             clickEventNum = CLICKEVENTNUM.GETACCRANGE;
             cardDeviceCom.sendSearchAccRange();
         }
     }
     else if (device is WarningDevice)
     {
         if (deviceCom is WarningDeviceCom)
         {
             WarningDeviceCom warningDeviceCom = deviceCom as WarningDeviceCom;
             clickEventNum = CLICKEVENTNUM.GETVOLUME;
             warningDeviceCom.sendSerachWarningVolumeCom();
         }
     }
 }