From edb7efc7fb83e52c9570b3c4d3aba0d3cb2c5279 Mon Sep 17 00:00:00 2001 From: liufei Date: Tue, 13 Jul 2021 15:24:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E5=9B=BE=E6=A0=87=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=20=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Control/Other/CustomIconUrlDialog.xaml | 26 ++-- Control/Other/CustomIconUrlDialog.xaml.cs | 18 ++- Control/UserControls/IconFont/IconPannel.xaml | 4 +- .../UserControls/IconFont/IconPannel.xaml.cs | 33 ----- Control/Windows/IconfontWindow.xaml | 12 +- Control/Windows/IconfontWindow.xaml.cs | 124 +++++++++++++++--- GeekDesk.csproj | 8 +- Themes/Generic.xaml | 7 - Util/HttpUtil.cs | 2 +- Util/StringUtil.cs | 22 ++++ Util/SvgToGeometry.cs | 15 ++- iconfont.ttf | Bin 13524 -> 0 bytes 12 files changed, 183 insertions(+), 88 deletions(-) delete mode 100644 Themes/Generic.xaml create mode 100644 Util/StringUtil.cs delete mode 100644 iconfont.ttf 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 @@ - +