Optimize and improve GlobalUsings

This commit is contained in:
2dust
2025-10-19 13:54:40 +08:00
parent b66bfabd21
commit eb1339f2f5
34 changed files with 24 additions and 135 deletions
-4
View File
@@ -1,7 +1,3 @@
using System.Diagnostics;
using System.Windows;
using System.Windows.Threading;
namespace v2rayN;
/// <summary>
+1 -3
View File
@@ -1,5 +1,3 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
@@ -7,4 +5,4 @@ using System.Windows;
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
)]
-3
View File
@@ -1,6 +1,3 @@
using System.Windows;
using ReactiveUI;
namespace v2rayN.Base;
public class WindowBase<TViewModel> : ReactiveWindow<TViewModel> where TViewModel : class
-3
View File
@@ -1,7 +1,4 @@
using System.Collections;
using System.Drawing;
using System.Windows;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Imaging;
-1
View File
@@ -1,4 +1,3 @@
using System.Windows;
using Microsoft.Win32;
namespace v2rayN;
-3
View File
@@ -1,7 +1,4 @@
using System.Drawing;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Microsoft.Win32;
@@ -1,4 +1,3 @@
using System.Windows.Data;
using System.Windows.Media;
namespace v2rayN.Converters;
@@ -1,6 +1,3 @@
using System.Globalization;
using System.Windows.Data;
namespace v2rayN.Converters;
[ValueConversion(typeof(bool), typeof(bool))]
+23
View File
@@ -1,3 +1,26 @@
global using System;
global using System.Collections;
global using System.Collections.Generic;
global using System.ComponentModel;
global using System.Diagnostics;
global using System.Globalization;
global using System.IO;
global using System.Linq;
global using System.Reactive.Disposables;
global using System.Reactive.Linq;
global using System.Runtime.InteropServices;
global using System.Text;
global using System.Threading;
global using System.Threading.Tasks;
global using System.Windows;
global using System.Windows.Data;
global using System.Windows.Input;
global using System.Windows.Interop;
global using System.Windows.Threading;
global using DynamicData;
global using DynamicData.Binding;
global using ReactiveUI;
global using ReactiveUI.Fody.Helpers;
global using ServiceLib;
global using ServiceLib.Base;
global using ServiceLib.Common;
-7
View File
@@ -1,10 +1,3 @@
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows;
using System.Windows.Input;
using System.Windows.Interop;
namespace v2rayN.Manager;
public sealed class HotkeyManager
-1
View File
@@ -1,5 +1,4 @@
using System.Drawing;
using System.IO;
using System.Windows.Media.Imaging;
namespace v2rayN.Manager;
@@ -1,14 +1,6 @@
using System.Reactive.Linq;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Interop;
using DynamicData;
using DynamicData.Binding;
using MaterialDesignColors;
using MaterialDesignColors.ColorManipulation;
using MaterialDesignThemes.Wpf;
using ReactiveUI;
using ReactiveUI.Fody.Helpers;
namespace v2rayN.ViewModels;
@@ -1,9 +1,3 @@
using System.Reactive.Disposables;
using System.Windows;
using System.Windows.Input;
using DynamicData;
using ReactiveUI;
namespace v2rayN.Views;
public partial class AddGroupServerWindow
@@ -1,7 +1,3 @@
using System.Reactive.Disposables;
using System.Windows;
using ReactiveUI;
namespace v2rayN.Views;
public partial class AddServer2Window
@@ -1,7 +1,4 @@
using System.Reactive.Disposables;
using System.Windows;
using System.Windows.Controls;
using ReactiveUI;
namespace v2rayN.Views;
@@ -1,7 +1,3 @@
using System.Reactive.Disposables;
using System.Windows;
using ReactiveUI;
namespace v2rayN.Views;
public partial class BackupAndRestoreView
@@ -1,6 +1,3 @@
using System.Reactive.Disposables;
using ReactiveUI;
namespace v2rayN.Views;
public partial class CheckUpdateView
@@ -1,7 +1,4 @@
using System.Reactive.Disposables;
using System.Windows;
using System.Windows.Controls;
using ReactiveUI;
namespace v2rayN.Views;
@@ -1,7 +1,3 @@
using System.Reactive.Disposables;
using System.Windows.Input;
using ReactiveUI;
namespace v2rayN.Views;
/// <summary>
@@ -1,8 +1,3 @@
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Windows;
using ReactiveUI;
namespace v2rayN.Views;
public partial class DNSSettingWindow
@@ -1,7 +1,3 @@
using System.Reactive.Disposables;
using System.Windows;
using ReactiveUI;
namespace v2rayN.Views;
public partial class FullConfigTemplateWindow
@@ -1,9 +1,4 @@
using System.Reactive.Disposables;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using ReactiveUI;
using v2rayN.Manager;
namespace v2rayN.Views;
-7
View File
@@ -1,13 +1,6 @@
using System.ComponentModel;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media;
using MaterialDesignThemes.Wpf;
using ReactiveUI;
using v2rayN.Manager;
namespace v2rayN.Views;
-5
View File
@@ -1,8 +1,3 @@
using System.Reactive.Disposables;
using System.Windows;
using System.Windows.Threading;
using ReactiveUI;
namespace v2rayN.Views;
public partial class MsgView
@@ -1,9 +1,4 @@
using System.Globalization;
using System.IO;
using System.Reactive.Disposables;
using System.Windows;
using System.Windows.Media;
using ReactiveUI;
namespace v2rayN.Views;
@@ -1,9 +1,5 @@
using System.Reactive.Disposables;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
using ReactiveUI;
using v2rayN.Base;
namespace v2rayN.Views;
-6
View File
@@ -1,13 +1,7 @@
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Threading;
using MaterialDesignThemes.Wpf;
using ReactiveUI;
using v2rayN.Base;
using Point = System.Windows.Point;
@@ -1,7 +1,3 @@
using System.Reactive.Disposables;
using System.Windows;
using ReactiveUI;
namespace v2rayN.Views;
public partial class RoutingRuleDetailsWindow
@@ -1,8 +1,3 @@
using System.Reactive.Disposables;
using System.Windows;
using System.Windows.Input;
using ReactiveUI;
namespace v2rayN.Views;
public partial class RoutingRuleSettingWindow
@@ -1,8 +1,3 @@
using System.Reactive.Disposables;
using System.Windows;
using System.Windows.Input;
using ReactiveUI;
namespace v2rayN.Views;
public partial class RoutingSettingWindow
@@ -1,8 +1,3 @@
using System.Reactive.Disposables;
using System.Windows;
using System.Windows.Input;
using System.Windows.Threading;
using ReactiveUI;
using v2rayN.Manager;
namespace v2rayN.Views;
@@ -1,7 +1,3 @@
using System.Reactive.Disposables;
using System.Windows;
using ReactiveUI;
namespace v2rayN.Views;
public partial class SubEditWindow
@@ -1,9 +1,4 @@
using System.ComponentModel;
using System.Reactive.Disposables;
using System.Windows;
using System.Windows.Input;
using MaterialDesignThemes.Wpf;
using ReactiveUI;
namespace v2rayN.Views;
@@ -1,5 +1,3 @@
using System.Reactive.Disposables;
using ReactiveUI;
using v2rayN.ViewModels;
namespace v2rayN.Views;