diff --git a/BetterGenshinImpact/View/Controls/CodeBox/CodeBox.cs b/BetterGenshinImpact/View/Controls/CodeEditor/CodeBox.cs
similarity index 92%
rename from BetterGenshinImpact/View/Controls/CodeBox/CodeBox.cs
rename to BetterGenshinImpact/View/Controls/CodeEditor/CodeBox.cs
index 7110e89b..0290ea07 100644
--- a/BetterGenshinImpact/View/Controls/CodeBox/CodeBox.cs
+++ b/BetterGenshinImpact/View/Controls/CodeEditor/CodeBox.cs
@@ -1,9 +1,9 @@
-using ICSharpCode.AvalonEdit;
-using System.Windows;
+using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
+using ICSharpCode.AvalonEdit;
-namespace BetterGenshinImpact.View.Controls;
+namespace BetterGenshinImpact.View.Controls.CodeEditor;
public class CodeBox : TextEditor
{
diff --git a/BetterGenshinImpact/View/Controls/CodeBox/CodeBox.xaml b/BetterGenshinImpact/View/Controls/CodeEditor/CodeBox.xaml
similarity index 81%
rename from BetterGenshinImpact/View/Controls/CodeBox/CodeBox.xaml
rename to BetterGenshinImpact/View/Controls/CodeEditor/CodeBox.xaml
index f1685d46..389f2053 100644
--- a/BetterGenshinImpact/View/Controls/CodeBox/CodeBox.xaml
+++ b/BetterGenshinImpact/View/Controls/CodeEditor/CodeBox.xaml
@@ -1,7 +1,8 @@
+ xmlns:local="clr-namespace:BetterGenshinImpact.View.Controls"
+ xmlns:codeEditor="clr-namespace:BetterGenshinImpact.View.Controls.CodeEditor">
-
-
+
+
diff --git a/BetterGenshinImpact/View/Controls/CodeBox/JsonCodeBox.cs b/BetterGenshinImpact/View/Controls/CodeEditor/JsonCodeBox.cs
similarity index 87%
rename from BetterGenshinImpact/View/Controls/CodeBox/JsonCodeBox.cs
rename to BetterGenshinImpact/View/Controls/CodeEditor/JsonCodeBox.cs
index 2e76cba7..d0812fe7 100644
--- a/BetterGenshinImpact/View/Controls/CodeBox/JsonCodeBox.cs
+++ b/BetterGenshinImpact/View/Controls/CodeEditor/JsonCodeBox.cs
@@ -1,10 +1,10 @@
-using BetterGenshinImpact.Helpers;
+using System.IO;
+using System.Xml;
+using BetterGenshinImpact.Helpers;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Highlighting.Xshd;
-using System.IO;
-using System.Xml;
-namespace BetterGenshinImpact.View.Controls;
+namespace BetterGenshinImpact.View.Controls.CodeEditor;
public class JsonCodeBox : CodeBox
{
diff --git a/BetterGenshinImpact/View/Controls/HotKey/HotKeyTextBox.cs b/BetterGenshinImpact/View/Controls/HotKey/HotKeyTextBox.cs
index 790417bc..ec9ec3d3 100644
--- a/BetterGenshinImpact/View/Controls/HotKey/HotKeyTextBox.cs
+++ b/BetterGenshinImpact/View/Controls/HotKey/HotKeyTextBox.cs
@@ -1,10 +1,10 @@
-using BetterGenshinImpact.Model;
-using System.Windows;
+using System.Windows;
using System.Windows.Input;
+using BetterGenshinImpact.Model;
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
using TextBox = Wpf.Ui.Controls.TextBox;
-namespace BetterGenshinImpact.View.Controls;
+namespace BetterGenshinImpact.View.Controls.HotKey;
public class HotKeyTextBox : TextBox
{
@@ -29,10 +29,10 @@ public class HotKeyTextBox : TextBox
public static readonly DependencyProperty HotkeyProperty = DependencyProperty.Register(
nameof(Hotkey),
- typeof(HotKey),
+ typeof(Model.HotKey),
typeof(HotKeyTextBox),
new FrameworkPropertyMetadata(
- default(HotKey),
+ default(Model.HotKey),
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
(sender, _) =>
{
@@ -42,9 +42,9 @@ public class HotKeyTextBox : TextBox
)
);
- public HotKey Hotkey
+ public Model.HotKey Hotkey
{
- get => (HotKey)GetValue(HotkeyProperty);
+ get => (Model.HotKey)GetValue(HotkeyProperty);
set => SetValue(HotkeyProperty, value);
}
@@ -114,7 +114,7 @@ public class HotKeyTextBox : TextBox
// If Delete/Backspace/Escape is pressed without modifiers - clear current value and return
if (key is Key.Delete or Key.Back or Key.Escape && modifiers == ModifierKeys.None)
{
- Hotkey = HotKey.None;
+ Hotkey = Model.HotKey.None;
return;
}
@@ -144,7 +144,7 @@ public class HotKeyTextBox : TextBox
return;
// Set value
- Hotkey = new HotKey(key, modifiers);
+ Hotkey = new Model.HotKey(key, modifiers);
}
///
@@ -157,11 +157,11 @@ public class HotKeyTextBox : TextBox
{
if (HotKeyTypeName == HotKeyTypeEnum.GlobalRegister.ToChineseName())
{
- Hotkey = new HotKey(Key.None);
+ Hotkey = new Model.HotKey(Key.None);
}
else
{
- Hotkey = new HotKey(Key.None, ModifierKeys.None, args.ChangedButton);
+ Hotkey = new Model.HotKey(Key.None, ModifierKeys.None, args.ChangedButton);
}
}
}
diff --git a/BetterGenshinImpact/View/Pages/HotkeyPage.xaml b/BetterGenshinImpact/View/Pages/HotkeyPage.xaml
index 5d5fd992..be1bd744 100644
--- a/BetterGenshinImpact/View/Pages/HotkeyPage.xaml
+++ b/BetterGenshinImpact/View/Pages/HotkeyPage.xaml
@@ -7,6 +7,7 @@
xmlns:model="clr-namespace:BetterGenshinImpact.Model"
xmlns:pages="clr-namespace:BetterGenshinImpact.ViewModel.Pages"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
+ xmlns:hotKey="clr-namespace:BetterGenshinImpact.View.Controls.HotKey"
Title="HotkeyPage"
d:DataContext="{d:DesignInstance Type=pages:HotKeyPageViewModel}"
d:DesignHeight="850"
@@ -50,7 +51,7 @@
Command="{Binding SwitchHotKeyTypeCommand}"
IsEnabled="{Binding SwitchHotkeyTypeEnabled, Mode=OneWay}"
/>
-
-
+
@@ -50,10 +48,10 @@
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Text="白名单" />
-
+
@@ -74,10 +72,10 @@
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Text="黑名单" />
-
+
@@ -97,4 +95,4 @@
-
+
\ No newline at end of file