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

网站建设工作的函找设计网站公司

网站建设工作的函,找设计网站公司,好用的免费网站,做彩铃网站文章目录 avalonia、WPF使用ScottPlot动态显示ECG心电图实现效果#xff0c;动态效果懒得录视频了安装代码部分UpdateData方法就是用来更新心电图表的方法#xff0c; 根据消息队列数据去更新是视图中的ScottPlot 图表 avalonia、WPF使用ScottPlot动态显示ECG心电图 avalonia… 文章目录 avalonia、WPF使用ScottPlot动态显示ECG心电图实现效果动态效果懒得录视频了安装代码部分UpdateData方法就是用来更新心电图表的方法 根据消息队列数据去更新是视图中的ScottPlot 图表 avalonia、WPF使用ScottPlot动态显示ECG心电图 avalonia、WPF使用ScottPlot动态显示ECG心电图 实现效果动态效果懒得录视频了 安装 1.安装ScottPlot.Avalonia NuGet包 注意 如果开发环境是macos、linux需要按照官网步骤配置环境 此处是官网配置链接 代码部分 view部分 注意安装包之后引入 xmlns:ScottPlotclr-namespace:ScottPlot.Avalonia;assemblyScottPlot.Avalonia Window xmlnshttps://github.com/avaloniauixmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:dhttp://schemas.microsoft.com/expression/blend/2008xmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006mc:Ignorabled d:DesignWidth1920 d:DesignHeight600xmlns:vmusing:AvaloniaMedical.ViewModelsx:ClassAvaloniaMedical.Views.xxxmlns:ScottPlotclr-namespace:ScottPlot.Avalonia;assemblyScottPlot.Avaloniax:DataTypevm:xxxmlns:viewsclr-namespace:AvaloniaMedical.Viewsxmlns:iclr-namespace:Avalonia.Xaml.Interactivity;assemblyAvalonia.Xaml.Interactivityxmlns:controls1clr-namespace:Material.Styles.Controls;assemblyMaterial.StylesBackground#31363A此处只显示三导心电ScottPlot:AvaPlot Height200 NameAvaPlotName1 Grid.Row1 Grid.Column0 /ScottPlot:AvaPlotScottPlot:AvaPlot Height200 NameAvaPlotName2 Grid.Row2 Grid.Column0 /ScottPlot:AvaPlotScottPlot:AvaPlot Height200 NameAvaPlotName3 Grid.Row3 Grid.Column0 /ScottPlot:AvaPlot /Windowusing System; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.Threading; using Avalonia; using Avalonia.Controls; using Avalonia.Data; using Avalonia.Markup.Xaml; using Avalonia.Threading; using AvaloniaMedical.ViewModels; using Npoi.Mapper; using ScottPlot; using ScottPlot.Avalonia; using ScottPlot.Plottable;namespace AvaloniaMedical.Views;public partial class xx : Window {private readonly double[] liveData new double[4000];private readonly double[] liveData2 new double[4000];private readonly double[] liveData3 new double[4000];private readonly Timer _updateDataTimer;private readonly DispatcherTimer _renderTimer;private readonly VLine vline;private readonly VLine vline2;private readonly VLine vline3;int nextValueIndex -1;int nextValueIndex2 -1;int nextValueIndex3 -1;AvaPlot AvaPlot1;AvaPlot AvaPlot2;AvaPlot AvaPlot3;public xx(){InitializeComponent();#if DEBUGthis.AttachDevTools(); #endifAvaPlot1 this.FindAvaPlot(AvaPlotName1);AvaPlot2 this.FindAvaPlot(AvaPlotName2);AvaPlot3 this.FindAvaPlot(AvaPlotName3);AvaPlot1.Plot.AddSignal(liveData, 1, color: Color.LightGreen);AvaPlot1.Plot.AxisAutoX(margin: 0);AvaPlot1.Plot.SetAxisLimits(yMin: 2, yMax:7);AvaPlot2.Plot.AddSignal(liveData2, 1, color: Color.LightGreen);AvaPlot2.Plot.AxisAutoX(margin: 0);AvaPlot2.Plot.SetAxisLimits(yMin: 2, yMax: 7);AvaPlot3.Plot.AddSignal(liveData3, 1, color: Color.LightGreen);AvaPlot3.Plot.AxisAutoX(margin: 0);AvaPlot3.Plot.SetAxisLimits(yMin: 2, yMax: 7);vline AvaPlot1.Plot.AddVerticalLine(0, Color.LightGreen, 1);vline2 AvaPlot2.Plot.AddVerticalLine(0, Color.LightGreen, 1);vline3 AvaPlot3.Plot.AddVerticalLine(0, Color.LightGreen, 1);///Binding binding new Binding();binding.Source AvaPlot1;binding.Path new ropertyPath();AvaPlot1.SetValue(TagProperty, 0);AvaPlot1.Plot.Style(Style.Gray1); AvaPlot2.Plot.Style(Style.Gray1); AvaPlot3.Plot.Style(Style.Gray1); customize styling//AvaPlot1.Plot.Title(Electrocardiogram Strip Chart);AvaPlot1.Plot.Grid(true);AvaPlot2.Plot.Grid(true);AvaPlot3.Plot.Grid(true);// create a traditional timer to update the data//_updateDataTimer new Timer(_ UpdateData(), null, 0, 1); create a separate timer to update the GUI_renderTimer new DispatcherTimer{Interval TimeSpan.FromMilliseconds(1)};_renderTimer.Tick Render;_renderTimer.Start();Closed (sender, args) {_updateDataTimer?.Dispose();_renderTimer?.Stop();};}public void UpdateChart(double dto){UpdateData(dto);}public void UpdateChart2(double dto){UpdateData2(dto);}public void UpdateChart3(double dto){UpdateData3(dto);}void UpdateData(double dto){// scroll the whole chart to the left// Array.Copy(liveData, 1, liveData, 0, liveData.Length - 1);// place the newest data point at the enddouble nextValue dto;nextValueIndex (nextValueIndex liveData.Length - 1) ? nextValueIndex 1 : 0;liveData[nextValueIndex] nextValue;vline.IsVisible true;vline.X nextValueIndex;}void UpdateData2(double dto){// scroll the whole chart to the left// Array.Copy(liveData, 1, liveData, 0, liveData.Length - 1);// place the newest data point at the enddouble nextValue dto;nextValueIndex2 (nextValueIndex2 liveData2.Length - 1) ? nextValueIndex2 1 : 0;liveData2[nextValueIndex2] nextValue;vline2.IsVisible true;vline2.X nextValueIndex2;}void UpdateData3(double dto){// scroll the whole chart to the left// Array.Copy(liveData, 1, liveData, 0, liveData.Length - 1);// place the newest data point at the enddouble nextValue dto;nextValueIndex3 (nextValueIndex3 liveData3.Length - 1) ? nextValueIndex3 1 : 0;liveData3[nextValueIndex3] nextValue;vline3.IsVisible true;vline3.X nextValueIndex3;}void Render(object sender, EventArgs e){AvaPlot1.Refresh();AvaPlot2.Refresh();AvaPlot3.Refresh();}private void InitializeComponent(){AvaloniaXamlLoader.Load(this);}protected override void OnClosing(CancelEventArgs e){this.Hide();base.OnClosing(e);}}UpdateData方法就是用来更新心电图表的方法 根据消息队列数据去更新是视图中的ScottPlot 图表
http://www.ho-use.cn/article/10814057.html

