mirror of
https://github.com/2dust/v2rayN.git
synced 2026-05-30 01:34:08 +00:00
Case-insensitive name checks and IpInfo visibility
This commit is contained in:
parent
0c796a157b
commit
c7519f8ea7
2 changed files with 10 additions and 2 deletions
|
|
@ -425,10 +425,14 @@ public partial class ProfilesView : ReactiveUserControl<ProfilesViewModel>
|
|||
item2.Width = new DataGridLength(item.Width, DataGridLengthUnitType.Pixel);
|
||||
item2.DisplayIndex = displayIndex++;
|
||||
}
|
||||
if (item.Name.ToLower().StartsWith("to"))
|
||||
if (item.Name.StartsWith("to", StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
item2.IsVisible = _config.GuiItem.EnableStatistics;
|
||||
}
|
||||
if (item.Name.Equals("IpInfo", StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
item2.IsVisible = _config.SpeedTestItem.IPAPIUrl.IsNotEmpty();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -378,10 +378,14 @@ public partial class ProfilesView
|
|||
item2.Width = item.Width;
|
||||
item2.DisplayIndex = displayIndex++;
|
||||
}
|
||||
if (item.Name.ToLower().StartsWith("to"))
|
||||
if (item.Name.StartsWith("to", StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
item2.Visibility = _config.GuiItem.EnableStatistics ? Visibility.Visible : Visibility.Hidden;
|
||||
}
|
||||
if (item.Name.Equals("IpInfo", StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
item2.Visibility = _config.SpeedTestItem.IPAPIUrl.IsNotEmpty() ? Visibility.Visible : Visibility.Hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue