diff --git a/ProxySuper.Core/Models/Record.cs b/ProxySuper.Core/Models/Record.cs index ee14a49..1809ca6 100644 --- a/ProxySuper.Core/Models/Record.cs +++ b/ProxySuper.Core/Models/Record.cs @@ -109,7 +109,7 @@ namespace ProxySuper.Core.Models } if (Type == ProjectType.TrojanGo) { - //await NavigationService.Navigate(this); + await NavigationService.Navigate(this.TrojanGoSettings); } } } diff --git a/ProxySuper.Core/ProxySuper.Core.csproj b/ProxySuper.Core/ProxySuper.Core.csproj index 5a8fdc0..fcc87b8 100644 --- a/ProxySuper.Core/ProxySuper.Core.csproj +++ b/ProxySuper.Core/ProxySuper.Core.csproj @@ -90,6 +90,7 @@ + diff --git a/ProxySuper.Core/ViewModels/TrojanGoConfigViewModel.cs b/ProxySuper.Core/ViewModels/TrojanGoConfigViewModel.cs new file mode 100644 index 0000000..0dbc970 --- /dev/null +++ b/ProxySuper.Core/ViewModels/TrojanGoConfigViewModel.cs @@ -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 + { + public TrojanGoSettings Settings { get; set; } + + public override void Prepare(TrojanGoSettings parameter) + { + Settings = parameter; + } + + + } +} diff --git a/ProxySuper.WPF/ProxySuper.WPF.csproj b/ProxySuper.WPF/ProxySuper.WPF.csproj index e6f868d..dcbb2df 100644 --- a/ProxySuper.WPF/ProxySuper.WPF.csproj +++ b/ProxySuper.WPF/ProxySuper.WPF.csproj @@ -122,6 +122,9 @@ HomeView.xaml + + TrojanGoConfigView.xaml + TrojanGoEditorView.xaml @@ -212,6 +215,10 @@ MSBuild:Compile PreserveNewest + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ProxySuper.WPF/Views/TrojanGoConfigView.xaml b/ProxySuper.WPF/Views/TrojanGoConfigView.xaml new file mode 100644 index 0000000..ad3ef79 --- /dev/null +++ b/ProxySuper.WPF/Views/TrojanGoConfigView.xaml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + diff --git a/ProxySuper.WPF/Views/TrojanGoConfigView.xaml.cs b/ProxySuper.WPF/Views/TrojanGoConfigView.xaml.cs new file mode 100644 index 0000000..d2719f8 --- /dev/null +++ b/ProxySuper.WPF/Views/TrojanGoConfigView.xaml.cs @@ -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 +{ + /// + /// TrojanGoConfigView.xaml 的交互逻辑 + /// + public partial class TrojanGoConfigView : MvxWindow + { + public TrojanGoConfigView() + { + InitializeComponent(); + } + + public new TrojanGoConfigViewModel ViewModel + { + get + { + return (TrojanGoConfigViewModel)base.ViewModel; + } + } + } +} diff --git a/ProxySuper.WPF/Views/TrojanGoEditorView.xaml b/ProxySuper.WPF/Views/TrojanGoEditorView.xaml index 2b942ca..05aa686 100644 --- a/ProxySuper.WPF/Views/TrojanGoEditorView.xaml +++ b/ProxySuper.WPF/Views/TrojanGoEditorView.xaml @@ -9,6 +9,7 @@ mc:Ignorable="d" BorderThickness="0,1,0,0" BorderBrush="#eee" + Icon="/Resources/ProxySU.ico" WindowStartupLocation="CenterScreen" Title="Trojan-Go" Height="600" Width="1000">