Esempio n. 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();
            }
        }
Esempio n. 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;
            }
        }