Example #1
0
        private void updateInputs()
        {
            if (server == null)
            {
                return;
            }

            if ((supportedInputs & InputType.Cursors) != 0)
            {
                server.AddDataProcessor(cursorProcessor);
            }
            else
            {
                server.RemoveDataProcessor(cursorProcessor);
            }
            if ((supportedInputs & InputType.Blobs) != 0)
            {
                server.AddDataProcessor(blobProcessor);
            }
            else
            {
                server.RemoveDataProcessor(blobProcessor);
            }
            if ((supportedInputs & InputType.Objects) != 0)
            {
                server.AddDataProcessor(objectProcessor);
            }
            else
            {
                server.RemoveDataProcessor(objectProcessor);
            }
        }
Example #2
0
 private void OnDisable()//关闭
 {
     if (server != null)
     {
         server.RemoveDataProcessor(cursorProcessor);
         server.RemoveAllDataProcessors();
         server.Disconnect();
         server = null;
     }
 }