mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-16 12:35:46 +00:00
Relax group type restrictions
This commit is contained in:
parent
9f6237fb21
commit
ec2367dc88
4 changed files with 6 additions and 20 deletions
|
|
@ -148,14 +148,7 @@ public partial class AddGroupServerWindow : WindowBase<AddGroupServerViewModel>
|
||||||
private async void MenuAddChild_Click(object? sender, RoutedEventArgs e)
|
private async void MenuAddChild_Click(object? sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var selectWindow = new ProfilesSelectWindow();
|
var selectWindow = new ProfilesSelectWindow();
|
||||||
if (ViewModel?.SelectedSource?.ConfigType == EConfigType.PolicyGroup)
|
selectWindow.SetConfigTypeFilter([EConfigType.Custom], exclude: true);
|
||||||
{
|
|
||||||
selectWindow.SetConfigTypeFilter(new[] { EConfigType.Custom }, exclude: true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
selectWindow.SetConfigTypeFilter(new[] { EConfigType.Custom, EConfigType.PolicyGroup, EConfigType.ProxyChain }, exclude: true);
|
|
||||||
}
|
|
||||||
selectWindow.AllowMultiSelect(true);
|
selectWindow.AllowMultiSelect(true);
|
||||||
var result = await selectWindow.ShowDialog<bool?>(this);
|
var result = await selectWindow.ShowDialog<bool?>(this);
|
||||||
if (result == true)
|
if (result == true)
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ public partial class SubEditWindow : WindowBase<SubEditViewModel>
|
||||||
private async void BtnSelectPrevProfile_Click(object? sender, RoutedEventArgs e)
|
private async void BtnSelectPrevProfile_Click(object? sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var selectWindow = new ProfilesSelectWindow();
|
var selectWindow = new ProfilesSelectWindow();
|
||||||
selectWindow.SetConfigTypeFilter(new[] { EConfigType.Custom, EConfigType.PolicyGroup, EConfigType.ProxyChain }, exclude: true);
|
selectWindow.SetConfigTypeFilter([EConfigType.Custom], exclude: true);
|
||||||
var result = await selectWindow.ShowDialog<bool?>(this);
|
var result = await selectWindow.ShowDialog<bool?>(this);
|
||||||
if (result == true)
|
if (result == true)
|
||||||
{
|
{
|
||||||
|
|
@ -74,7 +74,7 @@ public partial class SubEditWindow : WindowBase<SubEditViewModel>
|
||||||
private async void BtnSelectNextProfile_Click(object? sender, RoutedEventArgs e)
|
private async void BtnSelectNextProfile_Click(object? sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var selectWindow = new ProfilesSelectWindow();
|
var selectWindow = new ProfilesSelectWindow();
|
||||||
selectWindow.SetConfigTypeFilter(new[] { EConfigType.Custom, EConfigType.PolicyGroup, EConfigType.ProxyChain }, exclude: true);
|
selectWindow.SetConfigTypeFilter([EConfigType.Custom], exclude: true);
|
||||||
var result = await selectWindow.ShowDialog<bool?>(this);
|
var result = await selectWindow.ShowDialog<bool?>(this);
|
||||||
if (result == true)
|
if (result == true)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -128,14 +128,7 @@ public partial class AddGroupServerWindow
|
||||||
private async void MenuAddChild_Click(object sender, RoutedEventArgs e)
|
private async void MenuAddChild_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var selectWindow = new ProfilesSelectWindow();
|
var selectWindow = new ProfilesSelectWindow();
|
||||||
if (ViewModel?.SelectedSource?.ConfigType == EConfigType.PolicyGroup)
|
selectWindow.SetConfigTypeFilter([EConfigType.Custom], exclude: true);
|
||||||
{
|
|
||||||
selectWindow.SetConfigTypeFilter(new[] { EConfigType.Custom }, exclude: true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
selectWindow.SetConfigTypeFilter(new[] { EConfigType.Custom, EConfigType.PolicyGroup, EConfigType.ProxyChain }, exclude: true);
|
|
||||||
}
|
|
||||||
selectWindow.AllowMultiSelect(true);
|
selectWindow.AllowMultiSelect(true);
|
||||||
if (selectWindow.ShowDialog() == true)
|
if (selectWindow.ShowDialog() == true)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ public partial class SubEditWindow
|
||||||
private async void BtnSelectPrevProfile_Click(object sender, RoutedEventArgs e)
|
private async void BtnSelectPrevProfile_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var selectWindow = new ProfilesSelectWindow();
|
var selectWindow = new ProfilesSelectWindow();
|
||||||
selectWindow.SetConfigTypeFilter(new[] { EConfigType.Custom, EConfigType.PolicyGroup, EConfigType.ProxyChain }, exclude: true);
|
selectWindow.SetConfigTypeFilter([EConfigType.Custom], exclude: true);
|
||||||
if (selectWindow.ShowDialog() == true)
|
if (selectWindow.ShowDialog() == true)
|
||||||
{
|
{
|
||||||
var profile = await selectWindow.ProfileItem;
|
var profile = await selectWindow.ProfileItem;
|
||||||
|
|
@ -67,7 +67,7 @@ public partial class SubEditWindow
|
||||||
private async void BtnSelectNextProfile_Click(object sender, RoutedEventArgs e)
|
private async void BtnSelectNextProfile_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var selectWindow = new ProfilesSelectWindow();
|
var selectWindow = new ProfilesSelectWindow();
|
||||||
selectWindow.SetConfigTypeFilter(new[] { EConfigType.Custom, EConfigType.PolicyGroup, EConfigType.ProxyChain }, exclude: true);
|
selectWindow.SetConfigTypeFilter([EConfigType.Custom], exclude: true);
|
||||||
if (selectWindow.ShowDialog() == true)
|
if (selectWindow.ShowDialog() == true)
|
||||||
{
|
{
|
||||||
var profile = await selectWindow.ProfileItem;
|
var profile = await selectWindow.ProfileItem;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue