From 12e606635c42ea20f4b7c2bdda5204237a4b4c96 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 02 三月 2026 16:14:49 +0800
Subject: [PATCH] 优化
---
HMI.SettingControl/SystemConfig.xaml.cs | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/HMI.SettingControl/SystemConfig.xaml.cs b/HMI.SettingControl/SystemConfig.xaml.cs
index 47525ec..f9877f7 100644
--- a/HMI.SettingControl/SystemConfig.xaml.cs
+++ b/HMI.SettingControl/SystemConfig.xaml.cs
@@ -54,6 +54,9 @@
case "BtnIcon":
OpenSelectIcon();
break;
+ case "BtnLoginLogo":
+ OpenSelectIcon2();
+ break;
default:
break;
}
@@ -83,6 +86,30 @@
}
}
+ private void OpenSelectIcon2()
+ {
+ string BasePath = PathHelper.IconFolder;
+
+ OpenFileDialog openFileDialog = new OpenFileDialog();
+ openFileDialog.Filter = "(*.*)|*.*";
+ openFileDialog.InitialDirectory = BasePath;
+ openFileDialog.Title = this.lang("App.SelectPic");
+ openFileDialog.Multiselect = false;
+
+ if (openFileDialog.ShowDialog() == true)
+ {
+ string FileName = openFileDialog.FileName;
+ if (!FileName.StartsWith(BasePath))
+ {
+ ToastHelper.Warning(Window.GetWindow(this), this.lang("App.IconMustInFolder"));
+ }
+ else
+ {
+ Model.LoginLogoPath = FileName.Replace(BasePath, ".");
+ }
+ }
+ }
+
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
CbLang.ItemsSource = LangUtil.langs;
--
Gitblit v1.9.1