private void disconnect() { if (server != null) { server.RemoveAllDataProcessors(); server.Disconnect(); server = null; } foreach (var i in cursorToInternalId) { cancelPointer(i.Value); } foreach (var i in blobToInternalId) { cancelPointer(i.Value); } foreach (var i in objectToInternalId) { cancelPointer(i.Value); } cursorToInternalId.Clear(); blobToInternalId.Clear(); objectToInternalId.Clear(); }
void disconnect() { if (tuioServer != null) { tuioServer.RemoveAllDataProcessors(); tuioServer.Disconnect(); tuioServer = null; } }
//停止监听 private void Disconnect() { if (mServer != null) { mServer.RemoveAllDataProcessors(); mServer.Disconnect(); mServer = null; } mMarkerDictionary.Clear(); }
private void OnDisable()//关闭 { if (server != null) { server.RemoveDataProcessor(cursorProcessor); server.RemoveAllDataProcessors(); server.Disconnect(); server = null; } }
/// <inheritdoc /> protected override void OnDestroy() { if (server != null) { server.CursorAdded -= OnCursorAdded; server.CursorUpdated -= OnCursorUpdated; server.CursorRemoved -= OnCursorRemoved; server.Disconnect(); } base.OnDestroy(); }
private void disconnect() { if (server != null) { server.RemoveAllDataProcessors(); server.Disconnect(); server = null; } foreach (var i in cursorToInternalId) { cancelTouch(i.Value.Id); } }
private void Disconnect() { if (_tuioServer != null) { _tuioServer.RemoveAllDataProcessors(); _tuioServer.Disconnect(); _tuioServer = null; _waitForEndOfFrame = null; if (_coroutine != null) { StopCoroutine(_coroutine); } _coroutine = null; Instance = null; } }
private static void ListenForTUIO() { Console.WriteLine(string.Format("TUIO listening on port {0}... (Press escape to quit)", port)); // tuio tuioServer = new TuioServer(port); CursorProcessor cursorProcessor = new CursorProcessor(); cursorProcessor.CursorAdded += OnCursorAdded; cursorProcessor.CursorUpdated += OnCursorUpdated; cursorProcessor.CursorRemoved += OnCursorRemoved; BlobProcessor blobProcessor = new BlobProcessor(); blobProcessor.BlobAdded += OnBlobAdded; blobProcessor.BlobUpdated += OnBlobUpdated; blobProcessor.BlobRemoved += OnBlobRemoved; ObjectProcessor objectProcessor = new ObjectProcessor(); objectProcessor.ObjectAdded += OnObjectAdded; objectProcessor.ObjectUpdated += OnObjectUpdated; objectProcessor.ObjectRemoved += OnObjectRemoved; // listen... tuioServer.Connect(); tuioServer.AddDataProcessor(cursorProcessor); tuioServer.AddDataProcessor(blobProcessor); tuioServer.AddDataProcessor(objectProcessor); do { while (!Console.KeyAvailable) { Thread.Sleep(100); } } while (Console.ReadKey(true).Key != ConsoleKey.Escape); // done tuioServer.Disconnect(); tuioServer = null; Console.WriteLine("Bye!"); }
/// <inheritdoc /> protected override void OnDisable() { if (server != null) { server.CursorAdded -= OnCursorAdded; server.CursorUpdated -= OnCursorUpdated; server.CursorRemoved -= OnCursorRemoved; server.Disconnect(); } foreach (var i in cursorToInternalId) { cancelTouch(i.Value); } base.OnDisable(); }