| | |
| | | case "BtnIcon": |
| | | OpenSelectIcon(); |
| | | break; |
| | | case "BtnLoginLogo": |
| | | OpenSelectIcon2(); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | 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; |