在线程循环中调用JavaScript

时间:2016-05-11 23:28:54

标签: javascript c# html .net multithreading

我正在使用

  

this.webbrowser.InvokeScript("JS function", arguments);

调用javascript函数==>工作良好 但我需要使用线程系统进行多任务处理

using System.Windows.Threading;

如何在线程循环中调用javascript函数?

我的项目是为无人机创建一个GCS(无人机的地面控制站),所以我的地理坐标来自我的无人机(GPS), 我需要在我的Windows应用程序中绘制路径。

所以我在网页浏览器中加载了一个本地页面代码(使用google api,html和javascript), 这是我需要调用的JS函数(不要在我的windows应用程序中使用它,只是为了在我的浏览器中执行该函数):

function DrawLinePlane(lat,lon,alt){      // some code
      flightString.getCoordinates().pushLatLngAlt(lat,lon,alt); // Add LineString points.
          //some code
    }

所以基本上当我收到新的coodinate时,我必须在我的页面中调用DrawLinePlane finction, 为此我使用线程循环来接收那些坐标并绘制该路径,并且invokeScript在此循环中不起作用

1 个答案:

答案 0 :(得分:0)

你必须在你的主题中做这样的事情:

 curl -v https://gitlabserver.domain.com
* About to connect() to gitlabserver.domain.com port 443 (#0)
*   Trying ip address...
* Connected to gitlabserver.domain.com (ipaddress) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* NSS error -12286 (SSL_ERROR_NO_CYPHER_OVERLAP)
* Cannot communicate securely with peer: no common encryption algorithm(s).
* Closing connection 0
curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s).
相关问题