From e71525db0e46d8d6d86375b20b5129b3f2784860 Mon Sep 17 00:00:00 2001
From: 2dust <31833384+2dust@users.noreply.github.com>
Date: Thu, 25 Jan 2024 17:28:06 +0800
Subject: [PATCH] Refactor
---
v2rayN/v2rayN/Views/AddServer2Window.xaml | 329 +++++++++---------
v2rayN/v2rayN/Views/AddServerWindow.xaml | 13 +-
v2rayN/v2rayN/Views/AddServerWindow.xaml.cs | 5 -
v2rayN/v2rayN/Views/DNSSettingWindow.xaml | 5 +-
v2rayN/v2rayN/Views/DNSSettingWindow.xaml.cs | 5 -
.../Views/GlobalHotkeySettingWindow.xaml | 305 ++++++++--------
.../Views/GlobalHotkeySettingWindow.xaml.cs | 5 -
v2rayN/v2rayN/Views/MainWindow.xaml | 14 +-
v2rayN/v2rayN/Views/OptionSettingWindow.xaml | 5 +-
.../v2rayN/Views/OptionSettingWindow.xaml.cs | 5 -
.../Views/RoutingRuleDetailsWindow.xaml | 4 +-
.../Views/RoutingRuleDetailsWindow.xaml.cs | 5 -
.../Views/RoutingRuleSettingWindow.xaml | 4 +-
v2rayN/v2rayN/Views/RoutingSettingWindow.xaml | 4 +-
v2rayN/v2rayN/Views/SubEditWindow.xaml | 10 +-
v2rayN/v2rayN/Views/SubEditWindow.xaml.cs | 5 -
16 files changed, 340 insertions(+), 383 deletions(-)
diff --git a/v2rayN/v2rayN/Views/AddServer2Window.xaml b/v2rayN/v2rayN/Views/AddServer2Window.xaml
index 20dc079d..86aba9b9 100644
--- a/v2rayN/v2rayN/Views/AddServer2Window.xaml
+++ b/v2rayN/v2rayN/Views/AddServer2Window.xaml
@@ -2,10 +2,8 @@
x:Class="v2rayN.Views.AddServer2Window"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:Views="clr-namespace:v2rayN.Views"
xmlns:conv="clr-namespace:v2rayN.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:v2rayN"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
@@ -25,182 +23,181 @@
TextOptions.TextRenderingMode="Auto"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+ Text="{x:Static resx:ResUI.TbRemarks}" />
+
+
-
-
-
-
-
+ Text="{x:Static resx:ResUI.TbAddress}" />
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
\ No newline at end of file
diff --git a/v2rayN/v2rayN/Views/AddServerWindow.xaml b/v2rayN/v2rayN/Views/AddServerWindow.xaml
index 8da7df19..e7371755 100644
--- a/v2rayN/v2rayN/Views/AddServerWindow.xaml
+++ b/v2rayN/v2rayN/Views/AddServerWindow.xaml
@@ -1,12 +1,12 @@
-
-
+
+
\ No newline at end of file
diff --git a/v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs b/v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs
index 5f511320..f4c936c5 100644
--- a/v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs
+++ b/v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs
@@ -123,11 +123,6 @@ namespace v2rayN.Views
}
}
- private void btnCancel_Click(object sender, RoutedEventArgs e)
- {
- this.Close();
- }
-
private void btnReset_Click(object sender, RoutedEventArgs e)
{
foreach (var k in _TextBoxKeyEventItem.Keys)
diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml b/v2rayN/v2rayN/Views/MainWindow.xaml
index 1644b640..a37084e8 100644
--- a/v2rayN/v2rayN/Views/MainWindow.xaml
+++ b/v2rayN/v2rayN/Views/MainWindow.xaml
@@ -1,17 +1,17 @@
-
-
+
+
vm.SaveCmd, v => v.btnSave).DisposeWith(disposables);
});
}
-
- private void btnCancel_Click(object sender, RoutedEventArgs e)
- {
- this.Close();
- }
}
}
\ No newline at end of file
diff --git a/v2rayN/v2rayN/Views/RoutingRuleDetailsWindow.xaml b/v2rayN/v2rayN/Views/RoutingRuleDetailsWindow.xaml
index bbce43c4..4db91dd2 100644
--- a/v2rayN/v2rayN/Views/RoutingRuleDetailsWindow.xaml
+++ b/v2rayN/v2rayN/Views/RoutingRuleDetailsWindow.xaml
@@ -139,8 +139,8 @@
DockPanel.Dock="Bottom">
-
-
+
+
().ToList();
}
- private void btnCancel_Click(object sender, RoutedEventArgs e)
- {
- this.Close();
- }
-
private void linkRuleobjectDoc_Click(object sender, RoutedEventArgs e)
{
Utils.ProcessStart("https://www.v2fly.org/config/routing.html#ruleobject");
diff --git a/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml b/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml
index b10ae720..40f4d13f 100644
--- a/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml
+++ b/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml
@@ -78,8 +78,8 @@
DockPanel.Dock="Bottom">
-
-
+
+
-
-
+
+
-
+
-
-
+
+