mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-24 14:16:08 +03:00
update...
This commit is contained in:
parent
8bc507ef43
commit
eaca464f9c
@ -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服务";
|
||||
|
@ -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}"
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user