From 5749612755f2d62da737180613aadfe204489913 Mon Sep 17 00:00:00 2001 From: "DESKTOP-3BO4HSG\\ksat" Date: Wed, 11 Jan 2023 15:04:07 +0800 Subject: [PATCH] tmp --- .gitignore | 1 + STranslate/Model/ConfigModel.cs | 14 +++++ STranslate/View/MainWindow.xaml | 42 ++++++++++++- STranslate/ViewModel/MainVM.cs | 89 +++++++++++++++++++++++++--- STranslate/ViewModel/ScreenShotVM.cs | 44 +++++++------- 5 files changed, 157 insertions(+), 33 deletions(-) diff --git a/.gitignore b/.gitignore index d7a21fa..94fa45d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ bin/ obj/ *.user +.idea/ packages/ \ No newline at end of file diff --git a/STranslate/Model/ConfigModel.cs b/STranslate/Model/ConfigModel.cs index 113701c..b36cbb0 100644 --- a/STranslate/Model/ConfigModel.cs +++ b/STranslate/Model/ConfigModel.cs @@ -62,6 +62,11 @@ namespace STranslate.Model /// [JsonProperty("servers")] public Server[] Servers { get; set; } + /// + /// 服务 + /// + [JsonProperty("baiduServers")] + public BaiduServer BaiduServers { get; set; } } @@ -73,4 +78,13 @@ namespace STranslate.Model [JsonProperty("api")] public string Api { get; set; } } + + public class BaiduServer + { + [JsonProperty("appid")] + public string Appid { get; set; } + + [JsonProperty("secretKey")] + public string SecretKey { get; set; } + } } diff --git a/STranslate/View/MainWindow.xaml b/STranslate/View/MainWindow.xaml index c6e7957..59d5710 100644 --- a/STranslate/View/MainWindow.xaml +++ b/STranslate/View/MainWindow.xaml @@ -3,10 +3,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" - xmlns:vm="clr-namespace:STranslate.ViewModel" - xmlns:local="clr-namespace:STranslate.View" mc:Ignorable="d" x:Name="Mwin" Background="Transparent" @@ -52,6 +49,7 @@ + @@ -186,6 +184,44 @@ + + + + + + + + +