From 1a5a7219e39bc081efaec1750155005dcd26e375 Mon Sep 17 00:00:00 2001 From: 123 <123@github.com> Date: Sat, 17 Dec 2022 11:25:09 +0800 Subject: [PATCH] update --- .../Models/Projects/HysteriaSettings.cs | 2 + .../ViewModels/HysteriaEditorViewModel.cs | 7 +- ProxySuper.WPF/ProxySuper.WPF.csproj | 7 ++ ProxySuper.WPF/Resources/Languages/en.xaml | 8 ++ ProxySuper.WPF/Resources/Languages/tw_cn.xaml | 8 ++ ProxySuper.WPF/Resources/Languages/zh_cn.xaml | 9 ++ .../Views/Hysteria/HysteriaEditorView.xaml | 87 +++++++++++++++++++ .../Views/Hysteria/HysteriaEditorView.xaml.cs | 27 ++++++ 8 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml create mode 100644 ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml.cs diff --git a/ProxySuper.Core/Models/Projects/HysteriaSettings.cs b/ProxySuper.Core/Models/Projects/HysteriaSettings.cs index 087884f..9363741 100644 --- a/ProxySuper.Core/Models/Projects/HysteriaSettings.cs +++ b/ProxySuper.Core/Models/Projects/HysteriaSettings.cs @@ -14,6 +14,8 @@ namespace ProxySuper.Core.Models.Projects public string Email { get; set; } = ""; + public string Protocol { get; set; } = "udp"; + public int Port { get; set; } = 36712; public int UpMbps { get; set; } = 300; diff --git a/ProxySuper.Core/ViewModels/HysteriaEditorViewModel.cs b/ProxySuper.Core/ViewModels/HysteriaEditorViewModel.cs index 7de577a..7bd40c4 100644 --- a/ProxySuper.Core/ViewModels/HysteriaEditorViewModel.cs +++ b/ProxySuper.Core/ViewModels/HysteriaEditorViewModel.cs @@ -1,4 +1,5 @@ -using MvvmCross.Navigation; +using MvvmCross.Commands; +using MvvmCross.Navigation; using MvvmCross.ViewModels; using ProxySuper.Core.Models; using ProxySuper.Core.Models.Hosts; @@ -23,6 +24,10 @@ namespace ProxySuper.Core.ViewModels public IMvxNavigationService NavigationService { get; } + public IMvxCommand SaveCommand => new MvxCommand(() => Save()); + + public IMvxCommand SaveAndInstallCommand => new MvxCommand(SaveAndInstall); + public HysteriaEditorViewModel(IMvxNavigationService mvxNavigationService) { NavigationService = mvxNavigationService; diff --git a/ProxySuper.WPF/ProxySuper.WPF.csproj b/ProxySuper.WPF/ProxySuper.WPF.csproj index af10d5b..a167206 100644 --- a/ProxySuper.WPF/ProxySuper.WPF.csproj +++ b/ProxySuper.WPF/ProxySuper.WPF.csproj @@ -158,6 +158,9 @@ HomeView.xaml + + HysteriaEditorView.xaml + MTProxyGoConfigView.xaml @@ -318,6 +321,10 @@ MSBuild:Compile PreserveNewest + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ProxySuper.WPF/Resources/Languages/en.xaml b/ProxySuper.WPF/Resources/Languages/en.xaml index ab1de59..411ba68 100644 --- a/ProxySuper.WPF/Resources/Languages/en.xaml +++ b/ProxySuper.WPF/Resources/Languages/en.xaml @@ -149,4 +149,12 @@ Port Cleantext Secret + + + Address + Port + OBFS + Email + UpMbps + DownMbps \ No newline at end of file diff --git a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml index 4bdf7b2..5c61fff 100644 --- a/ProxySuper.WPF/Resources/Languages/tw_cn.xaml +++ b/ProxySuper.WPF/Resources/Languages/tw_cn.xaml @@ -150,4 +150,12 @@ 端口 加密前字符 密鑰 + + + 域名 + 端口 + 加密字符 + 郵箱 + 上傳限速 + 下載限速 \ No newline at end of file diff --git a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml index b1e6d5f..48fe1a3 100644 --- a/ProxySuper.WPF/Resources/Languages/zh_cn.xaml +++ b/ProxySuper.WPF/Resources/Languages/zh_cn.xaml @@ -151,4 +151,13 @@ 端口 加密前字符 密钥 + + + 域名 + 端口 + 加密字符 + 协议 + 邮箱 + 上传限速 + 下载限速 \ No newline at end of file diff --git a/ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml b/ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml new file mode 100644 index 0000000..1d1b65a --- /dev/null +++ b/ProxySuper.WPF/Views/Hysteria/HysteriaEditorView.xaml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +