文件更名

This commit is contained in:
2026-04-05 21:50:53 +08:00
parent 5aad206e0d
commit bcbece5bd6
30 changed files with 64 additions and 64 deletions
+1 -1
View File
@@ -2817,7 +2817,7 @@ namespace Ink_Canvas
if (isOpeningOrHidingSettingsPane) return;
HideSubPanels();
{
var settingsWindow = new Windows.SettingsViews2.SettingsWindow2();
var settingsWindow = new Windows.SettingsViews.SettingsWindow();
settingsWindow.Owner = this;
settingsWindow.ShowDialog();
}
@@ -7,7 +7,7 @@ using System.Windows.Controls;
using System.Windows.Input;
using Media = System.Windows.Media;
namespace Ink_Canvas.Windows.SettingsViews2
namespace Ink_Canvas.Windows.SettingsViews
{
public static class MainWindowSettingsHelper
{
@@ -331,7 +331,7 @@ namespace Ink_Canvas.Windows.SettingsViews2
// 查找所有打开的设置窗口
foreach (Window window in Application.Current.Windows)
{
if (window.GetType().Name == "SettingsWindow2")
if (window.GetType().Name == "SettingsWindow")
{
// 同步所有面板(保守策略)
SyncAllPanels(window);
@@ -456,8 +456,8 @@ namespace Ink_Canvas.Windows.SettingsViews2
// 查找所有打开的设置窗口
foreach (Window window in Application.Current.Windows)
{
// 使用类型名称匹配,因为 SettingsWindow2 在不同的命名空间中
if (window.GetType().Name == "SettingsWindow2")
// 使用类型名称匹配,因为 SettingsWindow 在不同的命名空间中
if (window.GetType().Name == "SettingsWindow")
{
// 同时调用 ApplyTheme 方法更新窗口本身
var applyThemeMethod = window.GetType().GetMethod("ApplyTheme",
@@ -1,5 +1,5 @@
<ui:Page
x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.AboutPage"
x:Class="Ink_Canvas.Windows.SettingsViews.Pages.AboutPage"
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"
@@ -1,6 +1,6 @@
using iNKORE.UI.WPF.Modern.Controls;
namespace Ink_Canvas.Windows.SettingsViews2.Pages
namespace Ink_Canvas.Windows.SettingsViews.Pages
{
public partial class AboutPage : Page
{
@@ -1,9 +1,9 @@
<Page x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.AppearancePage"
<Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.AppearancePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews2.Pages"
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Ink_Canvas.Windows.SettingsViews2.Pages
namespace Ink_Canvas.Windows.SettingsViews.Pages
{
public partial class AppearancePage : Page
{
@@ -24,7 +24,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Click(object sender, RoutedEventArgs e)
{
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
settingsWindow.NavigateToPage("ThemePage");
@@ -33,7 +33,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Click_1(object sender, RoutedEventArgs e)
{
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
settingsWindow.NavigateToPage("ColorsPage");
@@ -42,7 +42,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Click_2(object sender, RoutedEventArgs e)
{
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
settingsWindow.NavigateToPage("FontsPage");
@@ -1,9 +1,9 @@
<Page x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.BasicPage"
<Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.BasicPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews2.Pages"
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Ink_Canvas.Windows.SettingsViews2.Pages
namespace Ink_Canvas.Windows.SettingsViews.Pages
{
/// <summary>
/// Basic.xaml 的交互逻辑
@@ -27,8 +27,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Click(object sender, RoutedEventArgs e)
{
// 找到SettingsWindow2窗口
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
// 找到SettingsWindow窗口
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
// 调用NavigateToPage方法导航到启动页面
@@ -1,5 +1,5 @@
<ui:Page
x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.ColorsPage"
x:Class="Ink_Canvas.Windows.SettingsViews.Pages.ColorsPage"
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"
@@ -1,6 +1,6 @@
using iNKORE.UI.WPF.Modern.Controls;
namespace Ink_Canvas.Windows.SettingsViews2.Pages
namespace Ink_Canvas.Windows.SettingsViews.Pages
{
public partial class ColorsPage : Page
{
@@ -1,9 +1,9 @@
<Page x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.DesignPage"
<Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.DesignPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews2.Pages"
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Ink_Canvas.Windows.SettingsViews2.Pages
namespace Ink_Canvas.Windows.SettingsViews.Pages
{
public partial class DesignPage : Page
{
@@ -24,7 +24,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Click(object sender, RoutedEventArgs e)
{
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
settingsWindow.NavigateToPage("IconographyPage");
@@ -33,7 +33,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Click_1(object sender, RoutedEventArgs e)
{
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
settingsWindow.NavigateToPage("TypographyPage");
@@ -1,5 +1,5 @@
<ui:Page
x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.FontsPage"
x:Class="Ink_Canvas.Windows.SettingsViews.Pages.FontsPage"
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"
@@ -1,6 +1,6 @@
using iNKORE.UI.WPF.Modern.Controls;
namespace Ink_Canvas.Windows.SettingsViews2.Pages
namespace Ink_Canvas.Windows.SettingsViews.Pages
{
public partial class FontsPage : Page
{
@@ -1,9 +1,9 @@
<Page x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.HomePage"
<Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.HomePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews2.Pages"
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Ink_Canvas.Windows.SettingsViews2.Pages
namespace Ink_Canvas.Windows.SettingsViews.Pages
{
/// <summary>
/// HomePage.xaml 的交互逻辑
@@ -27,8 +27,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Basic_Click(object sender, RoutedEventArgs e)
{
// 找到SettingsWindow2窗口
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
// 找到SettingsWindow窗口
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
// 调用NavigateToPage方法导航到基本设置页面
@@ -38,8 +38,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Page2_Click(object sender, RoutedEventArgs e)
{
// 找到SettingsWindow2窗口
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
// 找到SettingsWindow窗口
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
// 调用NavigateToPage方法导航到页面2
@@ -49,8 +49,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Design_Click(object sender, RoutedEventArgs e)
{
// 找到SettingsWindow2窗口
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
// 找到SettingsWindow窗口
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
// 调用NavigateToPage方法导航到设计设置页面
@@ -60,8 +60,8 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
private void SettingsCard_Appearance_Click(object sender, RoutedEventArgs e)
{
// 找到SettingsWindow2窗口
SettingsWindow2 settingsWindow = Window.GetWindow(this) as SettingsWindow2;
// 找到SettingsWindow窗口
SettingsWindow settingsWindow = Window.GetWindow(this) as SettingsWindow;
if (settingsWindow != null)
{
// 调用NavigateToPage方法导航到外观设置页面
@@ -1,5 +1,5 @@
<ui:Page
x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.IconographyPage"
x:Class="Ink_Canvas.Windows.SettingsViews.Pages.IconographyPage"
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"
@@ -1,4 +1,4 @@
namespace Ink_Canvas.Windows.SettingsViews2.Pages
namespace Ink_Canvas.Windows.SettingsViews.Pages
{
public partial class IconographyPage : iNKORE.UI.WPF.Modern.Controls.Page
{
@@ -1,9 +1,9 @@
<Page x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.Page2Page"
<Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.Page2Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews2.Pages"
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Title="Page2">
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Ink_Canvas.Windows.SettingsViews2.Pages
namespace Ink_Canvas.Windows.SettingsViews.Pages
{
/// <summary>
/// Page2.xaml 的交互逻辑
@@ -1,5 +1,5 @@
<ui:Page
x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.SettingsPage"
x:Class="Ink_Canvas.Windows.SettingsViews.Pages.SettingsPage"
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"
@@ -1,6 +1,6 @@
using iNKORE.UI.WPF.Modern.Controls;
namespace Ink_Canvas.Windows.SettingsViews2.Pages
namespace Ink_Canvas.Windows.SettingsViews.Pages
{
public partial class SettingsPage : Page
{
@@ -1,9 +1,9 @@
<Page x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.StartupPage"
<Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.StartupPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews2.Pages"
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
@@ -2,7 +2,7 @@ using System;
using System.Windows;
using System.Windows.Controls;
namespace Ink_Canvas.Windows.SettingsViews2.Pages
namespace Ink_Canvas.Windows.SettingsViews.Pages
{
/// <summary>
/// StartupPage.xaml 的交互逻辑
@@ -97,7 +97,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
bool newState = ToggleSwitchNoFocusMode.IsOn;
// 使用Helper类更新设置并应用
Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchNoFocusMode", newState);
Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchNoFocusMode", newState);
}
catch (Exception ex)
{
@@ -117,7 +117,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
bool newState = ToggleSwitchWindowMode.IsOn;
// 使用Helper类更新设置并应用
Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchWindowMode", newState);
Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchWindowMode", newState);
}
catch (Exception ex)
{
@@ -137,7 +137,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
bool newState = ToggleSwitchAlwaysOnTop.IsOn;
// 使用Helper类更新设置并应用
Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchAlwaysOnTop", newState);
Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchAlwaysOnTop", newState);
}
catch (Exception ex)
{
@@ -166,7 +166,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
MainWindow.SaveSettingsToFile();
// 通知其他面板同步状态
Windows.SettingsViews2.MainWindowSettingsHelper.NotifySettingsPanelsSyncState("ToggleSwitchUIAccessTopMost");
Windows.SettingsViews.MainWindowSettingsHelper.NotifySettingsPanelsSyncState("ToggleSwitchUIAccessTopMost");
}
catch (Exception ex)
{
@@ -190,7 +190,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
bool newState = ToggleSwitchRunAtStartup.IsOn;
// 使用Helper类更新设置并应用
Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchRunAtStartup", newState);
Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchRunAtStartup", newState);
}
catch (Exception ex)
{
@@ -210,7 +210,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
bool newState = ToggleSwitchFoldAtStartup.IsOn;
// 使用Helper类更新设置并应用
Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchFoldAtStartup", newState);
Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchFoldAtStartup", newState);
}
catch (Exception ex)
{
@@ -234,7 +234,7 @@ namespace Ink_Canvas.Windows.SettingsViews2.Pages
bool newState = ToggleSwitchPPTOnlyMode.IsOn;
// 使用Helper类更新设置并应用
Windows.SettingsViews2.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchMode", newState);
Windows.SettingsViews.MainWindowSettingsHelper.InvokeToggleSwitchToggled("ToggleSwitchMode", newState);
}
catch (Exception ex)
{
@@ -1,5 +1,5 @@
<ui:Page
x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.ThemePage"
x:Class="Ink_Canvas.Windows.SettingsViews.Pages.ThemePage"
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"
@@ -1,6 +1,6 @@
using iNKORE.UI.WPF.Modern.Controls;
namespace Ink_Canvas.Windows.SettingsViews2.Pages
namespace Ink_Canvas.Windows.SettingsViews.Pages
{
public partial class ThemePage : Page
{
@@ -1,5 +1,5 @@
<ui:Page
x:Class="Ink_Canvas.Windows.SettingsViews2.Pages.TypographyPage"
x:Class="Ink_Canvas.Windows.SettingsViews.Pages.TypographyPage"
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"
@@ -1,6 +1,6 @@
using iNKORE.UI.WPF.Modern.Controls;
namespace Ink_Canvas.Windows.SettingsViews2.Pages
namespace Ink_Canvas.Windows.SettingsViews.Pages
{
public partial class TypographyPage : Page
{
@@ -1,5 +1,5 @@
<Window
x:Class="Ink_Canvas.Windows.SettingsViews2.SettingsWindow2"
x:Class="Ink_Canvas.Windows.SettingsViews.SettingsWindow"
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"
@@ -1,4 +1,4 @@
using Ink_Canvas.Windows.SettingsViews2.Pages;
using Ink_Canvas.Windows.SettingsViews.Pages;
using iNKORE.UI.WPF.Modern.Controls;
using System;
using System.Collections.Generic;
@@ -10,9 +10,9 @@ using System.Linq;
using MessageBox = System.Windows.MessageBox;
using Screen = System.Windows.Forms.Screen;
namespace Ink_Canvas.Windows.SettingsViews2
namespace Ink_Canvas.Windows.SettingsViews
{
public partial class SettingsWindow2 : Window
public partial class SettingsWindow : Window
{
private readonly Dictionary<string, Type> _pageTypes;
private readonly Dictionary<string, object> _pages = new Dictionary<string, object>();
@@ -26,7 +26,7 @@ namespace Ink_Canvas.Windows.SettingsViews2
// 标记窗口是否曾经最大化过
private bool _wasMaximized = false;
public SettingsWindow2()
public SettingsWindow()
{
InitializeComponent();