Skip to content

Commit

Permalink
Code clean
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Jul 21, 2024
1 parent 25f3fc3 commit 4938ce6
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 26 deletions.
2 changes: 1 addition & 1 deletion v2rayN/v2rayN/App.xaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Application
x:Class="v2rayN.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:v2rayN.Converters"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
ShutdownMode="OnExplicitShutdown"
StartupUri="Views/MainWindow.xaml">
<Application.Resources>
Expand Down
4 changes: 2 additions & 2 deletions v2rayN/v2rayN/Handler/CoreHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public CoreHandler(Config config, Action<bool, string> update)
Environment.SetEnvironmentVariable("xray.location.asset", Utils.GetBinPath(""), EnvironmentVariableTarget.Process);
}

public void LoadCore(ProfileItem? node) {
public void LoadCore(ProfileItem? node)
{
if (node == null)
{
ShowMsg(false, ResUI.CheckServerSettings);
Expand Down
2 changes: 1 addition & 1 deletion v2rayN/v2rayN/Handler/MainFormHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public void RegisterSystemColorSet(Config config, Window window, Action<bool> up
{
if (wParam == IntPtr.Zero && Marshal.PtrToStringUni(lParam) == "ImmersiveColorSet")
{
update(!Utils.IsLightTheme());
update(!Utils.IsLightTheme());
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions v2rayN/v2rayN/Views/AddServerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ public AddServerWindow(ProfileItem profileItem)
{
InitializeComponent();



this.Owner = Application.Current.MainWindow;
this.Loaded += Window_Loaded;
cmbNetwork.SelectionChanged += CmbNetwork_SelectionChanged;
Expand Down
7 changes: 3 additions & 4 deletions v2rayN/v2rayN/Views/ClashConnectionsView.xaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<reactiveui:ReactiveUserControl
x:Class="v2rayN.Views.ClashConnectionsView"
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:local="clr-namespace:v2rayN.Views"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
d:DesignHeight="450"
Expand Down
8 changes: 4 additions & 4 deletions v2rayN/v2rayN/Views/ClashProxiesView.xaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<reactiveui:ReactiveUserControl
x:Class="v2rayN.Views.ClashProxiesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:v2rayN.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:converters="clr-namespace:v2rayN.Converters"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
d:DesignHeight="450"
Expand Down
1 change: 0 additions & 1 deletion v2rayN/v2rayN/Views/DNSSettingWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public DNSSettingWindow()
{
InitializeComponent();


this.Owner = Application.Current.MainWindow;
_config = LazyConfig.Instance.GetConfig();

Expand Down
1 change: 0 additions & 1 deletion v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public GlobalHotkeySettingWindow()
{
InitializeComponent();


this.Owner = Application.Current.MainWindow;
_config = LazyConfig.Instance.GetConfig();
_config.globalHotkeys ??= new List<KeyEventItem>();
Expand Down
2 changes: 0 additions & 2 deletions v2rayN/v2rayN/Views/RoutingRuleDetailsWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ public RoutingRuleDetailsWindow(RulesItem rulesItem)
{
InitializeComponent();



this.Owner = Application.Current.MainWindow;
this.Loaded += Window_Loaded;
clbProtocol.SelectionChanged += ClbProtocol_SelectionChanged;
Expand Down
2 changes: 0 additions & 2 deletions v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ public RoutingRuleSettingWindow(RoutingItem routingItem)
{
InitializeComponent();



this.Owner = Application.Current.MainWindow;
this.Loaded += Window_Loaded;
this.PreviewKeyDown += RoutingRuleSettingWindow_PreviewKeyDown;
Expand Down
2 changes: 0 additions & 2 deletions v2rayN/v2rayN/Views/RoutingSettingWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ public RoutingSettingWindow()
{
InitializeComponent();



this.Owner = Application.Current.MainWindow;
this.Closing += RoutingSettingWindow_Closing;
this.PreviewKeyDown += RoutingSettingWindow_PreviewKeyDown;
Expand Down
2 changes: 0 additions & 2 deletions v2rayN/v2rayN/Views/SubEditWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ public SubEditWindow(SubItem subItem)
{
InitializeComponent();



this.Owner = Application.Current.MainWindow;
this.Loaded += Window_Loaded;

Expand Down
2 changes: 0 additions & 2 deletions v2rayN/v2rayN/Views/SubSettingWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ public SubSettingWindow()
{
InitializeComponent();



this.Owner = Application.Current.MainWindow;

ViewModel = new SubSettingViewModel(this);
Expand Down

0 comments on commit 4938ce6

Please sign in to comment.