예제 #1
0
 //Button Stop
 private void buttonStop_Click(object sender, EventArgs e)
 {
     if (device == null)
     {
         return;
     }
     if ((device.ConnectionStatus == ConnectionStatus.CS_Connected) &&
         (device.DeviceStatus == DeviceStatus.DS_InScan))
     {
         device.StopScan();
     }
 }
예제 #2
0
 public static void StopScan(RFID_Device localDevice)
 {
     if (localDevice == null)
     {
         return;
     }
     if ((localDevice.ConnectionStatus == ConnectionStatus.CS_Connected) &&
         (localDevice.DeviceStatus == DeviceStatus.DS_InScan))
     {
         localDevice.StopScan();
     }
 }
        private void BoxModeCreateUpdate_FormClosing(object sender, FormClosingEventArgs e)
        {
            db.CloseDB();

            if (_device == null)
            {
                return;
            }
            if (_device.DeviceStatus == DeviceStatus.DS_NotReady)
            {
                _device.StopScan();
            }
            if (_device.ConnectionStatus == ConnectionStatus.CS_Connected)
            {
                _device.ReleaseDevice();
            }
        }