瀏覽代碼

增加 教程链接

liufei 3 年之前
父節點
當前提交
9eaca05012
共有 2 個文件被更改,包括 17 次插入5 次删除
  1. 5 3
      Control/Other/CustomIconUrlDialog.xaml
  2. 12 2
      Control/Other/CustomIconUrlDialog.xaml.cs

+ 5 - 3
Control/Other/CustomIconUrlDialog.xaml

@@ -17,7 +17,7 @@
     </Border.Resources>
     <StackPanel Margin="10">
         <Grid Margin="8,20,8,20">
-            
+
             <hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,-10">
                 <WrapPanel  HorizontalAlignment="Center" VerticalAlignment="Center">
                     <TextBlock Text="SVG 图标地址:"  Style="{StaticResource LeftTB}"/>
@@ -35,9 +35,11 @@
             </hc:UniformSpacingPanel>
             <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" 
+            <hc:UniformSpacingPanel Spacing="10" Margin="203,125,-203,-125">
+                <Button Content="取消" Command="hc:ControlCommands.Close" HorizontalAlignment="Stretch" Margin="-1,1,1,1" VerticalAlignment="Stretch" 
                             />
+                <Button Content="教程" Click="Teach_Click" 
+                        Style="{StaticResource Btn1}"/>
                 <Button Content="保存" Click="Confirm_Click" 
                         Command="hc:ControlCommands.Close"
                         Style="{StaticResource Btn1}"/>

+ 12 - 2
Control/Other/CustomIconUrlDialog.xaml.cs

@@ -3,6 +3,8 @@ using GeekDesk.Util;
 using GeekDesk.ViewModel;
 using Microsoft.Win32;
 using System;
+using System.Configuration;
+using System.Diagnostics;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Media.Imaging;
@@ -32,13 +34,21 @@ namespace GeekDesk.Control.Other
             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)) 
+            if (!StringUtil.IsEmpty(IconUrl.Text) && !StringUtil.IsEmpty(JsonUrl.Text))
             {
                 IconfontWindow.vm.IsSettingUrl = "true";
-            } else
+            }
+            else
             {
                 IconfontWindow.vm.IsSettingUrl = "false";
             }
         }
+
+
+        private void Teach_Click(object sender, RoutedEventArgs e)
+        {
+            string url = ConfigurationManager.AppSettings["CustomIconTeachUrl"];
+            Process.Start(url);
+        }
     }
 }