From ef52fd6fd07508883dce4eb002acda59f0169e59 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期四, 23 四月 2026 10:19:33 +0800
Subject: [PATCH] 优化;
---
Plugin.CurrentSensorControl/BurnInSettingModal.xaml.cs | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/Plugin.CurrentSensorControl/BurnInSettingModal.xaml.cs b/Plugin.CurrentSensorControl/BurnInSettingModal.xaml.cs
index 4269ecb..576146b 100644
--- a/Plugin.CurrentSensorControl/BurnInSettingModal.xaml.cs
+++ b/Plugin.CurrentSensorControl/BurnInSettingModal.xaml.cs
@@ -1,9 +1,8 @@
-锘縰sing HMI.UI.DpUtil;
-using HMI.UI.Util;
+锘縰sing HMI.UI.Util;
using HMI.Util;
using Microsoft.Win32;
using Panuon.WPF.UI;
-using Plugin.CurrentSensorControl.Entity;
+using PLCHelper.Entity;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows.Controls;
@@ -101,6 +100,7 @@
private void DoExport()
{
SaveFileDialog sfd = new SaveFileDialog();
+ sfd.Filter = "Excel 鏂囦欢 (*.xls)|*.xls";
if (sfd.ShowDialog() == true)
{
ExcelHelper.ExportExcel(sfd.FileName, Datasource);
@@ -110,6 +110,7 @@
private void DoImport()
{
OpenFileDialog ofd = new OpenFileDialog();
+ ofd.Filter = "Excel 鏂囦欢 (*.xls)|*.xls";
if (ofd.ShowDialog() == true)
{
try
@@ -124,6 +125,14 @@
}
}
+ private void TryDeleteData(PLCTagData data)
+ {
+ if (MsgBoxHelper2.WarnChoose($"纭畾鍒犻櫎鏁版嵁: {data.Name} 鍚楋紵") == System.Windows.MessageBoxResult.OK)
+ {
+ Datasource.Remove(data);
+ }
+ }
+
private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
{
var btn = sender as Button;
@@ -134,10 +143,12 @@
case "importBtn":
DoImport();
break;
+ case "delBtn":
+ TryDeleteData((PLCTagData)btn.DataContext);
+ break;
default:
break;
}
-
}
}
}
--
Gitblit v1.9.1