From a8da65fd1ae30b0a6d7df7e6fd4f87b57962223a Mon Sep 17 00:00:00 2001 From: zqm Date: Tue, 11 Nov 2025 10:28:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BtnDeleteTempDiff=5FClick?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=8C=E5=9C=A8=E5=88=A0=E9=99=A4=E6=B8=A9?= =?UTF-8?q?=E5=B7=AE=E5=9B=BE=E4=BE=8B=E6=97=B6=E5=B0=86=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E7=9A=84=E5=83=8F=E7=B4=A0=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E9=80=8F=E6=98=8E=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Windows/CS/Framework4.0/Toprie/Toprie/Setting.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Windows/CS/Framework4.0/Toprie/Toprie/Setting.cs b/Windows/CS/Framework4.0/Toprie/Toprie/Setting.cs index 207ded8..183ed4e 100644 --- a/Windows/CS/Framework4.0/Toprie/Toprie/Setting.cs +++ b/Windows/CS/Framework4.0/Toprie/Toprie/Setting.cs @@ -1224,6 +1224,8 @@ namespace JoyD.Windows.CS { try { + Color colorToRemove = Color.Empty; + // 检查是否有选中的行 if (dataGridViewTempDiff.SelectedRows.Count > 0) { @@ -1233,6 +1235,9 @@ namespace JoyD.Windows.CS // 从数据集合中删除该行数据 if (selectedRowIndex >= 0 && selectedRowIndex < tempDiffData.Count) { + // 获取要删除的图例对应的颜色 + colorToRemove = (Color)tempDiffData[selectedRowIndex]["color"]; + tempDiffData.RemoveAt(selectedRowIndex); // 从DataGridView中删除该行 dataGridViewTempDiff.Rows.RemoveAt(selectedRowIndex); @@ -1247,11 +1252,21 @@ namespace JoyD.Windows.CS // 从数据集合中删除该行数据 if (currentRowIndex >= 0 && currentRowIndex < tempDiffData.Count) { + // 获取要删除的图例对应的颜色 + colorToRemove = (Color)tempDiffData[currentRowIndex]["color"]; + tempDiffData.RemoveAt(currentRowIndex); // 从DataGridView中删除该行 dataGridViewTempDiff.Rows.RemoveAt(currentRowIndex); } } + + // 将温差层中对应颜色的像素改为透明色 + if (colorToRemove != Color.Empty && _tempDiffOverlayImage != null) + { + UpdateTempDiffOverlayPixelsColor(colorToRemove, Color.Transparent); + picBoxTemp.Invalidate(); // 刷新显示 + } } catch (Exception ex) {