Exemple #1
0
        public void Start()
        {
            Logger.Log("Bluetooth Service Start");
            if (connectThread != null)
            {
                connectThread.Cancel();
                connectThread = null;
            }

            if (acceptThread == null)
            {
                acceptThread = new AcceptThread(this);
                acceptThread.Start();
            }
        }
Exemple #2
0
        public void Stop()
        {
            Logger.Log("Bluetooth Service Stop");
            if (connectThread != null)
            {
                connectThread.Cancel();
                connectThread = null;
            }

            if (acceptThread != null)
            {
                acceptThread.Cancel();
                acceptThread = null;
            }

            if (connectedThread != null)
            {
                connectedThread.Cancel();
                connectedThread = null;
            }
        }
Exemple #3
0
 public void StartClient(BluetoothDevice device)
 {
     Logger.Log("Bluetooth Service Start Client");
     connectThread = new ConnectThread(this, device);
     connectThread.Start();
 }