mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-22 13:16:09 +03:00
save
This commit is contained in:
parent
5f209b7c1d
commit
cb7d7e5f21
@ -109,7 +109,7 @@ namespace ProxySuper.Core.Models
|
|||||||
}
|
}
|
||||||
if (Type == ProjectType.TrojanGo)
|
if (Type == ProjectType.TrojanGo)
|
||||||
{
|
{
|
||||||
//await NavigationService.Navigate<TrojanGoInstallerViewModel, Record>(this);
|
await NavigationService.Navigate<TrojanGoConfigViewModel, TrojanGoSettings>(this.TrojanGoSettings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,7 @@
|
|||||||
<Compile Include="Services\XrayConfigBuilder.cs" />
|
<Compile Include="Services\XrayConfigBuilder.cs" />
|
||||||
<Compile Include="Services\XrayProject.cs" />
|
<Compile Include="Services\XrayProject.cs" />
|
||||||
<Compile Include="ViewModels\HomeViewModel.cs" />
|
<Compile Include="ViewModels\HomeViewModel.cs" />
|
||||||
|
<Compile Include="ViewModels\TrojanGoConfigViewModel.cs" />
|
||||||
<Compile Include="ViewModels\TrojanGoEditorViewModel.cs" />
|
<Compile Include="ViewModels\TrojanGoEditorViewModel.cs" />
|
||||||
<Compile Include="ViewModels\TrojanGoInstallerViewModel.cs" />
|
<Compile Include="ViewModels\TrojanGoInstallerViewModel.cs" />
|
||||||
<Compile Include="ViewModels\XrayConfigViewModel.cs" />
|
<Compile Include="ViewModels\XrayConfigViewModel.cs" />
|
||||||
|
22
ProxySuper.Core/ViewModels/TrojanGoConfigViewModel.cs
Normal file
22
ProxySuper.Core/ViewModels/TrojanGoConfigViewModel.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using MvvmCross.ViewModels;
|
||||||
|
using ProxySuper.Core.Models.Projects;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ProxySuper.Core.ViewModels
|
||||||
|
{
|
||||||
|
public class TrojanGoConfigViewModel : MvxViewModel<TrojanGoSettings>
|
||||||
|
{
|
||||||
|
public TrojanGoSettings Settings { get; set; }
|
||||||
|
|
||||||
|
public override void Prepare(TrojanGoSettings parameter)
|
||||||
|
{
|
||||||
|
Settings = parameter;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -122,6 +122,9 @@
|
|||||||
<Compile Include="Views\HomeView.xaml.cs">
|
<Compile Include="Views\HomeView.xaml.cs">
|
||||||
<DependentUpon>HomeView.xaml</DependentUpon>
|
<DependentUpon>HomeView.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Views\TrojanGoConfigView.xaml.cs">
|
||||||
|
<DependentUpon>TrojanGoConfigView.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Views\TrojanGoEditorView.xaml.cs">
|
<Compile Include="Views\TrojanGoEditorView.xaml.cs">
|
||||||
<DependentUpon>TrojanGoEditorView.xaml</DependentUpon>
|
<DependentUpon>TrojanGoEditorView.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -212,6 +215,10 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Views\TrojanGoConfigView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="Views\TrojanGoEditorView.xaml">
|
<Page Include="Views\TrojanGoEditorView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
36
ProxySuper.WPF/Views/TrojanGoConfigView.xaml
Normal file
36
ProxySuper.WPF/Views/TrojanGoConfigView.xaml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<views:MvxWindow x:Class="ProxySuper.WPF.Views.TrojanGoConfigView"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:views="clr-namespace:MvvmCross.Platforms.Wpf.Views;assembly=MvvmCross.Platforms.Wpf"
|
||||||
|
xmlns:local="clr-namespace:ProxySuper.WPF.Views"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Icon="/Resources/ProxySU.ico"
|
||||||
|
WindowStartupLocation="CenterScreen"
|
||||||
|
Title="TrojanGoConfigView" Height="450" Width="800">
|
||||||
|
<Grid Margin="10">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="140" />
|
||||||
|
<ColumnDefinition Width="300" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="36" />
|
||||||
|
<RowDefinition Height="36" />
|
||||||
|
<RowDefinition Height="36" />
|
||||||
|
<RowDefinition Height="36" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Content="主机(Host)" />
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Settings.Domain}" IsReadOnly="True" />
|
||||||
|
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Content="端口(Port)" />
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Settings.Port}" IsReadOnly="True" />
|
||||||
|
|
||||||
|
<Label Grid.Row="2" Grid.Column="0" Content="密码(Password)" />
|
||||||
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding Settings.Password}" IsReadOnly="True" />
|
||||||
|
|
||||||
|
<Label Grid.Row="3" Grid.Column="0" Content="SNI" />
|
||||||
|
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Settings.Domain}" IsReadOnly="True" />
|
||||||
|
</Grid>
|
||||||
|
</views:MvxWindow>
|
37
ProxySuper.WPF/Views/TrojanGoConfigView.xaml.cs
Normal file
37
ProxySuper.WPF/Views/TrojanGoConfigView.xaml.cs
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
using MvvmCross.Platforms.Wpf.Views;
|
||||||
|
using ProxySuper.Core.ViewModels;
|
||||||
|
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 ProxySuper.WPF.Views
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// TrojanGoConfigView.xaml 的交互逻辑
|
||||||
|
/// </summary>
|
||||||
|
public partial class TrojanGoConfigView : MvxWindow
|
||||||
|
{
|
||||||
|
public TrojanGoConfigView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public new TrojanGoConfigViewModel ViewModel
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (TrojanGoConfigViewModel)base.ViewModel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -9,6 +9,7 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
BorderThickness="0,1,0,0"
|
BorderThickness="0,1,0,0"
|
||||||
BorderBrush="#eee"
|
BorderBrush="#eee"
|
||||||
|
Icon="/Resources/ProxySU.ico"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Title="Trojan-Go" Height="600" Width="1000">
|
Title="Trojan-Go" Height="600" Width="1000">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
Loading…
Reference in New Issue
Block a user