diff --git a/Control/Other/CustomIconUrlDialog.xaml b/Control/Other/CustomIconUrlDialog.xaml index 46e2147..fce78be 100644 --- a/Control/Other/CustomIconUrlDialog.xaml +++ b/Control/Other/CustomIconUrlDialog.xaml @@ -21,22 +21,30 @@ - - + + + + + - - + + + + + - - + diff --git a/Control/Other/CustomIconUrlDialog.xaml.cs b/Control/Other/CustomIconUrlDialog.xaml.cs index 9f97e14..13ee988 100644 --- a/Control/Other/CustomIconUrlDialog.xaml.cs +++ b/Control/Other/CustomIconUrlDialog.xaml.cs @@ -1,4 +1,5 @@ -using GeekDesk.Util; +using GeekDesk.Control.Windows; +using GeekDesk.Util; using GeekDesk.ViewModel; using Microsoft.Win32; using System; @@ -17,8 +18,8 @@ namespace GeekDesk.Control.Other public CustomIconUrlDialog(AppConfig appConfig) { - this.DataContext = appConfig; InitializeComponent(); + this.DataContext = appConfig; } public CustomIconUrlDialog() @@ -26,5 +27,18 @@ namespace GeekDesk.Control.Other InitializeComponent(); } + private void Confirm_Click(object sender, RoutedEventArgs e) + { + AppConfig appConfig = this.DataContext as AppConfig; + appConfig.CustomIconJsonUrl = JsonUrl.Text.Trim(); + appConfig.CustomIconUrl = IconUrl.Text.Trim(); + if (!StringUtil.IsEmpty(IconUrl.Text) && !StringUtil.IsEmpty(JsonUrl.Text)) + { + IconfontWindow.vm.IsSettingUrl = "true"; + } else + { + IconfontWindow.vm.IsSettingUrl = "false"; + } + } } } diff --git a/Control/UserControls/IconFont/IconPannel.xaml b/Control/UserControls/IconFont/IconPannel.xaml index 9a28711..af9614f 100644 --- a/Control/UserControls/IconFont/IconPannel.xaml +++ b/Control/UserControls/IconFont/IconPannel.xaml @@ -8,7 +8,7 @@ mc:Ignorable="d" > - + @@ -22,7 +22,7 @@ - +