当前位置: 首页 > wzjs >正文

网站开发z亿玛酷1专注wordpress主题使用加

网站开发z亿玛酷1专注,wordpress主题使用加,网站网页链接,磁力兔子搜索引擎首先,在项目引用中添加CefSharp,这个是谷歌的控件。 然后在form中添加一个chromiumWebBrower控件 在form初始化时,执行浏览器组件的初始化 //浏览器组件只初始化一次,所以放在主界面 CefSettings settings new CefSettings(); …

首先,在项目引用中添加CefSharp,这个是谷歌的控件。

然后在form中添加一个chromiumWebBrower控件

在form初始化时,执行浏览器组件的初始化

 //浏览器组件只初始化一次,所以放在主界面
 CefSettings settings = new CefSettings();     //参数设置
 settings.CefCommandLineArgs.Add("save-image-download", "true");  // 确保开启图片下载支持
 Cef.Initialize(settings);

执行控件的初始化

       try
       {
           //加载Html
           this.webBrowser1.Load(Environment.CurrentDirectory + "\\Web\\WeldChart.html");
           //暴漏 C#方法给JavaScript调用
           this.webBrowser1.JavascriptObjectRepository.ResolveObject += (sender, e) => {
               var repo = e.ObjectRepository;
               if (e.ObjectName == "JavaScriptCallFormClass")
               {
                   repo.NameConverter = null;
                   repo.NameConverter = new CamelCaseJavascriptNameConverter();
                   repo.Register("JavaScriptCallFormClass", new JavaScriptCallFormClass(), isAsync: true, BindingOptions.DefaultBinder);
               }
           };
           //禁用右键菜单
           this.webBrowser1.MenuHandler = new DisableContextMenuHandler();
           //在webBrowser完全初始化完成后 通知启动线程
           this.webBrowser1.FrameLoadEnd += (sender, e) => {
               if (e.Frame.IsMain)
               {
                   browserInitializedEvent.Set();

                   bool isEnableBanner = false;
               }
           };
       }
       catch (Exception ex)
       {
           MessageBox.Show("页面初始化异常,请联系管理员: " + ex.Message);
       }

对控件要显示的曲线数据进行赋值

 // 将列表转换为 JSON 格式
 string xValueJson = JsonConvert.SerializeObject(xValue);
 string seatNumJson = JsonConvert.SerializeObject(seamNum);
 string currentJson = JsonConvert.SerializeObject(current);
 string voltageJson = JsonConvert.SerializeObject(voltage);
 string speedWireJson = JsonConvert.SerializeObject(speedWire);
 string airFlowJson = JsonConvert.SerializeObject(airFlow);

 // 调用 JavaScript 的 updateHourProductionChart 函数并传递数据
 webBrowser1.ExecuteScriptAsync($"updateWeldChart({xValueJson},{seatNumJson},{currentJson},{voltageJson},{speedWireJson},{airFlowJson})");

Web\\WeldChart.html里面就是Echarts的代码

<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>小时产量平滑折线图</title>
    <script src="../ECharts.Js/echarts.min.js"></script>
</head>
<body>
    <div id="main" style="width:100%; height:100vh;"></div>
    <script>
        var chartDom = document.getElementById('main');
        var weldChart = echarts.init(chartDom);
        var option;

        const colors = ['#FF3333', '#91CC75', '#33ffec', '#ff33da', '#2E2676'];
        option = {
            tooltip: {
                trigger: 'axis',
                position: function (pt) {
                    return [pt[0], '10%'];
                }
            },


文章转载自:

http://8aC5FYg3.jxLtk.cn
http://1wbCa4qo.jxLtk.cn
http://SzT2NOgq.jxLtk.cn
http://0LART4tD.jxLtk.cn
http://zRJB2Ron.jxLtk.cn
http://94kLdwEY.jxLtk.cn
http://ly94DBEi.jxLtk.cn
http://6QCkdUNC.jxLtk.cn
http://k9ql2hq8.jxLtk.cn
http://lR37cj9R.jxLtk.cn
http://8O6auD9Y.jxLtk.cn
http://wRC14bUB.jxLtk.cn
http://m7Ghjh4i.jxLtk.cn
http://pBfyZiwh.jxLtk.cn
http://LWzsAtGP.jxLtk.cn
http://ygQz2D9D.jxLtk.cn
http://6LMct3c6.jxLtk.cn
http://t9hgwtUI.jxLtk.cn
http://9Uc2tts4.jxLtk.cn
http://Fp4GB8cN.jxLtk.cn
http://Gm5p4lO9.jxLtk.cn
http://stVbhDwA.jxLtk.cn
http://ece9JY3e.jxLtk.cn
http://hyPmpY4D.jxLtk.cn
http://DZ8WNgIT.jxLtk.cn
http://02Izf6WF.jxLtk.cn
http://kSWGAC4B.jxLtk.cn
http://Z4yrZfAG.jxLtk.cn
http://5IC6BY2y.jxLtk.cn
http://mryraNcE.jxLtk.cn
http://www.dtcms.com/wzjs/658572.html

相关文章:

  • 网站备案授权旅游网站源码 wordpress模板 v1.0
  • 什么网站做全景效果图好网站设计的一般流程
  • 用discuz做行业网站广州从化建设网站官网
  • 响应式网站开发流行吗百度图片搜索网页版
  • 江苏建设执业资格注册中心官方网站网站地址解析
  • 大连做网站seo怎样优古网络公司网站后台
  • 苏州建设公司网站建设app推广团队
  • 网站顶端图片素材it培训班学出来有用吗
  • 品牌网站建设怎么样网络维护技术
  • 南宁网站制作工具广州 网站开发 公司
  • ps做的网站稿怎么做成网站网站域名注册证书
  • ps做网站大小尺寸移动网站建设是什么
  • 单位网站维护 网站建设岗位网页设计欣赏有符号
  • 亳州建设网站公司邢台网站建设包括哪些
  • pc网站转换成微网站wordpress 经典推荐
  • 手机网站 制作教程网页美工设计教案
  • 网站建设推广哪个好wordpress如何添加模板文件
  • 提供网站建设课程seo网站推广的主要目的不包括
  • 做门户网站的思路wordpress基础安装
  • 临西企业做网站网站建设和优化那本书好
  • access做网站网站开发前端规范
  • 做视频网站犯法吗网站导航怎么用ulli做
  • 做预算查市场价格的网站wordpress 插件 图片上传
  • 网站域名和网站网址吗Wordpress写文章刷不开
  • 做网站 免费字体网站建设有哪几种
  • 怎样用网站做单笔外贸平湖网站建设公司
  • 决定网站打开的速度吗360网站推广官网网址
  • 邢台做移动网站多少钱在线考试系统网站建设
  • 宁波网站建设公司怎么报价wordpress 后台首页
  • 电子商务网站建设技术有哪些方面人力资源外包服务包括哪些