wenxiangchao
3 天以前 b544d5cccd76735e034c8055918a50927b437474
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;