Ejemplo n.º 1
0
Archivo: Form1.cs Proyecto: 287396159/A
        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();
                }
            }
        }
Ejemplo n.º 2
0
Archivo: Form1.cs Proyecto: 287396159/A
 private void Button9_Click(object sender, EventArgs e)
 {
     //read safe Distance
     if (device is CardDevice)
     {
         if (deviceCom is CardDeviceCom)
         {
             CardDeviceCom cardDeviceCom = deviceCom as CardDeviceCom;
             clickEventNum = CLICKEVENTNUM.GETCARDSTILLTIME;
             cardDeviceCom.sendSearchStillTime();
         }
     }
     else if (device is WarningDevice)
     {
         if (deviceCom is WarningDeviceCom)
         {
             WarningDeviceCom warningDeviceCom = deviceCom as WarningDeviceCom;
             clickEventNum = CLICKEVENTNUM.GETSAFEDISTANCE;
             warningDeviceCom.sendSerachWarningSafeDistanceCom();
         }
     }
 }