示例#1
0
 public async Task<LgWebOsMouseService> GetMouse()
 {
     if (_mouseConnection != null) return _mouseConnection;
     var requestMessage = new RequestMessage("ssap://com.webos.service.networkinput/getPointerInputSocket", new { });
     var s = await _connection.SendCommandAsync(requestMessage);
     var socketPath = (string)s.socketPath;
    
     _mouseConnection = new LgWebOsMouseService(new LgTvApiCore());
     await _mouseConnection.Connect(socketPath);
     return _mouseConnection;
 }
示例#2
0
        public async Task <LgWebOsMouseService> GetMouse()
        {
            if (_mouseConnection != null)
            {
                return(_mouseConnection);
            }
            var requestMessage = new RequestMessage("ssap://com.webos.service.networkinput/getPointerInputSocket", new { });
            var s = await _connection.SendCommandAsync(requestMessage);

            var socketPath = (string)s.socketPath;

            _mouseConnection = new LgWebOsMouseService(new LgTvApiCore());
            await _mouseConnection.Connect(socketPath);

            return(_mouseConnection);
        }