diff --git a/STranslate/Views/Preference/Service/TextBaiduServicesPage.xaml b/STranslate/Views/Preference/Service/TextBaiduServicesPage.xaml index 88f1da9a..12f9ad59 100644 --- a/STranslate/Views/Preference/Service/TextBaiduServicesPage.xaml +++ b/STranslate/Views/Preference/Service/TextBaiduServicesPage.xaml @@ -2,7 +2,6 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:local="clr-namespace:STranslate.Views.Preference.Service" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:vm="clr-namespace:STranslate.ViewModels.Preference.Services" d:DataContext="{d:DesignInstance Type=vm:TranslatorBaidu}" @@ -82,6 +81,15 @@ ItemsSource="{Binding Icons}" SelectedValue="{Binding Icon}" /> + + + + + + + + 进入官网 + - + \ No newline at end of file diff --git a/STranslate/Views/Preference/Service/TextBaiduServicesPage.xaml.cs b/STranslate/Views/Preference/Service/TextBaiduServicesPage.xaml.cs index 1a9bee4b..83e7e4a6 100644 --- a/STranslate/Views/Preference/Service/TextBaiduServicesPage.xaml.cs +++ b/STranslate/Views/Preference/Service/TextBaiduServicesPage.xaml.cs @@ -1,5 +1,7 @@ -using STranslate.Model; +using System.Diagnostics; +using System.Windows; using System.Windows.Controls; +using STranslate.Model; namespace STranslate.Views.Preference.Service { @@ -20,5 +22,8 @@ public void UpdateVM(ITranslator vm) { DataContext = vm; } + + private void Hyperlink_Click(object sender, RoutedEventArgs e) => + Process.Start(new ProcessStartInfo { FileName = "https://fanyi-api.baidu.com/", UseShellExecute = true }); } } diff --git a/STranslate/Views/Preference/Service/TextBingServicesPage.xaml b/STranslate/Views/Preference/Service/TextBingServicesPage.xaml index 3030d096..836550d8 100644 --- a/STranslate/Views/Preference/Service/TextBingServicesPage.xaml +++ b/STranslate/Views/Preference/Service/TextBingServicesPage.xaml @@ -2,7 +2,6 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:local="clr-namespace:STranslate.Views.Preference.Service" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:vm="clr-namespace:STranslate.ViewModels.Preference.Services" d:DataContext="{d:DesignInstance Type=vm:TranslatorBing}" @@ -82,6 +81,15 @@ ItemsSource="{Binding Icons}" SelectedValue="{Binding Icon}" /> + + + + + + + + 进入官网 + - + \ No newline at end of file diff --git a/STranslate/Views/Preference/Service/TextBingServicesPage.xaml.cs b/STranslate/Views/Preference/Service/TextBingServicesPage.xaml.cs index 61437625..e2102b1f 100644 --- a/STranslate/Views/Preference/Service/TextBingServicesPage.xaml.cs +++ b/STranslate/Views/Preference/Service/TextBingServicesPage.xaml.cs @@ -1,5 +1,7 @@ -using STranslate.Model; +using System.Diagnostics; +using System.Windows; using System.Windows.Controls; +using STranslate.Model; namespace STranslate.Views.Preference.Service { @@ -20,5 +22,14 @@ public void UpdateVM(ITranslator vm) { DataContext = vm; } + + private void Hyperlink_Click(object sender, RoutedEventArgs e) => + Process.Start( + new ProcessStartInfo + { + FileName = "https://azure.microsoft.com/zh-cn/products/ai-services/ai-translator", + UseShellExecute = true + } + ); } }