From ee22df6c94793777fe5b28f2886ebeb2ba2c4256 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 02 九月 2024 21:06:36 +0800 Subject: [PATCH] 1 --- 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..3b7ddd5 100644 --- a/DataLoader/MainWindow.xaml.cs +++ b/DataLoader/MainWindow.xaml.cs @@ -36,6 +36,7 @@ CommonProp.Init(); this.btnLoad.IsEnabled = false; + this.btnDel.IsEnabled = false; this.btnImport.IsEnabled = false; lvView.DataContext = viewDatas; @@ -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