mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 13:42:24 +00:00
add wireguard core type settings
This commit is contained in:
parent
efe2124274
commit
841f870da1
5 changed files with 42 additions and 0 deletions
|
@ -100,6 +100,7 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||
[Reactive] public string CoreType4 { get; set; }
|
||||
[Reactive] public string CoreType5 { get; set; }
|
||||
[Reactive] public string CoreType6 { get; set; }
|
||||
[Reactive] public string CoreType9 { get; set; }
|
||||
|
||||
#endregion CoreType
|
||||
|
||||
|
@ -259,6 +260,10 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||
case 6:
|
||||
CoreType6 = type;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
CoreType9 = type;
|
||||
break;
|
||||
}
|
||||
});
|
||||
await Task.CompletedTask;
|
||||
|
@ -407,6 +412,10 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||
type = CoreType6;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
type = CoreType9;
|
||||
break;
|
||||
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -891,6 +891,19 @@
|
|||
Grid.Column="1"
|
||||
Width="200"
|
||||
Margin="{StaticResource Margin4}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="7"
|
||||
Grid.Column="0"
|
||||
Margin="{StaticResource Margin4}"
|
||||
VerticalAlignment="Center"
|
||||
Text="Wireguard" />
|
||||
<ComboBox
|
||||
x:Name="cmbCoreType9"
|
||||
Grid.Row="7"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
Margin="{StaticResource Margin4}" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
|
|
@ -64,6 +64,7 @@ public partial class OptionSettingWindow : ReactiveWindow<OptionSettingViewModel
|
|||
cmbCoreType4.Items.Add(it);
|
||||
cmbCoreType5.Items.Add(it);
|
||||
cmbCoreType6.Items.Add(it);
|
||||
cmbCoreType9.Items.Add(it);
|
||||
});
|
||||
|
||||
for (var i = 2; i <= 8; i++)
|
||||
|
@ -160,6 +161,7 @@ public partial class OptionSettingWindow : ReactiveWindow<OptionSettingViewModel
|
|||
this.Bind(ViewModel, vm => vm.CoreType4, v => v.cmbCoreType4.SelectedValue).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CoreType5, v => v.cmbCoreType5.SelectedValue).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CoreType6, v => v.cmbCoreType6.SelectedValue).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CoreType9, v => v.cmbCoreType9.SelectedValue).DisposeWith(disposables);
|
||||
|
||||
this.BindCommand(ViewModel, vm => vm.SaveCmd, v => v.btnSave).DisposeWith(disposables);
|
||||
});
|
||||
|
|
|
@ -1098,6 +1098,7 @@
|
|||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
@ -1192,6 +1193,21 @@
|
|||
Width="200"
|
||||
Margin="{StaticResource Margin8}"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="7"
|
||||
Grid.Column="0"
|
||||
Margin="{StaticResource Margin8}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="Wireguard" />
|
||||
<ComboBox
|
||||
x:Name="cmbCoreType9"
|
||||
Grid.Row="7"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
Margin="{StaticResource Margin8}"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
|
|
@ -66,6 +66,7 @@ public partial class OptionSettingWindow
|
|||
cmbCoreType4.Items.Add(it);
|
||||
cmbCoreType5.Items.Add(it);
|
||||
cmbCoreType6.Items.Add(it);
|
||||
cmbCoreType9.Items.Add(it);
|
||||
});
|
||||
|
||||
for (var i = 2; i <= 8; i++)
|
||||
|
@ -178,6 +179,7 @@ public partial class OptionSettingWindow
|
|||
this.Bind(ViewModel, vm => vm.CoreType4, v => v.cmbCoreType4.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CoreType5, v => v.cmbCoreType5.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CoreType6, v => v.cmbCoreType6.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CoreType9, v => v.cmbCoreType9.Text).DisposeWith(disposables);
|
||||
|
||||
this.BindCommand(ViewModel, vm => vm.SaveCmd, v => v.btnSave).DisposeWith(disposables);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue