1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-28 08:06:07 +03:00

update ui

This commit is contained in:
autumn 2022-11-21 23:39:25 +08:00
parent db6a399ca9
commit 4c0d3a0cf4
10 changed files with 382 additions and 386 deletions

View File

@ -65,6 +65,7 @@
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath> <HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath> <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference> </Reference>

View File

@ -11,24 +11,27 @@
<convert:VisibleConverter x:Key="VisibleConverter" /> <convert:VisibleConverter x:Key="VisibleConverter" />
</UserControl.Resources> </UserControl.Resources>
<StackPanel Orientation="Vertical" Margin="10,0,20,20">
<!--节点类型-->
<GroupBox Padding="10" Header="{DynamicResource EditorProxyType}">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<StackPanel Width="220"> <WrapPanel Orientation="Vertical">
<!--TCP--> <!--TCP-->
<CheckBox Margin="0,15,0,0" <CheckBox Width="150"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
IsChecked="{Binding Path=Checked_VLESS_TCP}"> IsChecked="{Binding Path=Checked_VLESS_TCP}">
<Label Content="{DynamicResource VlessTcpDesc}" FontSize="13" Foreground="LimeGreen" /> <Label Content="{DynamicResource VlessTcpDesc}" FontSize="13" Foreground="LimeGreen" />
</CheckBox> </CheckBox>
<!--WebSocket--> <!--WebSocket-->
<CheckBox Margin="0,15,0,0" <CheckBox Width="150"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
IsChecked="{Binding Path=Checked_VLESS_WS}"> IsChecked="{Binding Path=Checked_VLESS_WS}">
<Label Content="{DynamicResource VlessWsDesc}" FontSize="13" Foreground="LimeGreen" /> <Label Content="{DynamicResource VlessWsDesc}" FontSize="13" Foreground="LimeGreen" />
</CheckBox> </CheckBox>
<!--mKCP--> <!--mKCP-->
<CheckBox Margin="0,15,0,0" <CheckBox Width="150"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
Foreground="LimeGreen" Foreground="LimeGreen"
IsChecked="{Binding Path=Checked_VLESS_KCP}"> IsChecked="{Binding Path=Checked_VLESS_KCP}">
@ -36,85 +39,71 @@
</CheckBox> </CheckBox>
<!--gRPC--> <!--gRPC-->
<CheckBox Margin="0,15,0,0" <CheckBox Width="150"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
Foreground="LimeGreen" Foreground="LimeGreen"
IsChecked="{Binding Path=Checked_VLESS_gRPC}"> IsChecked="{Binding Path=Checked_VLESS_gRPC}">
<Label Content="VLESS gRPC&#x0a;基于http2多路复用。" FontSize="13" Foreground="LimeGreen" /> <Label Content="{DynamicResource VlessRpcDesc}" FontSize="13" Foreground="LimeGreen" />
</CheckBox> </CheckBox>
</WrapPanel>
<!--TCP--> <WrapPanel Orientation="Vertical">
<!--<CheckBox Content="VMESS over TCP with TLS&#x0a;不推荐"
Margin="0,15,0,0"
FontSize="13"
Style="{StaticResource MahApps.Styles.CheckBox}"
IsChecked="{Binding Path=Checked_VMESS_TCP}" />-->
<!--WebSocket--> <!--WebSocket-->
<CheckBox Margin="0,15,0,0" <CheckBox Width="150"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
IsChecked="{Binding Path=Checked_VMESS_WS}"> IsChecked="{Binding Path=Checked_VMESS_WS}">
<Label Content="{DynamicResource VmessWsDesc}" FontSize="13" Foreground="Blue" /> <Label Content="{DynamicResource VmessWsDesc}" FontSize="13" Foreground="Blue" />
</CheckBox> </CheckBox>
<!--mKCP--> <!--mKCP-->
<CheckBox Margin="0,15,0,0" <CheckBox Width="150"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
IsChecked="{Binding Path=Checked_VMESS_KCP}"> IsChecked="{Binding Path=Checked_VMESS_KCP}">
<Label Foreground="Blue" FontSize="13" Content="{DynamicResource VmessKcpDesc}" /> <Label Foreground="Blue" FontSize="13" Content="{DynamicResource VmessKcpDesc}" />
</CheckBox> </CheckBox>
</WrapPanel>
<WrapPanel Orientation="Vertical">
<!--ss--> <!--ss-->
<CheckBox Margin="0,15,0,0" <CheckBox Width="150"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
IsChecked="{Binding Path=CheckedShadowSocks}"> IsChecked="{Binding Path=CheckedShadowSocks}">
<Label Content="{DynamicResource SSDesc}" FontSize="13" Foreground="Fuchsia" /> <Label Content="{DynamicResource SSDesc}" FontSize="13" Foreground="Fuchsia" />
</CheckBox> </CheckBox>
<!--Trojan--> <!--Trojan-->
<CheckBox Margin="0,15,0,0" <CheckBox Width="150"
Foreground="CadetBlue" Foreground="CadetBlue"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
IsChecked="{Binding Path=Checked_Trojan_TCP}"> IsChecked="{Binding Path=Checked_Trojan_TCP}">
<Label Content="{DynamicResource TrojanDesc}" FontSize="13" Foreground="CadetBlue" /> <Label Content="{DynamicResource TrojanDesc}" FontSize="13" Foreground="CadetBlue" />
</CheckBox> </CheckBox>
</WrapPanel>
</StackPanel> </StackPanel>
</GroupBox>
<!--************************** 参数 **************************--> <!--************************** 参数 **************************-->
<!--参数设置-->
<GroupBox Padding="10" Margin="0,10,0,0" Header="{DynamicResource EditorProxyParams}">
<StackPanel> <StackPanel>
<!--Domain--> <!--Domain-->
<StackPanel Margin="30,15,0,0" <StackPanel Orientation="Horizontal">
Orientation="Horizontal">
<Label Content="{DynamicResource XrayDomain}" Width="120" /> <Label Content="{DynamicResource XrayDomain}" Width="120" />
<TextBox Text="{Binding Path=Domain}" Width="200" /> <TextBox Text="{Binding Path=Domain}" Width="200" />
</StackPanel> </StackPanel>
<!--Mask Domain--> <!--Mask Domain-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0" Orientation="Horizontal">
Orientation="Horizontal">
<Label Content="{DynamicResource XrayMarkDomain}" Width="120" /> <Label Content="{DynamicResource XrayMarkDomain}" Width="120" />
<TextBox Text="{Binding Path=MaskDomain}" Width="200" /> <TextBox Text="{Binding Path=MaskDomain}" Width="200" />
</StackPanel> </StackPanel>
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal">
<Label Content="{DynamicResource XrayWithTLS}" Width="120" />
<CheckBox IsChecked="{Binding Path=WithTLS}"
Content="{DynamicResource XrayWithTLSDesc}"
VerticalContentAlignment="Center"
VerticalAlignment="Center" />
</StackPanel>
<!--UUID--> <!--UUID-->
<StackPanel Margin="30,10,0,0" <StackPanel Margin="0,15,0,0" Orientation="Horizontal">
Orientation="Horizontal">
<Label Content="{DynamicResource XrayUUID}" Width="120" /> <Label Content="{DynamicResource XrayUUID}" Width="120" />
<TextBox Text="{Binding Path=UUID}" <TextBox Text="{Binding Path=UUID}" Width="200" />
Width="200" />
<Button Margin="5,0,0,0" <Button Margin="5,0,0,0"
Padding="12,3" Padding="12,3"
@ -122,20 +111,36 @@
Content="{DynamicResource Random}" /> Content="{DynamicResource Random}" />
</StackPanel> </StackPanel>
<!--more params-->
<Expander ExpandDirection="Down" Margin="0,10,0,0">
<Expander.Header>
<TextBlock Text="更多参数" FontWeight="Bold" />
</Expander.Header>
<Expander.Content>
<StackPanel>
<!--证书-->
<StackPanel Margin="0,15,0,0" Orientation="Horizontal">
<Label Content="{DynamicResource XrayWithTLS}" Width="120" />
<CheckBox IsChecked="{Binding Path=WithTLS}"
Content="{DynamicResource XrayWithTLSDesc}"
VerticalContentAlignment="Center"
VerticalAlignment="Center" />
</StackPanel>
<!--WebSocket Path--> <!--WebSocket Path-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VLESS_WS, Binding Path=Checked_VLESS_WS,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource VlessWsPath}" Foreground="LimeGreen" Width="120" /> <Label Content="{DynamicResource VlessWsPath}" Foreground="LimeGreen" Width="120" />
<TextBox Text="{Binding Path=VLESS_WS_Path}" <TextBox Text="{Binding Path=VLESS_WS_Path}" Width="200" />
Width="200" />
</StackPanel> </StackPanel>
<!--seed--> <!--seed-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VLESS_KCP, Binding Path=Checked_VLESS_KCP,
@ -146,12 +151,12 @@
</StackPanel> </StackPanel>
<!--kcp type--> <!--kcp type-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0"
Visibility="{ Visibility="{
Binding Path=Checked_VLESS_KCP, Binding Path=Checked_VLESS_KCP,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}" Orientation="Horizontal"> }"
Orientation="Horizontal">
<Label Content="{DynamicResource VlessKcpType}" Foreground="LimeGreen" Width="120" /> <Label Content="{DynamicResource VlessKcpType}" Foreground="LimeGreen" Width="120" />
<ComboBox Width="200" <ComboBox Width="200"
ItemsSource="{Binding Path=KcpTypes}" ItemsSource="{Binding Path=KcpTypes}"
@ -160,7 +165,7 @@
</StackPanel> </StackPanel>
<!--kcp port--> <!--kcp port-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0"
Visibility="{ Visibility="{
Binding Path=Checked_VLESS_KCP, Binding Path=Checked_VLESS_KCP,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
@ -171,7 +176,7 @@
</StackPanel> </StackPanel>
<!--gRPC Port--> <!--gRPC Port-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VLESS_gRPC, Binding Path=Checked_VLESS_gRPC,
@ -181,7 +186,7 @@
<TextBox Text="{Binding Path=VLESS_gRPC_Port}" Width="200" /> <TextBox Text="{Binding Path=VLESS_gRPC_Port}" Width="200" />
</StackPanel> </StackPanel>
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VLESS_gRPC, Binding Path=Checked_VLESS_gRPC,
@ -191,21 +196,8 @@
<TextBox Text="{Binding Path=VLESS_gRPC_ServiceName}" Width="200" /> <TextBox Text="{Binding Path=VLESS_gRPC_ServiceName}" Width="200" />
</StackPanel> </StackPanel>
<!--Tcp Path
<StackPanel Margin="30,15,0,0"
Orientation="Horizontal"
Visibility="{
Binding Path=Checked_VMESS_TCP,
Converter={StaticResource VisibleConverter}
}">
<Label Content="VMESS WS路径" Foreground="Blue" Width="120" />
<TextBox Text="{Binding Path=VMESS_TCP_Path}"
VerticalAlignment="Bottom"
Width="200" />
</StackPanel>-->
<!--WebSocket Path--> <!--WebSocket Path-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VMESS_WS, Binding Path=Checked_VMESS_WS,
@ -218,7 +210,7 @@
</StackPanel> </StackPanel>
<!--seed--> <!--seed-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VMESS_KCP, Binding Path=Checked_VMESS_KCP,
@ -229,7 +221,7 @@
</StackPanel> </StackPanel>
<!--kcp type--> <!--kcp type-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VMESS_KCP, Binding Path=Checked_VMESS_KCP,
@ -244,7 +236,7 @@
</StackPanel> </StackPanel>
<!--kcp port--> <!--kcp port-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_VMESS_KCP, Binding Path=Checked_VMESS_KCP,
@ -255,19 +247,18 @@
</StackPanel> </StackPanel>
<!--ss密码--> <!--ss密码-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=CheckedShadowSocks, Binding Path=CheckedShadowSocks,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource SSPassword}" Foreground="Fuchsia" Width="120" /> <Label Content="{DynamicResource SSPassword}" Foreground="Fuchsia" Width="120" />
<TextBox Text="{Binding Path=ShadowSocksPassword}" <TextBox Text="{Binding Path=ShadowSocksPassword}" Width="200"/>
Width="200"/>
</StackPanel> </StackPanel>
<!--ss加密方式--> <!--ss加密方式-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=CheckedShadowSocks, Binding Path=CheckedShadowSocks,
@ -281,7 +272,7 @@
</StackPanel> </StackPanel>
<!--ss端口--> <!--ss端口-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=CheckedShadowSocks, Binding Path=CheckedShadowSocks,
@ -292,28 +283,25 @@
</StackPanel> </StackPanel>
<!--Trojan密码--> <!--Trojan密码-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0"
Orientation="Horizontal" Orientation="Horizontal"
Visibility="{ Visibility="{
Binding Path=Checked_Trojan_TCP, Binding Path=Checked_Trojan_TCP,
Converter={StaticResource VisibleConverter} Converter={StaticResource VisibleConverter}
}"> }">
<Label Content="{DynamicResource TrojanPassword}" Foreground="CadetBlue" Width="120" /> <Label Content="{DynamicResource TrojanPassword}" Foreground="CadetBlue" Width="120" />
<TextBox Text="{Binding Path=TrojanPassword}" <TextBox Text="{Binding Path=TrojanPassword}" Width="200" />
Width="200" />
</StackPanel> </StackPanel>
<!--xray prot--> <!--xray prot-->
<StackPanel Margin="30,15,0,0" <StackPanel Margin="0,15,0,0" Orientation="Horizontal">
Orientation="Horizontal">
<Label Content="{DynamicResource XrayPort}" Foreground="Gray" Width="120" /> <Label Content="{DynamicResource XrayPort}" Foreground="Gray" Width="120" />
<TextBox Text="{Binding Path=Port}" Width="120" /> <TextBox Text="{Binding Path=Port}" Width="120" />
<Label Content="{DynamicResource XrayPortDefault}" Foreground="Red" /> <Label Content="{DynamicResource XrayPortDefault}" Foreground="Red" />
</StackPanel> </StackPanel>
<!--多用户--> <!--多用户-->
<StackPanel Margin="30,10,0,0" <StackPanel Margin="0,15,0,0" Orientation="Vertical">
Orientation="Vertical">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Label Content="{DynamicResource MultiUser}" Width="120" /> <Label Content="{DynamicResource MultiUser}" Width="120" />
@ -327,6 +315,10 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Expander.Content>
</Expander>
</StackPanel>
</GroupBox>
</StackPanel> </StackPanel>
</UserControl> </UserControl>

