From 66895d613ea87a37cd295f5b0bd1cdd095df3879 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期四, 14 九月 2023 21:08:12 +0800 Subject: [PATCH] 添加删除功能~ --- DataLoader/MainWindow.xaml.cs | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/DataLoader/MainWindow.xaml.cs b/DataLoader/MainWindow.xaml.cs index efb818d..27ec985 100644 --- a/DataLoader/MainWindow.xaml.cs +++ b/DataLoader/MainWindow.xaml.cs @@ -10,6 +10,7 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Data; +using System.Windows.Forms.VisualStyles; namespace DataLoader { @@ -165,6 +166,23 @@ this.isBusy = false; } + // 鍒犻櫎 + private void Del_MouseLeftButtonDown(object sender, RoutedEventArgs e) + { + if (null == this.viewDatas || this.viewDatas.Count == 0) return; + + int i = 0; + while (i < this.viewDatas.Count) + { + if (this.viewDatas[i] != null && this.viewDatas[i].Checked) + { + this.viewDatas.RemoveAt(i); + continue; + } + i++; + } + } + // 瀵煎叆 private void Import_MouseLeftButtonDown(object sender, RoutedEventArgs e) { -- Gitblit v1.9.3