diff --git a/ProxySU_Core/ProxySU_Core.csproj b/ProxySU_Core/ProxySU_Core.csproj index 1daf4c3..0ead6f4 100644 --- a/ProxySU_Core/ProxySU_Core.csproj +++ b/ProxySU_Core/ProxySU_Core.csproj @@ -201,6 +201,9 @@ + + ClientInfoWindow.xaml + MainWindow.xaml @@ -342,6 +345,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + MSBuild:Compile Designer diff --git a/ProxySU_Core/ViewModels/XraySettingsViewModel.cs b/ProxySU_Core/ViewModels/XraySettingsViewModel.cs index 3bf4ef3..1df53d4 100644 --- a/ProxySU_Core/ViewModels/XraySettingsViewModel.cs +++ b/ProxySU_Core/ViewModels/XraySettingsViewModel.cs @@ -76,7 +76,9 @@ namespace ProxySU_Core.ViewModels { if (value == true) { - settings.Types.Add(XrayType.VLESS_TCP_TLS); + if (!settings.Types.Contains(XrayType.VLESS_TCP_TLS)) + settings.Types.Add(XrayType.VLESS_TCP_TLS); + } else { @@ -97,7 +99,8 @@ namespace ProxySU_Core.ViewModels { if (value == true) { - settings.Types.Add(XrayType.VLESS_TCP_XTLS); + if (!settings.Types.Contains(XrayType.VLESS_TCP_XTLS)) + settings.Types.Add(XrayType.VLESS_TCP_XTLS); } else { @@ -117,7 +120,8 @@ namespace ProxySU_Core.ViewModels { if (value == true) { - settings.Types.Add(XrayType.VLESS_WS_TLS); + if (!settings.Types.Contains(XrayType.VLESS_WS_TLS)) + settings.Types.Add(XrayType.VLESS_WS_TLS); } else { @@ -138,7 +142,8 @@ namespace ProxySU_Core.ViewModels { if (value == true) { - settings.Types.Add(XrayType.VMESS_TCP_TLS); + if (!settings.Types.Contains(XrayType.VMESS_TCP_TLS)) + settings.Types.Add(XrayType.VMESS_TCP_TLS); } else { @@ -159,7 +164,8 @@ namespace ProxySU_Core.ViewModels { if (value == true) { - settings.Types.Add(XrayType.VMESS_WS_TLS); + if (!settings.Types.Contains(XrayType.VMESS_WS_TLS)) + settings.Types.Add(XrayType.VMESS_WS_TLS); } else { @@ -180,7 +186,8 @@ namespace ProxySU_Core.ViewModels { if (value == true) { - settings.Types.Add(XrayType.Trojan_TCP_TLS); + if (!settings.Types.Contains(XrayType.Trojan_TCP_TLS)) + settings.Types.Add(XrayType.Trojan_TCP_TLS); } else { diff --git a/ProxySU_Core/Views/ClientInfoWindow.xaml b/ProxySU_Core/Views/ClientInfoWindow.xaml new file mode 100644 index 0000000..5e01deb --- /dev/null +++ b/ProxySU_Core/Views/ClientInfoWindow.xaml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + diff --git a/ProxySU_Core/Views/ClientInfoWindow.xaml.cs b/ProxySU_Core/Views/ClientInfoWindow.xaml.cs new file mode 100644 index 0000000..00a0f5d --- /dev/null +++ b/ProxySU_Core/Views/ClientInfoWindow.xaml.cs @@ -0,0 +1,32 @@ +using ProxySU_Core.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace ProxySU_Core.Views +{ + /// + /// ClientInfoWindow.xaml 的交互逻辑 + /// + public partial class ClientInfoWindow + { + Record Record { get; set; } + public ClientInfoWindow(Record record) + { + InitializeComponent(); + this.Record = record; + + DataContext = this.Record; + } + } +} diff --git a/ProxySU_Core/Views/MainWindow.xaml b/ProxySU_Core/Views/MainWindow.xaml index 22e7029..4860593 100644 --- a/ProxySU_Core/Views/MainWindow.xaml +++ b/ProxySU_Core/Views/MainWindow.xaml @@ -96,6 +96,7 @@