public BBInputController() { client = new TuioClient(3333); client.addTuioListener(this); // Debug.Log ("before calling client.connect (TuioClient client)"); client.connect(); }
public TuioDemo(int port) { verbose = false; fullscreen = false; width = window_width; height = window_height; this.ClientSize = new System.Drawing.Size(width, height); this.Name = "TuioDemo"; this.Text = "TuioDemo"; this.Closing += new CancelEventHandler(Form_Closing); this.KeyDown += new KeyEventHandler(Form_KeyDown); this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true); objectList = new Dictionary <long, TuioObject>(128); cursorList = new Dictionary <long, TuioCursor>(128); blobList = new Dictionary <long, TuioBlob>(128); client = new TuioClient(port); client.addTuioListener(this); client.connect(); }
private void bttConnect_Click(object sender, RoutedEventArgs e) { if (client == null) { try { client = new TuioClient(int.Parse(txtPort.Text)); client.addTuioListener(this); client.connect(); bttConnect.Content = "Disconnect"; lblContent.Content = "Simulator has working !"; DrawLogSystem("Simulator has working!"); } catch (Exception e2) { lblContent.Content = "Can't connect to TUIO host!\nPlease change another port !"; client = null; DrawLogSystem("Simulator can't connect to TUIO host!"); } } else { client.disconnect(); client = null; lblContent.Content = "Simulator has stop working !"; bttConnect.Content = "Connect..."; DrawLogSystem("Simulator has stop working!"); } }
private void Start() { if (_tuioClient != null) { Stop(); } TouchInjection.Initialize(MAX_CONTACTS, this.IsContactVisible ? TouchFeedback.INDIRECT : TouchFeedback.NONE); _tuioClient = new TuioClient(this.Port); _tuioClient.addTuioListener(this); try { _tuioClient.connect(); } catch (Exception e) { this.IsEnabled = false; if (e is SocketException) { SocketException se = (SocketException)e; MessageBox.Show(string.Format("{0}\r\n\r\nError Code: {1} ({2})", se.Message, se.ErrorCode, se.SocketErrorCode), "Error: SocketException", MessageBoxButton.OK, MessageBoxImage.Error); } } }
public BBInputController() { client = new TuioClient(3333); client.addTuioListener(this); client.connect(); cursorDidChange = false; }
public static void Main(String[] argv) { TuioDump demo = new TuioDump(); TuioClient client = null; switch (argv.Length) { case 1: int port = 0; port = int.Parse(argv[0], null); if (port > 0) { client = new TuioClient(port); } break; case 0: client = new TuioClient(); break; } if (client != null) { client.addTuioListener(demo); client.connect(); Console.WriteLine("listening to TUIO messages at port " + client.getPort()); } else { Console.WriteLine("usage: mono TuioDump [port]"); } }
private void InitTracking() { if (_client != null && _client.isConnected()) { Debug.LogWarning("Client is already connected. Abort opening another connection."); return; } _eventQueue = new Queue <TuioEvent>(); // Create a new TUIO client and listen for data on the specified port _client = new TuioClient(_udpPort); _client.addTuioListener(this); _client.connect(); if (!_client.isConnected()) { Debug.LogError("Couldn't listen at port " + _udpPort + " for TUIO data. Check if port isn't already in use. (netstat -ano | find \"" + _udpPort + "\")\n(also be sure to kill adb.exe if its still running)"); _client.removeTuioListener(this); _client = null; } else { Debug.Log("Connection establised: listening at port " + _udpPort + " for TUIO data."); } }
public ibheTuioConnector() { client = new TuioClient(3333); client.addTuioListener(this); client.connect(); Debug.Log("Commencing TUIO connection"); }
public void Start() { client = new TuioClient(); listener = new Listener(this); client.addTuioListener(listener); client.connect(); IsRunning = true; }
public mtConnector(mtManager mang) { client = new TuioClient(3333); client.addTuioListener(this); client.connect(); cursorDidChange = false; activeCursors = client.getTuioCursors(); Debug.Log("Commencing TUIO connection"); mtM = mang; }
public void addListener(TuioListener tl) { m_refClt.addTuioListener(tl); m_iListeners++; //1st connection if (m_iListeners == 1) { m_refClt.connect(); } }
public void Connect() { if (client == null) { // Debug.Log ("client null"); } else { // Debug.Log("client not null"); client.connect(); } }
public void Connect() { //setup TUIO client connection m_Client.connect(); if (this.m_Client.isConnected()) { Debug.Log("Listening to TUIO port " + m_Client.getPort() + "."); } else { Debug.LogError("Failed to connect to TUIO port " + m_Client.getPort() + "."); } }
// Start is called before the first frame update void Start() { Debug.Log("Script start"); objectList = new Dictionary <long, TuioObject>(128); cursorList = new Dictionary <long, TuioCursor>(128); client = new TuioClient(3333); client.addTuioListener(this); client.connect(); gameObjectList = new Dictionary <long, GameObject>(128); Debug.Log("tuio client connected"); }
public bool Connect(int port = 3333) { CursorList = new Dictionary <long, TuioCursorContainer>(); try { client = new TuioClient(port); client.addTuioListener(helper); client.connect(); IsRunning = true; return(true); } catch { IsRunning = false; return(false); } }
public static void RegisterEvents(Window root) { _root = root; try { isSwapXY = Convert.ToBoolean(ConfigurationManager.AppSettings["TUIO_isSwapXY"]); isFlipX = Convert.ToBoolean(ConfigurationManager.AppSettings["TUIO_isFlipX"]); isFlipY = Convert.ToBoolean(ConfigurationManager.AppSettings["TUIO_isFlipY"]); } catch { } client = new TuioClient(3333); client.addTuioListener(tm); client.connect(); root.Closing += new System.ComponentModel.CancelEventHandler(root_Closing); CompositionTarget.Rendering += CompositionTarget_Rendering; }
public void addtuioclient() { client = null; client = new TuioClient(Convert.ToInt32(tuio_port.Text)); if (client != null) { client.addTuioListener(Listener); client.connect(); Console.WriteLine("listening to TUIO messages at port " + client.getPort()); timer1 = new Timer(); timer1.Interval = 100; timer1.Enabled = true; timer1.Tick += new System.EventHandler(OnTimerEvent); } else { Console.WriteLine("usage: java TuioDump [port]"); } }
private void InitTracking() { while (m_client != null && m_client.isConnected()) { Debug.LogWarning("Client still connecting. Waiting..."); } m_eventQueue = new Queue <TuioEvent>(); // Create a new TUIO client and listen for data on the specified port m_client = new TuioClient(m_udpPort); m_client.addTuioListener(this); m_client.connect(); if (!m_client.isConnected()) { Debug.LogError("Couldn't listen at port " + m_udpPort + " for TUIO data. Check if port isn't already in use. (netstat -ano | find \"" + m_udpPort + "\")\n(also be sure to kill adb.exe if its still running)"); m_client.removeTuioListener(this); m_client = null; } else { //Debug.Log ("--- Connection establised: listening at port " + m_udpPort + " for TUIO data. ---"); } }
public TuioListener(int port = 3333) { client = new TuioClient(port); client.addTuioListener(this); client.connect(); }
public BBInputController() { client = new TuioClient(3333); client.addTuioListener(this); client.connect(); }
public TuioUnityListener() { client = new TuioClient(); client.addTuioListener(this); client.connect(); }