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

wpf触发与模板的使用示例:批量生产工具

批量生产工具

在这里插入图片描述

<Window x:Class="WpfM20UpdateFW.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"xmlns:local="clr-namespace:WpfM20UpdateFW"mc:Ignorable="d"Title="FT_MultiUart Tool V2.7   " Height="600" Width="800" WindowState="Maximized"  Closed="Window_Closed" KeyDown="Window_KeyDown" Loaded="Window_Loaded"><Window.Resources><RoutedUICommand x:Key="download" Text="download"/><RoutedUICommand x:Key="download_concel" Text="download_concel"/><RoutedUICommand x:Key="settings" Text="settings"/></Window.Resources><Window.InputBindings><KeyBinding Gesture="Alt+D" Key="D"  Command="{StaticResource download}"></KeyBinding><KeyBinding Gesture="Alt+C" Key="C"  Command="{StaticResource download_concel}"></KeyBinding><KeyBinding Gesture="Alt+S" Key="S"  Command="{StaticResource settings}"></KeyBinding></Window.InputBindings><Window.CommandBindings><CommandBinding Command="{StaticResource download}" CanExecute="Button_Click_Download"></CommandBinding><CommandBinding Command="{StaticResource download_concel}" CanExecute="Button_Click_DownloadCancel"></CommandBinding><CommandBinding Command="{StaticResource settings}" CanExecute="Button_Click_Settings"></CommandBinding></Window.CommandBindings><Grid ShowGridLines="false" MinWidth="20" FocusManager.FocusedElement="{Binding ElementName=download}" Grid.ColumnSpan="4"><Grid.RowDefinitions><RowDefinition  Height="30"></RowDefinition><RowDefinition  Height="*"></RowDefinition></Grid.RowDefinitions><Grid.ColumnDefinitions><ColumnDefinition Width="0.1*"></ColumnDefinition><ColumnDefinition Width="0.1*"></ColumnDefinition><ColumnDefinition Width="0.1*"></ColumnDefinition><ColumnDefinition Width="0.1*"></ColumnDefinition></Grid.ColumnDefinitions><!--<TextBox Grid.Row="0" Grid.Column="0"  x:Name="Path" IsReadOnly="True"/>--><Button Grid.Row="0" Grid.Column="0" FontSize="20" FontWeight="Bold" Margin="5,0,5,0"  x:Name="settings" Click="Button_Click_Settings">Settings</Button><Button Grid.Row="0" Grid.Column="3" FontSize="20" FontWeight="Bold" Margin="50,0,5,0" x:Name="download" IsDefault="True" Click="Button_Click_Download" >Start</Button><TextBlock Grid.Row="0" Grid.Column="1"  Grid.ColumnSpan="2" x:Name="textBlockDevice" FontFamily="黑体" FontSize="25" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding DeviceCount}"/><ListBox x:Name="myListBox" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="4"><ListBox.ItemsPanel><ItemsPanelTemplate><WrapPanel Orientation="Horizontal" IsItemsHost="True"/></ItemsPanelTemplate></ListBox.ItemsPanel><ListBox.ItemTemplate><DataTemplate><StackPanel x:Name="myStackPanel" Orientation="Vertical" Background="AliceBlue" Margin="1 0 0 0" Width="300" Height="{Binding ActualHeight, ElementName=myListBox, Mode=OneWay}"><TextBlock x:Name="myCom" FontFamily="黑体" FontSize="25" HorizontalAlignment="Center" VerticalAlignment="Center"><TextBlock.Text ><MultiBinding StringFormat="{}COM{0,-4}"><Binding Path="Name"/></MultiBinding></TextBlock.Text></TextBlock><DataGrid x:Name="myDataGrid" AutoGenerateColumns="True"  MaxHeight="400"  ItemsSource="{Binding DataGridCollection}"><DataGrid.RowStyle><Style TargetType="DataGridRow"><Setter Property="Background" Value="White" /><Style.Triggers><!-- 这里是根据条件来设置颜色,假设你想要将满足某个条件的行背景设置为绿色 --><DataTrigger Binding="{Binding Row[状态]}" Value="PASS"><Setter Property="Background" Value="Green" /></DataTrigger><DataTrigger Binding="{Binding Row[状态]}" Value="FAIL"><Setter Property="Background" Value="Red" /></DataTrigger><DataTrigger Binding="{Binding Row[状态]}" Value="SKIP"><Setter Property="Background" Value="Gray" /></DataTrigger></Style.Triggers></Style></DataGrid.RowStyle></DataGrid><TextBlock x:Name="myStatus" Text="{Binding Path=Status}" FontFamily="黑体" FontSize="40"  FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"><TextBlock.Style><Style TargetType="TextBlock"><Setter Property="Foreground" Value="White" /><Style.Triggers><!-- 这里是根据条件来设置颜色,假设你想要将满足某个条件的行背景设置为绿色 --><DataTrigger Binding="{Binding Status}" Value="PASS"><Setter Property="Foreground" Value="Green" /></DataTrigger><DataTrigger Binding="{Binding Status}" Value="FAIL"><Setter Property="Foreground" Value="Red" /></DataTrigger><DataTrigger Binding="{Binding Status}" Value="SKIP"><Setter Property="Foreground" Value="Gray" /></DataTrigger><DataTrigger Binding="{Binding Status}" Value="READY"><Setter Property="Foreground" Value="Black" /></DataTrigger></Style.Triggers></Style></TextBlock.Style></TextBlock><TextBox x:Name="myLog" Text="{Binding Path=Log}" MinHeight="100" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" AcceptsReturn="True" IsReadOnly="True" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" /></StackPanel></DataTemplate></ListBox.ItemTemplate></ListBox><!--<ListView x:Name="myListBox" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="4"><ListView.ItemsPanel><ItemsPanelTemplate><WrapPanel Orientation="Horizontal" IsItemsHost="True"/></ItemsPanelTemplate></ListView.ItemsPanel><ListView.ItemTemplate><DataTemplate><StackPanel Orientation="Vertical" Background="AliceBlue" Margin="1 0 0 0" Width="300" Height="{Binding ActualHeight, ElementName=myListBox, Mode=OneWay}"><TextBlock x:Name="textBlock" FontFamily="黑体" FontSize="25" HorizontalAlignment="Center" VerticalAlignment="Center"><TextBlock.Text ><MultiBinding StringFormat="{}COM{0,-4}"><Binding Path="Name"/></MultiBinding></TextBlock.Text></TextBlock><DataGrid Name="myDataGrid" AutoGenerateColumns="True"  MaxHeight="500" /><TextBlock Text="{Binding Path=Status}" Foreground="{Binding Path=StatusForeground}" FontFamily="黑体" FontSize="40" HorizontalAlignment="Center" VerticalAlignment="Center"/><TextBox x:Name="logText" MinHeight="100" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" AcceptsReturn="True" IsReadOnly="True" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" /></StackPanel></DataTemplate></ListView.ItemTemplate>--><!-- 添加数据绑定项 --><!--</ListView>--><!--<ListBox DockPanel.Dock="Top"  x:Name="myListBoxSP" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Center"><ListBox.ItemTemplate><DataTemplate><Grid><ProgressBar x:Name="Progress"><ProgressBar.Value><Binding Path="ProgressValue"></Binding></ProgressBar.Value><ProgressBar.Foreground><Binding Path="ProgressForeground"></Binding></ProgressBar.Foreground></ProgressBar><TextBlock x:Name="textBlock" FontFamily="黑体" FontSize="25" HorizontalAlignment="Center" VerticalAlignment="Center"><TextBlock.Text ><MultiBinding StringFormat="{}SP  COM{0,-4}{1,4}%"><Binding Path="Name"/><Binding Path="Value" ElementName="Progress"/></MultiBinding></TextBlock.Text></TextBlock></Grid></DataTemplate></ListBox.ItemTemplate></ListBox>--></Grid>
</Window>