View File

@ -94,14 +94,13 @@
<GroupBox Padding="10" Margin="0,10,0,0" Header="{DynamicResource EditorProxyParams}"> <GroupBox Padding="10" Margin="0,10,0,0" Header="{DynamicResource EditorProxyParams}">
<StackPanel> <StackPanel>
<!--Domain--> <!--Domain-->
<StackPanel Margin="0,15,0,0" <StackPanel Orientation="Horizontal">
Orientation="Horizontal">
<Label Content="{DynamicResource XrayDomain}" Width="120" /> <Label Content="{DynamicResource XrayDomain}" Width="120" />
<TextBox Text="{Binding Path=Domain}" Width="260" /> <TextBox Text="{Binding Path=Domain}" Width="260" />
</StackPanel> </StackPanel>
<!--UUID--> <!--UUID-->
<StackPanel Margin="0,10,0,0" Orientation="Horizontal"> <StackPanel Margin="0,15,0,0" Orientation="Horizontal">
<Label Content="{DynamicResource XrayUUID}" Width="120" /> <Label Content="{DynamicResource XrayUUID}" Width="120" />
<TextBox Text="{Binding Path=UUID}" <TextBox Text="{Binding Path=UUID}"

View File

@ -24,8 +24,7 @@
</StackPanel> </StackPanel>
<StackPanel Grid.Column="1" Background="#EEE"></StackPanel> <StackPanel Grid.Column="1" Background="#EEE"></StackPanel>
<StackPanel Grid.Column="2"> <Grid Margin="10,10,0,0" Grid.Column="2">
<Grid Margin="10">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="36" /> <RowDefinition Height="36" />
<RowDefinition Height="36" /> <RowDefinition Height="36" />
@ -33,11 +32,13 @@
<RowDefinition Height="36" /> <RowDefinition Height="36" />
<RowDefinition Height="36" /> <RowDefinition Height="36" />
<RowDefinition Height="36" /> <RowDefinition Height="36" />
<RowDefinition Height="36" /> <RowDefinition Height="*" />
<RowDefinition Height="50" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="120" /> <ColumnDefinition Width="120" />
<ColumnDefinition Width="200" /> <ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Content="{DynamicResource TrojanGoDomain}" Grid.Row="0" Grid.Column="0" /> <Label Content="{DynamicResource TrojanGoDomain}" Grid.Row="0" Grid.Column="0" />
@ -63,14 +64,13 @@
Content="{DynamicResource XrayWithTLSDesc}" Content="{DynamicResource XrayWithTLSDesc}"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
VerticalAlignment="Center" /> VerticalAlignment="Center" />
</Grid>
<Border Grid.Row="7"
<Border Grid.Row="1" Grid.ColumnSpan="3"
BorderBrush="#eee" BorderBrush="#eee"
BorderThickness="0,1,0,0"> BorderThickness="0,1,0,0">
<StackPanel Orientation="Horizontal" <StackPanel Orientation="Horizontal"
Margin="0,20,0,0" Height="50"
HorizontalAlignment="Right"> HorizontalAlignment="Right">
<Button Content="{DynamicResource Save}" <Button Content="{DynamicResource Save}"
Command="{Binding SaveCommand}" Command="{Binding SaveCommand}"
@ -86,6 +86,6 @@
Margin="20,0,40,0" /> Margin="20,0,40,0" />
</StackPanel> </StackPanel>
</Border> </Border>
</StackPanel> </Grid>
</Grid> </Grid>
</views:MvxWindow> </views:MvxWindow>

View File

@ -11,7 +11,7 @@
Icon="/Resources/ProxySU.ico" Icon="/Resources/ProxySU.ico"
BorderThickness="0,1,0,0" BorderThickness="0,1,0,0"
BorderBrush="#EEE" BorderBrush="#EEE"
Title="V2ray编辑配置" Height="610" Width="1015"> Title="V2ray编辑配置" Height="640" Width="1015">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="310" /> <ColumnDefinition Width="310" />
@ -25,16 +25,15 @@
<StackPanel Grid.Column="1" Background="#EEE"></StackPanel> <StackPanel Grid.Column="1" Background="#EEE"></StackPanel>
<StackPanel Grid.Column="2"> <Grid Grid.Column="2">
<Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="500" /> <RowDefinition Height="*" />
<RowDefinition Height="80" /> <RowDefinition Height="50" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ScrollViewer Name="scroll" <ScrollViewer Name="scroll"
Padding="10" Padding="10"
Height="500" Height="auto"
Grid.Row="0" Grid.Row="0"
HorizontalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto" > VerticalScrollBarVisibility="Auto" >
@ -44,7 +43,7 @@
<Border Grid.Row="1" <Border Grid.Row="1"
BorderBrush="#eee" BorderBrush="#eee"
BorderThickness="0,1,0,0"> BorderThickness="0,1,0,0">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Height="50">
<Button Content="{DynamicResource Save}" <Button Content="{DynamicResource Save}"
Command="{Binding SaveCommand}" Command="{Binding SaveCommand}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
@ -60,6 +59,5 @@
</StackPanel> </StackPanel>
</Border> </Border>
</Grid> </Grid>
</StackPanel>
</Grid> </Grid>
</views:MvxWindow> </views:MvxWindow>

View File

@ -1,4 +1,5 @@
using MvvmCross.Platforms.Wpf.Views; using MvvmCross.Platforms.Wpf.Presenters.Attributes;
using MvvmCross.Platforms.Wpf.Views;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -18,6 +19,7 @@ namespace ProxySuper.WPF.Views.V2ray
/// <summary> /// <summary>
/// V2rayEditorView.xaml 的交互逻辑 /// V2rayEditorView.xaml 的交互逻辑
/// </summary> /// </summary>
[MvxWindowPresentation]
public partial class V2rayEditorView : MvxWindow public partial class V2rayEditorView : MvxWindow
{ {
public V2rayEditorView() public V2rayEditorView()

View File

@ -1,4 +1,5 @@
using Microsoft.Win32; using Microsoft.Win32;
using MvvmCross.Platforms.Wpf.Presenters.Attributes;
using MvvmCross.Platforms.Wpf.Views; using MvvmCross.Platforms.Wpf.Views;
using ProxySuper.Core.Models.Projects; using ProxySuper.Core.Models.Projects;
using ProxySuper.Core.ViewModels; using ProxySuper.Core.ViewModels;
@ -15,6 +16,7 @@ namespace ProxySuper.WPF.Views
/// <summary> /// <summary>
/// XrayInfoView.xaml 的交互逻辑 /// XrayInfoView.xaml 的交互逻辑
/// </summary> /// </summary>
[MvxWindowPresentation()]
public partial class XrayConfigView : MvxWindow public partial class XrayConfigView : MvxWindow
{ {
public XrayConfigView() public XrayConfigView()
@ -116,16 +118,16 @@ namespace ProxySuper.WPF.Views
} }
QRCodeGenerator qrGenerator = new QRCodeGenerator(); var qrGenerator = new QRCodeGenerator();
QRCodeData qrCodeData = qrGenerator.CreateQrCode(shareLink, QRCodeGenerator.ECCLevel.Q); var qrCodeData = qrGenerator.CreateQrCode(shareLink, QRCodeGenerator.ECCLevel.Q);
QRCode qrCode = new QRCode(qrCodeData); var qrCode = new QRCode(qrCodeData);
Bitmap qrCodeImage = qrCode.GetGraphic(20); var qrCodeImage = qrCode.GetGraphic(20);
MemoryStream ms = new MemoryStream(); var ms = new MemoryStream();
qrCodeImage.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp); qrCodeImage.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
byte[] bytes = ms.GetBuffer(); byte[] bytes = ms.GetBuffer();
ms.Close(); ms.Close();
BitmapImage image = new BitmapImage(); var image = new BitmapImage();
image.BeginInit(); image.BeginInit();
image.StreamSource = new MemoryStream(bytes); image.StreamSource = new MemoryStream(bytes);
image.EndInit(); image.EndInit();

View File

@ -34,8 +34,8 @@
<ScrollViewer Name="scroll" <ScrollViewer Name="scroll"
Padding="10" Padding="10"
Grid.Row="0"
Height="auto" Height="auto"
Grid.Row="0"
HorizontalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto" > VerticalScrollBarVisibility="Auto" >
<ctrl:XraySettingsControl /> <ctrl:XraySettingsControl />

View File

@ -7,7 +7,7 @@ namespace ProxySuper.WPF.Views
/// <summary> /// <summary>
/// XrayEditorView.xaml 的交互逻辑 /// XrayEditorView.xaml 的交互逻辑
/// </summary> /// </summary>
[MvxWindowPresentation(Identifier = nameof(XrayEditorView), Modal = false)] [MvxWindowPresentation()]
public partial class XrayEditorView : MvxWindow public partial class XrayEditorView : MvxWindow
{ {
public XrayEditorView() public XrayEditorView()

View File

@ -1,4 +1,5 @@
using MvvmCross.Platforms.Wpf.Views; using MvvmCross.Platforms.Wpf.Presenters.Attributes;
using MvvmCross.Platforms.Wpf.Views;
using MvvmCross.ViewModels; using MvvmCross.ViewModels;
using ProxySuper.Core.ViewModels; using ProxySuper.Core.ViewModels;
using System; using System;
@ -20,6 +21,7 @@ namespace ProxySuper.WPF.Views
/// <summary> /// <summary>
/// XrayInstallView.xaml 的交互逻辑 /// XrayInstallView.xaml 的交互逻辑
/// </summary> /// </summary>
[MvxWindowPresentation()]
public partial class XrayInstallView : MvxWindow public partial class XrayInstallView : MvxWindow
{ {
public XrayInstallView() public XrayInstallView()