alielie
2025-03-26 4cac1b533e133fdc8b3def90a0f998820f51907a
HMI.SettingControl/SettingControl.xaml.cs
@@ -1,13 +1,11 @@
using System;
using 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}");
                }
            }
        }