From 7bf89fd93bc487e8445d6d85bb527251b7371a04 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 12 五月 2025 13:14:11 +0800
Subject: [PATCH] 优化项目;
---
HMI.SettingControl/SettingControl.xaml.cs | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/HMI.SettingControl/SettingControl.xaml.cs b/HMI.SettingControl/SettingControl.xaml.cs
index fceb973..9535129 100644
--- a/HMI.SettingControl/SettingControl.xaml.cs
+++ b/HMI.SettingControl/SettingControl.xaml.cs
@@ -1,13 +1,11 @@
-锘縰sing System;
+锘縰sing HMI.Base;
+using HMI.Core.Api;
+using HMI.Core.Util;
+using HMI.UI.Util;
+using System;
using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
using System.Windows;
using System.Windows.Controls;
-using HMI.Base;
-using HMI.Core.Api;
-using HMI.UI.Util;
-using log4net;
namespace HMI.SettingControl
{
@@ -51,6 +49,7 @@
Content = d.SettingControl
});
}
+ tabControl.SelectedIndex = 0;
Loaded -= UserControl_Loaded;
}
@@ -80,14 +79,14 @@
try
{
manager.SaveConfig();
+ this.Success(this.lang("App.SaveSuccess"));
}
catch (Exception ex)
{
- MsgBoxHelper.Error(this, $"淇濆瓨{tabItem.Header}閰嶇疆澶辫触锛亄ex.Message}");
+ MsgBoxHelper.Error(this, $"{tabItem.Header}{this.lang("App.SaveFailed")}: {ex.Message}");
}
}
}
- this.Success("淇濆瓨鎴愬姛");
}
private void SaveCurrentConfig()
@@ -101,7 +100,7 @@
}
catch (Exception ex)
{
- MsgBoxHelper.Error(this, $"淇濆瓨閰嶇疆澶辫触锛亄ex.Message}");
+ MsgBoxHelper.Error(this, $"{this.lang("App.SaveFailed")}: {ex.Message}");
}
}
}
@@ -117,7 +116,7 @@
}
catch (Exception ex)
{
- MsgBoxHelper.Error(this, $"淇濆瓨閰嶇疆澶辫触锛亄ex.Message}");
+ MsgBoxHelper.Error(this, $"{this.lang("App.SaveFailed")}: {ex.Message}");
}
}
}
--
Gitblit v1.9.1