还是不习惯数据绑定的方式,总是想用getcontrol先获取控件,再对控件进行处理。我注释后,绑定也很方便!!!

private void Window_Loaded(object sender, RoutedEventArgs e)
{DataTable dataTable = new DataTable();dataTable.Columns.Add("序号", typeof(int));dataTable.Columns.Add("测试项", typeof(string));dataTable.Columns.Add("状态", typeof(string));dataTable.Columns.Add("值", typeof(string));for (int j = 1; j <= 40; j++){dataTable.Rows.Add(j, "读SN", j < 10?"PASS":"FAIL","FT123456789");}for (int i = 0; i < bindingList.Count; i++){//TextBlock myCom = (TextBlock)MyAPI.getControl(myListBox, i, "myCom");//DataGrid myDataGrid = (DataGrid)MyAPI.getControl(myListBox, i, "myDataGrid");//if (myDataGrid != null)//{//    myDataGrid.ItemsSource = dataTable.DefaultView;//}bindingList[i].DataGridCollection = dataTable.DefaultView;//TextBlock myStatus = (TextBlock)MyAPI.getControl(myListBox, i, "myStatus");//myStatus.Text = "PASS";bool b = true;for (int k = 0; k < dataTable.Rows.Count; k++) {if (dataTable.Rows[k]["状态"].Equals("FAIL")){b = false;}}bindingList[i].Status = b?"PASS":"FAIL";//TextBlock myLog = (TextBlock)MyAPI.getControl(myListBox, i, "myLog");//myLog.Text = "测试完成";bindingList[i].Log = "测试完成";}
}

触发示例:多种状态对应不同颜色

DataTrigger 可以设置多种状态,每种状态对应不同的颜色。你可以为 DataGridRow 设置多个 DataTrigger,根据不同的条件更改行的颜色。假设你有一个 Status 列,不同的状态对应不同的颜色,比如 “Green”、“Yellow”、“Red” 等。

示例:多种状态对应不同颜色

假设 DataTable 中有一个 Status 列,根据 Status 的值来设置不同的背景颜色。

1. 创建 DataTable 并绑定到 DataGrid
// 创建 DataTable
DataTable table = new DataTable();
table.Columns.Add("Name", typeof(string));
table.Columns.Add("Status", typeof(string)); // 状态列,用于改变颜色// 添加示例数据
table.Rows.Add("Item 1", "Green");  // 对应绿色
table.Rows.Add("Item 2", "Yellow"); // 对应黄色
table.Rows.Add("Item 3", "Red");    // 对应红色// 绑定到 DataGrid
myDataGrid.ItemsSource = table.DefaultView;
2. 在 XAML 中定义 DataGridRowStyle

使用多个 DataTrigger 为不同的状态设置不同的行背景颜色:

<DataGrid x:Name="myDataGrid" AutoGenerateColumns="True"><DataGrid.RowStyle><Style TargetType="DataGridRow"><Setter Property="Background" Value="White" /> <!-- 默认背景色 --><Style.Triggers><!-- 当 Status 为 "Green" 时,将行背景设置为绿色 --><DataTrigger Binding="{Binding Path=Row[Status]}" Value="Green"><Setter Property="Background" Value="LightGreen" /></DataTrigger><!-- 当 Status 为 "Yellow" 时,将行背景设置为黄色 --><DataTrigger Binding="{Binding Path=Row[Status]}" Value="Yellow"><Setter Property="Background" Value="Yellow" /></DataTrigger><!-- 当 Status 为 "Red" 时,将行背景设置为红色 --><DataTrigger Binding="{Binding Path=Row[Status]}" Value="Red"><Setter Property="Background" Value="Salmon" /></DataTrigger><!-- 你可以添加更多状态和对应的颜色 --></Style.Triggers></Style></DataGrid.RowStyle>
</DataGrid>

3. 动态修改 DataTable 行状态

你可以在代码中动态修改 Status 列的值来触发颜色变化:

// 将第一行的状态设置为 "Red",触发行背景变为红色
table.Rows[0]["Status"] = "Red";

解释

  • Path=Row[Status]:绑定到 DataRowViewRow 属性中的 Status 列。
  • 每个 DataTrigger 针对 Status 列的不同值设置不同的背景颜色。
  • 你可以根据需要添加更多的 DataTrigger,为更多的状态设置不同的颜色。

这样,你可以通过修改 DataTable 中的状态值,动态控制 DataGrid 中行的颜色变化。

相关文章:

wpf触发与模板的使用示例:批量生产工具

批量生产工具 <Window x:Class"WpfM20UpdateFW.MainWindow"xmlns"http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x"http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d"http://schemas.microsoft.com/expressio…...

brew install node提示:Error: No such keg: /usr/local/Cellar/node

打开本地文件发现Cellar目录下无法生成 node文件&#xff0c;应该是下载时出现问题&#xff0c;重复下载无法解决问题&#xff0c;只能重新安装brew。 步骤1&#xff08;安装 brew&#xff09;&#xff1a; /bin/zsh -c “$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/ra…...

记录一下gitlab社区版的安装教程

目录 1.更新系统软件包 2.安装必要的依赖 3.添加GitLab源 3.1对于GitLab Enterprise Edition&#xff08;EE&#xff09;&#xff1a; 3.2对于GitLab Community Edition&#xff08;CE&#xff09;&#xff1a; 4.安装GitLab 4.1安装GitLab Enterprise Edition&#xff08;E…...

20. 如何在MyBatis中处理多表关联查询?常见的实现方式有哪些?

在MyBatis中处理多表关联查询是一项常见的需求&#xff0c;特别是在关系型数据库中存储复杂的实体关系时。MyBatis提供了多种方式来实现多表关联查询&#xff0c;常见的实现方式包括使用<association>和<collection>标签在<resultMap>中进行对象关系映射&…...

【百日算法计划】:每日一题,见证成长(013)

题目 回文链表 给你一个单链表的头节点 head &#xff0c;请你判断该链表是否为回文链表。如果是&#xff0c;返回 true &#xff1b;否则&#xff0c;返回 false 。 输入&#xff1a;head [1,2,2,1] 输出&#xff1a;true 思路 找到中间节点反转后半部分链表前后链表顺序比…...

PCL 读取和保存点云

目录 一、概述 1.1原理 1.2实现步骤 二、代码实现 2.1关键函数 2.2完整代码 三、实现效果 PCL点云算法汇总及实战案例汇总的目录地址链接&#xff1a; PCL点云算法与项目实战案例汇总&#xff08;长期更新&#xff09; 一、概述 1.1原理 PCL (Point Cloud Library) 是…...

js | TypeError: Cannot read properties of null (reading ‘indexOf’) 【解决】

js | TypeError: Cannot read properties of null (reading ‘indexOf’) 【解决】 描述 概述 在前端开发中&#xff0c;遇到TypeError: Cannot read properties of null (reading indexOf)这类错误并不罕见。这个错误通常表明你试图在一个null值上调用indexOf方法&#xff0c…...

微信小程序-formData使用

作者&#xff1a;fyupeng 技术专栏&#xff1a;☞ https://github.com/fyupeng 项目地址&#xff1a;☞ https://github.com/fyupeng/distributed-blog-system-api 留给读者 一、介绍 在小程序中使用formdata上传数据&#xff0c;可实现多文件上传 跟浏览器中的FormData对象类…...

潜在语义分析(Latent Semantic Analysis,LSA)—无监督学习方法、非概率模型、判别模型、线性模型、非参数化模型、批量学习

定义 输入: X [ x 11 x 12 ⋯ x 1 n x 21 x 22 ⋯ x 2 n ⋮ ⋮ ⋮ ⋮ x m 1 x m 2 ⋯ x m n ] , 文本集合 D { d 1 , d 2 , ⋯ , d n } , 单词集合 W { ω 1 , ω 2 , ⋯ , ω m } , x i j : 单词 ω i 在文本 d j 中出现的频数或权值 X\left[ \begin{array}{cccc} x_{11} …...

【安全漏洞】MySQL 8.0.33 、CVE-2023-22102

mysql-connector-java:jar:8.0.33已经重新定位到mysql-connector-j:jar:8.0.33 安全漏洞描述 在SBOM扫描过程中&#xff0c;检测到mysql-connector-j:8.0.33存在如下高危安全漏洞&#xff1a; CVE-2023-22102&#xff1a;Oracle MySQL Connectors 8.1.0 版本之前存在安全漏洞&…...

Flutter 响应式框架

一、简介 响应式框架会自动使用户界面适应不同的屏幕大小。创建你的用户界面一次&#xff0c;让它显示完美的像素在移动&#xff0c;平板电脑和桌面&#xff01; 1.1 问题 支持多种显示尺寸通常意味着要多次重新创建同一布局。在传统的Bootstrap方法下&#xff0c;构建响应式…...

电脑AE特效软件 After Effects软件2017中文版下载安装指南 (Win/Mac)

电脑ae特效软件 After Effects软件2017中文版下载安装win/... 电脑AE特效软件 After Effects软件2017中文版下载安装指南 (Win/Mac) Adobe After Effects 2017 是一款功能强大的视频后期处理软件&#xff0c;广泛应用于影视特效制作、动态图形设计、视觉效果合成等领域。其丰…...

C#中的装箱和拆箱是什么

在 C# 中&#xff0c;装箱&#xff08;Boxing&#xff09;和拆箱&#xff08;Unboxing&#xff09;是与值类型和引用类型相关的概念&#xff0c;涉及到值类型的数据在托管堆&#xff08;Heap&#xff09;上的存储方式。 装箱&#xff08;Boxing&#xff09; 装箱是指将值类型…...

在 Debian 12 上安装中文五笔输入法

在 Debian 12 上安装中文五笔输入法&#xff0c;你可以通过以下步骤进行&#xff1a; 更新系统包列表&#xff1a; 打开终端&#xff0c;首先更新你的系统包列表&#xff1a; sudo apt update安装输入法框架&#xff1a; 安装 fcitx5 输入法框架&#xff1a; sudo apt install …...

整流器制造5G智能工厂物联数字孪生平台,推进制造业数字化转型

整流器制造行业作为制造业的重要组成部分&#xff0c;也在积极探索数字化转型的新路径。整流器&#xff0c;作为电力电子领域的关键元件&#xff0c;广泛应用于通信、工业控制、新能源等多个领域&#xff0c;其制造过程的智能化升级不仅关乎产品性能的提升&#xff0c;更是推动…...

算法知识点——常用输入输出数据的方式

如果输入的每组数据的结果不相互干扰的话&#xff0c;就可以在本次操作的时候将该组数据的相关结果进行输出。 1、n组输入输出(n确定&#xff09; scanf("%d",&n); while(n--) {scanf("%d %d",&a,&b); printf("%d %d\n",a,b);}cin…...

如何构建大数据治理平台,助力企业数据决策

建设背景 &#xff08;1&#xff09;什么是数据资产 资产由企业及组织拥有和控制&#xff0c;能够提供增值服务、带来经济利益的重要资源。 资产不但需要管理&#xff0c; 更需要运营。 &#xff08;2&#xff09;数据资产运营中的问题 数据资产运营中存在的问题主要包括以下…...

Playwright与Selenium的对比:谁是更适合你的自动化测试工具?

在自动化测试领域&#xff0c;Selenium 一直是行业的标杆工具。它功能强大、支持多浏览器、广泛应用于各类项目中。然而&#xff0c;随着技术的发展&#xff0c;新的工具不断涌现&#xff0c;Playwright 作为其中的佼佼者&#xff0c;以其现代化的设计和强大的特性吸引了越来越…...

Netty 相关问题

传统网络编程存在的问题 传统网络编程存在以下问题&#xff1a; 线程创建开销&#xff1a;在Java中&#xff0c;创建线程需要调用操作系统API&#xff0c;这会消耗资源和时间。内存占用高&#xff1a;线程本身占用内存&#xff0c;创建过多线程会导致内存资源紧张。CPU使用率…...

JAVA中线程池的详解

1.概念 顾名思义&#xff0c;线程池就是管理一系列线程的资源池&#xff0c;其提供了一种限制和管理线程资源的方式。每个线程池还维护一些基本统计信息&#xff0c;例如已完成任务的数量。 这里借用《Java 并发编程的艺术》书中的部分内容来总结一下使用线程池的好处&#x…...

【PyTorch单点知识】深入了解 nn.ModuleList和 nn.ParameterList模块:灵活构建动态网络结构

文章目录 0. 前言1. 为什么需要 nn.ModuleList 和 nn.ParameterList&#xff1f;2. nn.ModuleList&#xff1a;管理模块的列表2.1 什么是 nn.ModuleList&#xff1f;2.2 创建 nn.ModuleList2.3 动态添加或删除层 3. nn.ParameterList&#xff1a;管理参数列表3.1 什么是 nn.Par…...

vscode创建Python虚拟环境无法激活问题处理

系统环境 win7环境,Python3.7,VScode1.70.3 问题报错: PS C:\Users\Administrator\PycharmProjects\websites> .\venv\Scripts\activate 无法加载文件 C:\Users\Administrator\PycharmProjects\websites\venv\Scripts\Activate.ps1,因为在此系统中禁止执行脚本。有关…...

【Go】Go语言中的基本数据类型与类型转换

✨✨ 欢迎大家来到景天科技苑✨✨ &#x1f388;&#x1f388; 养成好习惯&#xff0c;先赞后看哦~&#x1f388;&#x1f388; &#x1f3c6; 作者简介&#xff1a;景天科技苑 &#x1f3c6;《头衔》&#xff1a;大厂架构师&#xff0c;华为云开发者社区专家博主&#xff0c;…...

【Python中导入Tkinter模块创建计算器界面】

使用Tkinter库创建计算器界面涉及布局多个控件&#xff08;如按钮、输入框和标签&#xff09;以形成一个用户友好的界面。以下是一个基本的步骤和示例代码&#xff0c;展示了如何使用Tkinter创建一个简单的计算器界面。 步骤 导入Tkinter库&#xff1a;首先&#xff0c;你需要…...

中关村科金推出得助音视频鸿蒙SDK,助力金融业务系统鸿蒙化提速

鸿蒙生态大势所趋&#xff0c;各种应用适配加速 近日&#xff0c;华为纯血鸿蒙系统&#xff08;HarmonyOS NEXT&#xff09;再度引发市场高度关注。据媒体消息&#xff0c;鸿蒙NEXT Beta版将在9月24日对Mate 60系列、X5系列、Pura70系列等16款旗舰机型进行推送&#xff0c;这已…...

如何实现视频数据的PES打包和传输?

实现视频的PES&#xff08;Packetized Elementary Stream&#xff09;打包和传输涉及多个步骤&#xff0c;主要包括视频数据的编码、PES打包、以及通过网络协议的传输。以下是大概的实现思路&#xff1a; 一、视频数据编码 原始视频数据获取&#xff1a; 获取需要传输的原始视…...

【软考】程序设计语言基础

【软考】程序设计语言基础 一.程序设计语言基础概念 计算机要通过程序或指令来控制才能完成各种任务。程序设计语言&#xff08;计算机语言&#xff09;&#xff1a;人与机器交换信息的语言。 1.程序设计语言 计算机语言大致分为机器语言、汇编语言和高级语言三种。机器语言…...

野指针与空指针的异同

1、什么是野指针 在了解什么是野指针之前我们要知道什么是指针即指针的定义是什么。 指针&#xff1a;是一种特殊的变量类型&#xff0c;它存储的是一个内存地址&#xff0c;该地址指向另一个变量的位置。可以通过指针来间接访问和修改该地址所指向的变量的值。 PS&#xff…...

虚拟存储器“大观”,讲解核心逻辑知识和408大题方法

虚拟存储器 写在前面&#xff1a;虚拟存储器&#xff08;Virtual Memory&#xff09;是计算机系统中用于管理内存的一种技术&#xff0c;它通过虚拟地址空间为进程提供比物理内存更大的地址空间&#xff0c;同时实现内存保护和进程隔离。 在408整个体系中计组和操作系统都有涉…...

【AI赋能医学】基于深度学习和HRV特征的多类别心电图分类

一、数据集简介 论文中使用了来自三类不同心电图记录的162条数据&#xff0c;这些数据来自三个公开的数据库&#xff1a; MIT-BIH 心律失常数据库 (ARR) 96条记录&#xff0c;主要包含不同类型的心律失常样本。 MIT-BIH 正常窦性心律数据库 (NSR) 36条记录&#xff0c;包含健…...