1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-24 14:16:08 +03:00

update...

This commit is contained in:
proxysu 2021-11-27 11:47:31 +08:00
parent 8bc507ef43
commit eaca464f9c
5 changed files with 36 additions and 4 deletions

View File

@ -268,7 +268,7 @@ namespace ProxySuper.Core.Services
}
#region
#region
private void DoUploadCert(object sender, CancelEventArgs e)
{
@ -424,7 +424,6 @@ namespace ProxySuper.Core.Services
WriteToFile(configJson, "/etc/caddy/Caddyfile");
}
private void UninstallXray()
{
Progress.Desc = "关闭Xray服务";

View File

@ -22,6 +22,7 @@
BorderThickness="1,0,1,0"
BorderBrush="#DDD"
TabStripPlacement="Left"
x:Name="TabCtrl"
SelectionChanged="BuildQrCode">
<TabItem Width="200" Height="40"
Tag="{x:Static models:RayType.VLESS_TCP}"

View File

@ -31,6 +31,22 @@ namespace ProxySuper.WPF.Views.V2ray
InitializeComponent();
}
protected override void OnRender(DrawingContext drawingContext)
{
base.OnRender(drawingContext);
for (int i = 0; i < TabCtrl.Items.Count; i++)
{
var tabItem = TabCtrl.Items[i] as TabItem;
if (Settings.Types.Contains((RayType)tabItem.Tag))
{
TabCtrl.SelectedIndex = i;
break;
}
}
}
public V2raySettings Settings
{
get

View File

@ -21,6 +21,7 @@
Padding="10"
BorderThickness="1,0,1,0"
BorderBrush="#DDD"
x:Name="TabCtrl"
TabStripPlacement="Left"
SelectionChanged="BuildQrCode">
<TabItem Width="200" Height="40"

View File

@ -7,6 +7,7 @@ using System.Drawing;
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace ProxySuper.WPF.Views
@ -21,6 +22,22 @@ namespace ProxySuper.WPF.Views
InitializeComponent();
}
protected override void OnRender(DrawingContext drawingContext)
{
base.OnRender(drawingContext);
for (int i = 0; i < TabCtrl.Items.Count; i++)
{
var tabItem = TabCtrl.Items[i] as TabItem;
if (Settings.Types.Contains((RayType)tabItem.Tag))
{
TabCtrl.SelectedIndex = i;
break;
}
}
}
public XraySettings Settings
{
get
@ -29,8 +46,6 @@ namespace ProxySuper.WPF.Views
}
}
private void BuildQrCode(object sender, SelectionChangedEventArgs e)
{
var tabControl = e.Source as TabControl;