improve:UI
This commit is contained in:
@@ -2737,7 +2737,22 @@ Hide</value>
|
|||||||
<value>Logs</value>
|
<value>Logs</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Storage_Logs_Desc" xml:space="preserve">
|
<data name="Storage_Logs_Desc" xml:space="preserve">
|
||||||
<value>.txt logs and crash reports under Logs / Crashs. Cleanable.</value>
|
<value>.txt logs and crash reports under Logs / Crashes. Cleanable.</value>
|
||||||
|
</data>
|
||||||
|
<data name="Hotkey_NotSet" xml:space="preserve">
|
||||||
|
<value>Not set</value>
|
||||||
|
</data>
|
||||||
|
<data name="Settings_Nav_Security" xml:space="preserve">
|
||||||
|
<value>Security</value>
|
||||||
|
</data>
|
||||||
|
<data name="Settings_Nav_Security_Tooltip" xml:space="preserve">
|
||||||
|
<value>Security password and process protection</value>
|
||||||
|
</data>
|
||||||
|
<data name="Settings_Nav_Hotkey" xml:space="preserve">
|
||||||
|
<value>Hotkeys</value>
|
||||||
|
</data>
|
||||||
|
<data name="Settings_Nav_Hotkey_Tooltip" xml:space="preserve">
|
||||||
|
<value>Hotkey settings</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Storage_Ink_Header" xml:space="preserve">
|
<data name="Storage_Ink_Header" xml:space="preserve">
|
||||||
<value>Ink</value>
|
<value>Ink</value>
|
||||||
@@ -2799,4 +2814,46 @@ Hide</value>
|
|||||||
<data name="Storage_NavTooltip" xml:space="preserve">
|
<data name="Storage_NavTooltip" xml:space="preserve">
|
||||||
<value>View and clean storage used by ICC CE</value>
|
<value>View and clean storage used by ICC CE</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Debug_ShowConsole_Header" xml:space="preserve">
|
||||||
|
<value>Show debug console</value>
|
||||||
|
</data>
|
||||||
|
<data name="Debug_ShowConsole_Desc" xml:space="preserve">
|
||||||
|
<value>Show a separate console window for live log output (takes effect immediately; if "Enable logging" is off in settings, no content will be emitted).</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_UseCustomSaveFileName_Header" xml:space="preserve">
|
||||||
|
<value>Use custom save file name</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_UseCustomSaveFileName_Desc" xml:space="preserve">
|
||||||
|
<value>When enabled, choose how saved files are named</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileNameFormat" xml:space="preserve">
|
||||||
|
<value>File name format</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_Timestamp" xml:space="preserve">
|
||||||
|
<value>Timestamp (default)</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_Date" xml:space="preserve">
|
||||||
|
<value>Date</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_DateTime" xml:space="preserve">
|
||||||
|
<value>Date + Time</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_DateMode" xml:space="preserve">
|
||||||
|
<value>Date + Mode</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_DateModePage" xml:space="preserve">
|
||||||
|
<value>Date + Mode + Page</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_DateModePageCount" xml:space="preserve">
|
||||||
|
<value>Date + Mode + Page + Stroke count</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_Custom" xml:space="preserve">
|
||||||
|
<value>Custom...</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_CustomTemplate_Header" xml:space="preserve">
|
||||||
|
<value>Custom template</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_CustomTemplate_Desc" xml:space="preserve">
|
||||||
|
<value>Available placeholders: {date} {time} {datetime} {mode} {page} {count} {type}</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -2782,6 +2782,21 @@
|
|||||||
<data name="Storage_Logs_Desc" xml:space="preserve">
|
<data name="Storage_Logs_Desc" xml:space="preserve">
|
||||||
<value>位于 Logs / Crashs 目录下的 .txt 日志与崩溃报告,可清理</value>
|
<value>位于 Logs / Crashs 目录下的 .txt 日志与崩溃报告,可清理</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Hotkey_NotSet" xml:space="preserve">
|
||||||
|
<value>未设置</value>
|
||||||
|
</data>
|
||||||
|
<data name="Settings_Nav_Security" xml:space="preserve">
|
||||||
|
<value>安全</value>
|
||||||
|
</data>
|
||||||
|
<data name="Settings_Nav_Security_Tooltip" xml:space="preserve">
|
||||||
|
<value>安全密码与进程保护</value>
|
||||||
|
</data>
|
||||||
|
<data name="Settings_Nav_Hotkey" xml:space="preserve">
|
||||||
|
<value>快捷键</value>
|
||||||
|
</data>
|
||||||
|
<data name="Settings_Nav_Hotkey_Tooltip" xml:space="preserve">
|
||||||
|
<value>快捷键设置</value>
|
||||||
|
</data>
|
||||||
<data name="Storage_Ink_Header" xml:space="preserve">
|
<data name="Storage_Ink_Header" xml:space="preserve">
|
||||||
<value>墨迹</value>
|
<value>墨迹</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -2842,4 +2857,46 @@
|
|||||||
<data name="Storage_NavTooltip" xml:space="preserve">
|
<data name="Storage_NavTooltip" xml:space="preserve">
|
||||||
<value>查看与清理 ICC CE 占用的存储空间</value>
|
<value>查看与清理 ICC CE 占用的存储空间</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Debug_ShowConsole_Header" xml:space="preserve">
|
||||||
|
<value>显示调试窗口</value>
|
||||||
|
</data>
|
||||||
|
<data name="Debug_ShowConsole_Desc" xml:space="preserve">
|
||||||
|
<value>显示一个独立的控制台窗口,用于实时输出日志(开启后立即生效;关闭设置中的“启用日志记录”将不会输出内容)。</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_UseCustomSaveFileName_Header" xml:space="preserve">
|
||||||
|
<value>使用自定义保存文件名</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_UseCustomSaveFileName_Desc" xml:space="preserve">
|
||||||
|
<value>开启后可选择保存文件的命名方式</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileNameFormat" xml:space="preserve">
|
||||||
|
<value>文件名格式</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_Timestamp" xml:space="preserve">
|
||||||
|
<value>时间戳(默认)</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_Date" xml:space="preserve">
|
||||||
|
<value>日期</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_DateTime" xml:space="preserve">
|
||||||
|
<value>日期 + 时间</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_DateMode" xml:space="preserve">
|
||||||
|
<value>日期 + 模式</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_DateModePage" xml:space="preserve">
|
||||||
|
<value>日期 + 模式 + 页码</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_DateModePageCount" xml:space="preserve">
|
||||||
|
<value>日期 + 模式 + 页码 + 笔画数</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_Custom" xml:space="preserve">
|
||||||
|
<value>自定义...</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_CustomTemplate_Header" xml:space="preserve">
|
||||||
|
<value>自定义模板</value>
|
||||||
|
</data>
|
||||||
|
<data name="Automation_SaveFileName_CustomTemplate_Desc" xml:space="preserve">
|
||||||
|
<value>可用占位符:{date} {time} {datetime} {mode} {page} {count} {type}</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||||
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
||||||
|
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="68"
|
d:DesignHeight="68"
|
||||||
d:DesignWidth="600">
|
d:DesignWidth="600">
|
||||||
@@ -20,7 +21,7 @@
|
|||||||
FontFamily="Consolas"
|
FontFamily="Consolas"
|
||||||
FontWeight="SemiBold"
|
FontWeight="SemiBold"
|
||||||
Click="BtnSetHotkey_Click">
|
Click="BtnSetHotkey_Click">
|
||||||
<TextBlock x:Name="CurrentHotkeyTextBlock" Text="未设置" />
|
<TextBlock x:Name="CurrentHotkeyTextBlock" Text="{i18n:I18n Key=Hotkey_NotSet}" />
|
||||||
</Button>
|
</Button>
|
||||||
</ui:SettingsCard>
|
</ui:SettingsCard>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using Ink_Canvas.Helpers;
|
||||||
using System;
|
using System;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
@@ -68,7 +69,7 @@ namespace Ink_Canvas.Windows
|
|||||||
{
|
{
|
||||||
if (_currentKey == Key.None)
|
if (_currentKey == Key.None)
|
||||||
{
|
{
|
||||||
CurrentHotkeyTextBlock.Text = "未设置";
|
CurrentHotkeyTextBlock.Text = LocalizationHelper.GetString("Hotkey_NotSet");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -339,14 +339,12 @@ namespace Ink_Canvas.Windows.SettingsViews.Helpers
|
|||||||
};
|
};
|
||||||
|
|
||||||
bool isThemeRelated = false;
|
bool isThemeRelated = false;
|
||||||
string controlNameLower = controlName.ToLower();
|
|
||||||
|
|
||||||
foreach (var themeControl in themeRelatedControls)
|
foreach (var themeControl in themeRelatedControls)
|
||||||
{
|
{
|
||||||
string themeControlLower = themeControl.ToLower();
|
// OrdinalIgnoreCase 避免在循环里反复 ToLower() 生成中间字符串。
|
||||||
if (controlNameLower.Contains(themeControlLower) ||
|
if (controlName.IndexOf(themeControl, StringComparison.OrdinalIgnoreCase) >= 0 ||
|
||||||
themeControlLower.Contains(controlNameLower) ||
|
themeControl.IndexOf(controlName, StringComparison.OrdinalIgnoreCase) >= 0)
|
||||||
controlNameLower == themeControlLower)
|
|
||||||
{
|
{
|
||||||
isThemeRelated = true;
|
isThemeRelated = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -228,8 +228,14 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
|||||||
private void ViewboxFloatingBarScaleTransformValueSlider_ValueChanged(object sender, RoutedEventArgs e)
|
private void ViewboxFloatingBarScaleTransformValueSlider_ValueChanged(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!_isLoaded) return;
|
if (!_isLoaded) return;
|
||||||
var val = Math.Round(ViewboxFloatingBarScaleTransformValueSlider.Value, 2);
|
var slider = ViewboxFloatingBarScaleTransformValueSlider;
|
||||||
ViewboxFloatingBarScaleTransformValueSlider.Value = val;
|
var val = Math.Round(slider.Value, 2);
|
||||||
|
// 仅当四舍五入纠正了显示值时才回写;那次 set 会重入 ValueChanged 完成保存。
|
||||||
|
if (slider.Value != val)
|
||||||
|
{
|
||||||
|
slider.Value = val;
|
||||||
|
return;
|
||||||
|
}
|
||||||
SettingsManager.Settings.Appearance.ViewboxFloatingBarScaleTransformValue = val;
|
SettingsManager.Settings.Appearance.ViewboxFloatingBarScaleTransformValue = val;
|
||||||
SettingsManager.SaveSettingsToFile();
|
SettingsManager.SaveSettingsToFile();
|
||||||
var mw = GetMainWindow();
|
var mw = GetMainWindow();
|
||||||
@@ -247,8 +253,13 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
|||||||
private void ViewboxFloatingBarOpacityValueSlider_ValueChanged(object sender, RoutedEventArgs e)
|
private void ViewboxFloatingBarOpacityValueSlider_ValueChanged(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!_isLoaded) return;
|
if (!_isLoaded) return;
|
||||||
var val = Math.Round(ViewboxFloatingBarOpacityValueSlider.Value, 2);
|
var slider = ViewboxFloatingBarOpacityValueSlider;
|
||||||
ViewboxFloatingBarOpacityValueSlider.Value = val;
|
var val = Math.Round(slider.Value, 2);
|
||||||
|
if (slider.Value != val)
|
||||||
|
{
|
||||||
|
slider.Value = val;
|
||||||
|
return;
|
||||||
|
}
|
||||||
SettingsManager.Settings.Appearance.ViewboxFloatingBarOpacityValue = val;
|
SettingsManager.Settings.Appearance.ViewboxFloatingBarOpacityValue = val;
|
||||||
SettingsManager.SaveSettingsToFile();
|
SettingsManager.SaveSettingsToFile();
|
||||||
var mw = GetMainWindow();
|
var mw = GetMainWindow();
|
||||||
@@ -258,8 +269,13 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
|||||||
private void ViewboxFloatingBarOpacityInPPTValueSlider_ValueChanged(object sender, RoutedEventArgs e)
|
private void ViewboxFloatingBarOpacityInPPTValueSlider_ValueChanged(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!_isLoaded) return;
|
if (!_isLoaded) return;
|
||||||
var val = Math.Round(ViewboxFloatingBarOpacityInPPTValueSlider.Value, 2);
|
var slider = ViewboxFloatingBarOpacityInPPTValueSlider;
|
||||||
ViewboxFloatingBarOpacityInPPTValueSlider.Value = val;
|
var val = Math.Round(slider.Value, 2);
|
||||||
|
if (slider.Value != val)
|
||||||
|
{
|
||||||
|
slider.Value = val;
|
||||||
|
return;
|
||||||
|
}
|
||||||
SettingsManager.Settings.Appearance.ViewboxFloatingBarOpacityInPPTValue = val;
|
SettingsManager.Settings.Appearance.ViewboxFloatingBarOpacityInPPTValue = val;
|
||||||
SettingsManager.SaveSettingsToFile();
|
SettingsManager.SaveSettingsToFile();
|
||||||
var mw = GetMainWindow();
|
var mw = GetMainWindow();
|
||||||
@@ -290,8 +306,13 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
|||||||
private void ViewboxBlackBoardScaleTransformValueSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
private void ViewboxBlackBoardScaleTransformValueSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||||
{
|
{
|
||||||
if (!_isLoaded) return;
|
if (!_isLoaded) return;
|
||||||
var val = Math.Round(ViewboxBlackBoardScaleTransformValueSlider.Value, 2);
|
var slider = ViewboxBlackBoardScaleTransformValueSlider;
|
||||||
ViewboxBlackBoardScaleTransformValueSlider.Value = val;
|
var val = Math.Round(slider.Value, 2);
|
||||||
|
if (slider.Value != val)
|
||||||
|
{
|
||||||
|
slider.Value = val;
|
||||||
|
return;
|
||||||
|
}
|
||||||
SettingsManager.Settings.Appearance.ViewboxBlackBoardScaleTransformValue = val;
|
SettingsManager.Settings.Appearance.ViewboxBlackBoardScaleTransformValue = val;
|
||||||
SettingsManager.SaveSettingsToFile();
|
SettingsManager.SaveSettingsToFile();
|
||||||
var mw = GetMainWindow();
|
var mw = GetMainWindow();
|
||||||
|
|||||||
@@ -373,30 +373,30 @@
|
|||||||
Toggled="ToggleSwitchSaveFullPageStrokes_Toggled"/>
|
Toggled="ToggleSwitchSaveFullPageStrokes_Toggled"/>
|
||||||
|
|
||||||
<controls:LabeledSettingsCard x:Name="CardUseCustomSaveFileName"
|
<controls:LabeledSettingsCard x:Name="CardUseCustomSaveFileName"
|
||||||
Header="使用自定义保存文件名"
|
Header="{i18n:I18n Key=Automation_UseCustomSaveFileName_Header}"
|
||||||
Description="开启后可选择保存文件的命名方式"
|
Description="{i18n:I18n Key=Automation_UseCustomSaveFileName_Desc}"
|
||||||
Icon="{x:Static ui:SegoeFluentIcons.Edit}"
|
Icon="{x:Static ui:SegoeFluentIcons.Edit}"
|
||||||
Toggled="ToggleSwitchUseCustomSaveFileName_Toggled"/>
|
Toggled="ToggleSwitchUseCustomSaveFileName_Toggled"/>
|
||||||
|
|
||||||
<ui:SettingsExpander x:Name="CardSaveFileNamePreset" Header="文件名格式">
|
<ui:SettingsExpander x:Name="CardSaveFileNamePreset" Header="{i18n:I18n Key=Automation_SaveFileNameFormat}">
|
||||||
<ui:SettingsExpander.HeaderIcon>
|
<ui:SettingsExpander.HeaderIcon>
|
||||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}"/>
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}"/>
|
||||||
</ui:SettingsExpander.HeaderIcon>
|
</ui:SettingsExpander.HeaderIcon>
|
||||||
<ComboBox x:Name="ComboBoxSaveFileNamePreset"
|
<ComboBox x:Name="ComboBoxSaveFileNamePreset"
|
||||||
MinWidth="260"
|
MinWidth="260"
|
||||||
SelectionChanged="ComboBoxSaveFileNamePreset_SelectionChanged">
|
SelectionChanged="ComboBoxSaveFileNamePreset_SelectionChanged">
|
||||||
<ComboBoxItem Content="时间戳(默认)" Tag="{}{datetime}"/>
|
<ComboBoxItem Content="{i18n:I18n Key=Automation_SaveFileName_Timestamp}" Tag="{}{datetime}"/>
|
||||||
<ComboBoxItem Content="日期" Tag="{}{date}"/>
|
<ComboBoxItem Content="{i18n:I18n Key=Automation_SaveFileName_Date}" Tag="{}{date}"/>
|
||||||
<ComboBoxItem Content="日期 + 时间" Tag="{}{date}_{time}"/>
|
<ComboBoxItem Content="{i18n:I18n Key=Automation_SaveFileName_DateTime}" Tag="{}{date}_{time}"/>
|
||||||
<ComboBoxItem Content="日期 + 模式" Tag="{}{date}_{mode}"/>
|
<ComboBoxItem Content="{i18n:I18n Key=Automation_SaveFileName_DateMode}" Tag="{}{date}_{mode}"/>
|
||||||
<ComboBoxItem Content="日期 + 模式 + 页码" Tag="{}{date}_{mode}_Page-{page}"/>
|
<ComboBoxItem Content="{i18n:I18n Key=Automation_SaveFileName_DateModePage}" Tag="{}{date}_{mode}_Page-{page}"/>
|
||||||
<ComboBoxItem Content="日期 + 模式 + 页码 + 笔画数" Tag="{}{date}_{mode}_Page-{page}_Strokes-{count}"/>
|
<ComboBoxItem Content="{i18n:I18n Key=Automation_SaveFileName_DateModePageCount}" Tag="{}{date}_{mode}_Page-{page}_Strokes-{count}"/>
|
||||||
<ComboBoxItem Content="自定义..." Tag="__custom__"/>
|
<ComboBoxItem Content="{i18n:I18n Key=Automation_SaveFileName_Custom}" Tag="__custom__"/>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<ui:SettingsExpander.Items>
|
<ui:SettingsExpander.Items>
|
||||||
<ui:SettingsCard x:Name="CardCustomSaveFileNameTemplate"
|
<ui:SettingsCard x:Name="CardCustomSaveFileNameTemplate"
|
||||||
Header="自定义模板"
|
Header="{i18n:I18n Key=Automation_SaveFileName_CustomTemplate_Header}"
|
||||||
Description="可用占位符:{date} {time} {datetime} {mode} {page} {count} {type}"
|
Description="{i18n:I18n Key=Automation_SaveFileName_CustomTemplate_Desc}"
|
||||||
Visibility="Collapsed">
|
Visibility="Collapsed">
|
||||||
<TextBox x:Name="TextBoxCustomSaveFileNameTemplate"
|
<TextBox x:Name="TextBoxCustomSaveFileNameTemplate"
|
||||||
MinWidth="260"
|
MinWidth="260"
|
||||||
|
|||||||
@@ -294,8 +294,14 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
|||||||
private void BrushAutoRestoreWidthSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
private void BrushAutoRestoreWidthSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||||
{
|
{
|
||||||
if (!_isLoaded) return;
|
if (!_isLoaded) return;
|
||||||
var val = Math.Round(BrushAutoRestoreWidthSlider.Value, 2);
|
var slider = BrushAutoRestoreWidthSlider;
|
||||||
BrushAutoRestoreWidthSlider.Value = val;
|
var val = Math.Round(slider.Value, 2);
|
||||||
|
// 仅在四舍五入纠正了显示值时回写;那次 set 会重入 ValueChanged 完成保存。
|
||||||
|
if (slider.Value != val)
|
||||||
|
{
|
||||||
|
slider.Value = val;
|
||||||
|
return;
|
||||||
|
}
|
||||||
SettingsManager.Settings.Canvas.BrushAutoRestoreWidth = val;
|
SettingsManager.Settings.Canvas.BrushAutoRestoreWidth = val;
|
||||||
SettingsManager.SaveSettingsToFile();
|
SettingsManager.SaveSettingsToFile();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
||||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||||
xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
|
xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
|
||||||
|
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Debug">
|
Title="Debug">
|
||||||
|
|
||||||
@@ -32,8 +33,8 @@
|
|||||||
Text="Debug" />
|
Text="Debug" />
|
||||||
|
|
||||||
<controls:LabeledSettingsCard x:Name="ToggleSwitchDebugConsole"
|
<controls:LabeledSettingsCard x:Name="ToggleSwitchDebugConsole"
|
||||||
Header="显示调试窗口"
|
Header="{i18n:I18n Key=Debug_ShowConsole_Header}"
|
||||||
Description="显示一个独立的控制台窗口,用于实时输出日志(开启后立即生效;关闭设置中的“启用日志记录”将不会输出内容)。"
|
Description="{i18n:I18n Key=Debug_ShowConsole_Desc}"
|
||||||
Icon="{x:Static ui:SegoeFluentIcons.DeveloperTools}"
|
Icon="{x:Static ui:SegoeFluentIcons.DeveloperTools}"
|
||||||
IsOn="False"
|
IsOn="False"
|
||||||
Toggled="ToggleSwitchDebugConsole_Toggled"/>
|
Toggled="ToggleSwitchDebugConsole_Toggled"/>
|
||||||
|
|||||||
@@ -216,8 +216,14 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
|||||||
private void MLAvoidanceWeightSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
private void MLAvoidanceWeightSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||||
{
|
{
|
||||||
if (!_isLoaded) return;
|
if (!_isLoaded) return;
|
||||||
var val = Math.Round(MLAvoidanceWeightSlider.Value, 2);
|
var slider = MLAvoidanceWeightSlider;
|
||||||
MLAvoidanceWeightSlider.Value = val;
|
var val = Math.Round(slider.Value, 2);
|
||||||
|
// 仅当四舍五入纠正了显示值时才回写;那次 set 会重入 ValueChanged 完成保存。
|
||||||
|
if (slider.Value != val)
|
||||||
|
{
|
||||||
|
slider.Value = val;
|
||||||
|
return;
|
||||||
|
}
|
||||||
SettingsManager.Settings.RandSettings.MLAvoidanceWeight = val;
|
SettingsManager.Settings.RandSettings.MLAvoidanceWeight = val;
|
||||||
SettingsManager.SaveSettingsToFile();
|
SettingsManager.SaveSettingsToFile();
|
||||||
}
|
}
|
||||||
@@ -281,8 +287,13 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
|||||||
private void TimerVolumeSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
private void TimerVolumeSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||||
{
|
{
|
||||||
if (!_isLoaded) return;
|
if (!_isLoaded) return;
|
||||||
var val = Math.Round(TimerVolumeSlider.Value, 2);
|
var slider = TimerVolumeSlider;
|
||||||
TimerVolumeSlider.Value = val;
|
var val = Math.Round(slider.Value, 2);
|
||||||
|
if (slider.Value != val)
|
||||||
|
{
|
||||||
|
slider.Value = val;
|
||||||
|
return;
|
||||||
|
}
|
||||||
SettingsManager.Settings.RandSettings.TimerVolume = val;
|
SettingsManager.Settings.RandSettings.TimerVolume = val;
|
||||||
SettingsManager.SaveSettingsToFile();
|
SettingsManager.SaveSettingsToFile();
|
||||||
}
|
}
|
||||||
@@ -321,8 +332,13 @@ namespace Ink_Canvas.Windows.SettingsViews.Pages
|
|||||||
private void ProgressiveReminderVolumeSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
private void ProgressiveReminderVolumeSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||||
{
|
{
|
||||||
if (!_isLoaded) return;
|
if (!_isLoaded) return;
|
||||||
var val = Math.Round(ProgressiveReminderVolumeSlider.Value, 2);
|
var slider = ProgressiveReminderVolumeSlider;
|
||||||
ProgressiveReminderVolumeSlider.Value = val;
|
var val = Math.Round(slider.Value, 2);
|
||||||
|
if (slider.Value != val)
|
||||||
|
{
|
||||||
|
slider.Value = val;
|
||||||
|
return;
|
||||||
|
}
|
||||||
SettingsManager.Settings.RandSettings.ProgressiveReminderVolume = val;
|
SettingsManager.Settings.RandSettings.ProgressiveReminderVolume = val;
|
||||||
SettingsManager.SaveSettingsToFile();
|
SettingsManager.SaveSettingsToFile();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,9 +155,9 @@
|
|||||||
</ui:NavigationViewItem>
|
</ui:NavigationViewItem>
|
||||||
<ui:NavigationViewItem
|
<ui:NavigationViewItem
|
||||||
x:Name="SecurityPageItem"
|
x:Name="SecurityPageItem"
|
||||||
Content="安全"
|
Content="{i18n:I18n Key=Settings_Nav_Security}"
|
||||||
Tag="SecurityPage"
|
Tag="SecurityPage"
|
||||||
ToolTipService.ToolTip="安全密码与进程保护">
|
ToolTipService.ToolTip="{i18n:I18n Key=Settings_Nav_Security_Tooltip}">
|
||||||
<ui:NavigationViewItem.Icon>
|
<ui:NavigationViewItem.Icon>
|
||||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Permissions}"/>
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Permissions}"/>
|
||||||
</ui:NavigationViewItem.Icon>
|
</ui:NavigationViewItem.Icon>
|
||||||
@@ -195,9 +195,9 @@
|
|||||||
</ui:NavigationViewItem>
|
</ui:NavigationViewItem>
|
||||||
<ui:NavigationViewItem
|
<ui:NavigationViewItem
|
||||||
x:Name="HotkeyPageItem"
|
x:Name="HotkeyPageItem"
|
||||||
Content="快捷键"
|
Content="{i18n:I18n Key=Settings_Nav_Hotkey}"
|
||||||
Tag="HotkeyPage"
|
Tag="HotkeyPage"
|
||||||
ToolTipService.ToolTip="快捷键设置">
|
ToolTipService.ToolTip="{i18n:I18n Key=Settings_Nav_Hotkey_Tooltip}">
|
||||||
<ui:NavigationViewItem.Icon>
|
<ui:NavigationViewItem.Icon>
|
||||||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.KeyboardStandard}"/>
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.KeyboardStandard}"/>
|
||||||
</ui:NavigationViewItem.Icon>
|
</ui:NavigationViewItem.Icon>
|
||||||
|
|||||||
@@ -587,10 +587,9 @@ namespace Ink_Canvas.Windows.SettingsViews
|
|||||||
if (string.IsNullOrWhiteSpace(raw)) return;
|
if (string.IsNullOrWhiteSpace(raw)) return;
|
||||||
|
|
||||||
string query = raw.Trim();
|
string query = raw.Trim();
|
||||||
string queryLower = query.ToLower();
|
|
||||||
|
|
||||||
var entry = _searchIndex.FirstOrDefault(e => e.Text.Equals(query, StringComparison.OrdinalIgnoreCase))
|
var entry = _searchIndex.FirstOrDefault(e => e.Text.Equals(query, StringComparison.OrdinalIgnoreCase))
|
||||||
?? _searchIndex.FirstOrDefault(e => e.Text.ToLower().Contains(queryLower));
|
?? _searchIndex.FirstOrDefault(e => e.Text.IndexOf(query, StringComparison.OrdinalIgnoreCase) >= 0);
|
||||||
|
|
||||||
NavigateToSearchEntry(entry);
|
NavigateToSearchEntry(entry);
|
||||||
}
|
}
|
||||||
@@ -608,9 +607,8 @@ namespace Ink_Canvas.Windows.SettingsViews
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string queryLower = query.ToLower();
|
|
||||||
var suggestions = _searchIndex
|
var suggestions = _searchIndex
|
||||||
.Where(e => e.Text.ToLower().Contains(queryLower))
|
.Where(e => e.Text.IndexOf(query, StringComparison.OrdinalIgnoreCase) >= 0)
|
||||||
.Select(e => e.Text)
|
.Select(e => e.Text)
|
||||||
.Distinct()
|
.Distinct()
|
||||||
.Take(50)
|
.Take(50)
|
||||||
|
|||||||
Reference in New Issue
Block a user