远程图标功能 完成
This commit is contained in:
@@ -21,22 +21,30 @@
|
||||
<Grid Margin="8,20,8,20">
|
||||
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,-10">
|
||||
<TextBlock Text="SVG 图标地址:" Style="{StaticResource LeftTB}"/>
|
||||
<TextBox x:Name="IconUrl" Text="{Binding Name, Mode=OneWay}" Width="240" FontSize="14"/>
|
||||
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Text="SVG 图标地址:" Style="{StaticResource LeftTB}"/>
|
||||
<TextBlock Text="*" Foreground="Red"/>
|
||||
</WrapPanel>
|
||||
<TextBox x:Name="IconUrl" Text="{Binding CustomIconUrl, Mode=OneWay}" Width="240" FontSize="14"/>
|
||||
</hc:UniformSpacingPanel>
|
||||
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,58.276,0,-58.276">
|
||||
<TextBlock Text="JSON 配置地址:" Style="{StaticResource LeftTB}"/>
|
||||
<TextBox x:Name="JsonUrl" Text="{Binding Name, Mode=OneWay}" Width="240" FontSize="14"/>
|
||||
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Text="JSON 配置地址:" Style="{StaticResource LeftTB}"/>
|
||||
<TextBlock Text="*" Foreground="Red"/>
|
||||
</WrapPanel>
|
||||
<TextBox x:Name="JsonUrl" Text="{Binding CustomIconJsonUrl, Mode=OneWay}" Width="240" FontSize="14"/>
|
||||
</hc:UniformSpacingPanel>
|
||||
|
||||
<!--<hc:UniformSpacingPanel Spacing="10" Margin="246.206,124.551,-246.206,-124.551">
|
||||
<Button Content="取消" Click=""
|
||||
<TextBlock Text="注: 需配置正确的url方可加载远程图标!" Foreground="Red" Margin="10,95,-10,-92" />
|
||||
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="246.206,124.551,-246.206,-124.551">
|
||||
<Button Content="取消" Command="hc:ControlCommands.Close"
|
||||
/>
|
||||
<Button Content="保存" Click=""
|
||||
<Button Content="保存" Click="Confirm_Click"
|
||||
Command="hc:ControlCommands.Close"
|
||||
Background="#5BC0DE"
|
||||
Foreground="White"/>
|
||||
</hc:UniformSpacingPanel>-->
|
||||
</hc:UniformSpacingPanel>
|
||||
</Grid>
|
||||
<!--<Button Width="22" Height="22" Command="hc:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>-->
|
||||
</hc:SimplePanel>
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user