相关文章:

  • 企业网站建设的研究开发方法及技术路线专业做网站的软件
  • 建筑企业资质查询网站苏州企业宣传片制作公司
  • 微网站与微信的关系wordpress页面关联目录
  • ppt模板免费下载哪个网站好河南商务网站建设
  • 做网站公司需要帮客户承担广告法吗规范网站建设
  • 宁乡网站开发公司推荐360网站卫士代备案流程
  • 烟台网站建设 烟台网亿网络品牌建设找晓哥
  • 仿唧唧帝笑话门户网站源码带多条采集规则 织梦搞笑图片视频模板wordpress服务器如何使用
  • 网站设计有哪些福建建设厅官网
  • 金融网站开发公司制作网页软件免费
  • 自己做网站和推广wordpress自动分类插件
  • 网站建设与域名备案wordpress你好多莉
  • 建设进出口外贸网站网站建设外包被骗
  • 菏泽 兼职做网站非寻服饰网站建设规划书
  • 个人网站建设网站排名优化便宜的海外服务器
  • 2003 iis网站发布网站电子商务网站策划书3500字
  • 国际网站如何做seo保定seo网站排名
  • 图展网站源码什么是小手机型网站
  • 图书建设网站中国石化工程建设有限公司邮政编码
  • 长沙网络营销推广移动端排名优化软件
  • dell网站的设计特色学软件工程可以从事什么工作
  • 大气家具行业商城类公司网站织梦模板wordpress图片间隙
  • 苏州网站设计都选苏州聚尚网络wordpress菜单栏图标
  • 临沂个人做网站河源市住宅和城乡规划建设局网站
  • 东莞网站开发推荐青岛昌隆文具网站是哪家公司做的
  • 海门网站开发网站系统定制
  • c 开发微网站开发网站后台添加
  • 网站建设实习收获东莞企业网站设计
  • 宁波建站平台小程序怎么开通
  • 辽宁移动网站制作一个官网