improve:UI
This commit is contained in:
@@ -1197,8 +1197,6 @@ namespace Ink_Canvas
|
|||||||
Helpers.DebugConsoleManager.Show();
|
Helpers.DebugConsoleManager.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
_ = TelemetryUploader.UploadTelemetryIfNeededAsync();
|
|
||||||
|
|
||||||
LoadCustomBackgroundColor();
|
LoadCustomBackgroundColor();
|
||||||
SetWindowMode();
|
SetWindowMode();
|
||||||
|
|
||||||
@@ -1296,11 +1294,6 @@ namespace Ink_Canvas
|
|||||||
|
|
||||||
// 应用无焦点模式设置
|
// 应用无焦点模式设置
|
||||||
ApplyNoFocusMode();
|
ApplyNoFocusMode();
|
||||||
// 应用窗口置顶设置
|
|
||||||
Dispatcher.BeginInvoke(new Action(() =>
|
|
||||||
{
|
|
||||||
ApplyAlwaysOnTop();
|
|
||||||
}), DispatcherPriority.ApplicationIdle);
|
|
||||||
|
|
||||||
// 设置UIA置顶状态
|
// 设置UIA置顶状态
|
||||||
App.IsUIAccessTopMostEnabled = Settings.Advanced.EnableUIAccessTopMost;
|
App.IsUIAccessTopMostEnabled = Settings.Advanced.EnableUIAccessTopMost;
|
||||||
@@ -1311,18 +1304,6 @@ namespace Ink_Canvas
|
|||||||
|
|
||||||
_ = RunDeferredStartupPhaseBAsync();
|
_ = RunDeferredStartupPhaseBAsync();
|
||||||
|
|
||||||
Dispatcher.BeginInvoke(new Action(() =>
|
|
||||||
{
|
|
||||||
LoadInkFadeSettings();
|
|
||||||
LoadBrushAutoRestoreSettings();
|
|
||||||
}), DispatcherPriority.ApplicationIdle);
|
|
||||||
|
|
||||||
// 初始化墨迹渐隐管理器
|
|
||||||
Dispatcher.BeginInvoke(new Action(() =>
|
|
||||||
{
|
|
||||||
InitializeInkFadeManager();
|
|
||||||
}), DispatcherPriority.ApplicationIdle);
|
|
||||||
|
|
||||||
// 处理命令行参数中的文件路径
|
// 处理命令行参数中的文件路径
|
||||||
HandleCommandLineFileOpen();
|
HandleCommandLineFileOpen();
|
||||||
|
|
||||||
@@ -1420,12 +1401,6 @@ namespace Ink_Canvas
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}), DispatcherPriority.Loaded);
|
}), DispatcherPriority.Loaded);
|
||||||
Dispatcher.BeginInvoke(new Action(() =>
|
|
||||||
{
|
|
||||||
if (_sliderTouchSupportInitialized) return;
|
|
||||||
AddTouchSupportToSliders();
|
|
||||||
_sliderTouchSupportInitialized = true;
|
|
||||||
}), DispatcherPriority.ApplicationIdle);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ApplyLanguageFromSettings()
|
private void ApplyLanguageFromSettings()
|
||||||
@@ -2311,6 +2286,27 @@ namespace Ink_Canvas
|
|||||||
InitializeFloatingWindowInterceptor();
|
InitializeFloatingWindowInterceptor();
|
||||||
InitializeGlobalHotkeyManager();
|
InitializeGlobalHotkeyManager();
|
||||||
|
|
||||||
|
_ = TelemetryUploader.UploadTelemetryIfNeededAsync();
|
||||||
|
|
||||||
|
_ = Dispatcher.BeginInvoke(new Action(() =>
|
||||||
|
{
|
||||||
|
ApplyAlwaysOnTop();
|
||||||
|
}), DispatcherPriority.ApplicationIdle);
|
||||||
|
|
||||||
|
_ = Dispatcher.BeginInvoke(new Action(() =>
|
||||||
|
{
|
||||||
|
LoadInkFadeSettings();
|
||||||
|
LoadBrushAutoRestoreSettings();
|
||||||
|
InitializeInkFadeManager();
|
||||||
|
}), DispatcherPriority.ApplicationIdle);
|
||||||
|
|
||||||
|
_ = Dispatcher.BeginInvoke(new Action(() =>
|
||||||
|
{
|
||||||
|
if (_sliderTouchSupportInitialized) return;
|
||||||
|
AddTouchSupportToSliders();
|
||||||
|
_sliderTouchSupportInitialized = true;
|
||||||
|
}), DispatcherPriority.ApplicationIdle);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string savePath = Settings.Automation.AutoSavedStrokesLocation;
|
string savePath = Settings.Automation.AutoSavedStrokesLocation;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
|
xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
|
||||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="欢迎使用 InkCanvasForClass"
|
Title="欢迎使用 InkCanvasForClass CE"
|
||||||
Height="700"
|
Height="700"
|
||||||
Width="1080"
|
Width="1080"
|
||||||
MinHeight="520"
|
MinHeight="520"
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
<Image Source="\Resources\icc.ico" Width="18"
|
<Image Source="\Resources\icc.ico" Width="18"
|
||||||
RenderOptions.BitmapScalingMode="HighQuality" />
|
RenderOptions.BitmapScalingMode="HighQuality" />
|
||||||
<TextBlock VerticalAlignment="Center"
|
<TextBlock VerticalAlignment="Center"
|
||||||
Text="欢迎使用 InkCanvasForClass"
|
Text="欢迎使用 InkCanvasForClass CE"
|
||||||
TextWrapping="NoWrap" />
|
TextWrapping="NoWrap" />
|
||||||
</ikw:SimpleStackPanel>
|
</ikw:SimpleStackPanel>
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
RenderOptions.BitmapScalingMode="HighQuality" />
|
RenderOptions.BitmapScalingMode="HighQuality" />
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<TextBlock Text="欢迎使用 InkCanvasForClass"
|
<TextBlock Text="欢迎使用 InkCanvasForClass CE"
|
||||||
Style="{DynamicResource TitleLargeTextBlockStyle}"
|
Style="{DynamicResource TitleLargeTextBlockStyle}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
|
|||||||
@@ -306,17 +306,6 @@ namespace Ink_Canvas.Windows
|
|||||||
|
|
||||||
private void BtnConfirm_Click(object sender, RoutedEventArgs e)
|
private void BtnConfirm_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
// 离开"启动与隐私"页前必须勾选隐私协议
|
|
||||||
if (_currentStep == 0 && CheckBoxPrivacyAccepted.IsChecked != true)
|
|
||||||
{
|
|
||||||
MessageBox.Show(this,
|
|
||||||
"请先勾选\"我已阅读并同意《隐私协议》\"后再继续。",
|
|
||||||
"需要同意隐私协议",
|
|
||||||
MessageBoxButton.OK,
|
|
||||||
MessageBoxImage.Information);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_currentStep == FinishIndex)
|
if (_currentStep == FinishIndex)
|
||||||
{
|
{
|
||||||
ApplySelection();
|
ApplySelection();
|
||||||
@@ -341,18 +330,6 @@ namespace Ink_Canvas.Windows
|
|||||||
int target = ResolveTargetFromNavItem(args.SelectedItem as NavigationViewItem);
|
int target = ResolveTargetFromNavItem(args.SelectedItem as NavigationViewItem);
|
||||||
if (target == _currentStep) return;
|
if (target == _currentStep) return;
|
||||||
|
|
||||||
// 强制隐私门禁: 如果当前在步骤 0 且未勾选, 仅允许返回欢迎页, 不允许跳到后续步骤
|
|
||||||
if (_currentStep == 0 && CheckBoxPrivacyAccepted.IsChecked != true && target > 0)
|
|
||||||
{
|
|
||||||
MessageBox.Show(this,
|
|
||||||
"请先勾选\"我已阅读并同意《隐私协议》\"后再继续。",
|
|
||||||
"需要同意隐私协议",
|
|
||||||
MessageBoxButton.OK,
|
|
||||||
MessageBoxImage.Information);
|
|
||||||
SyncNavSelection();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int direction = target > _currentStep ? 1 : -1;
|
int direction = target > _currentStep ? 1 : -1;
|
||||||
NavigateTo(target, direction);
|
NavigateTo(target, direction);
|
||||||
}
|
}
|
||||||
@@ -405,6 +382,7 @@ namespace Ink_Canvas.Windows
|
|||||||
|
|
||||||
private void HyperlinkPrivacy_Click(object sender, RoutedEventArgs e)
|
private void HyperlinkPrivacy_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
e.Handled = true;
|
||||||
if (_privacyDialogShown) return;
|
if (_privacyDialogShown) return;
|
||||||
_privacyDialogShown = true;
|
_privacyDialogShown = true;
|
||||||
try
|
try
|
||||||
@@ -422,15 +400,15 @@ namespace Ink_Canvas.Windows
|
|||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
_privacyDialogShown = false;
|
Dispatcher.BeginInvoke(new Action(() => _privacyDialogShown = false),
|
||||||
|
System.Windows.Threading.DispatcherPriority.Background);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateConfirmEnabled()
|
private void UpdateConfirmEnabled()
|
||||||
{
|
{
|
||||||
if (BtnConfirm == null || CheckBoxPrivacyAccepted == null) return;
|
if (BtnConfirm == null) return;
|
||||||
// 在步骤 0 时, 必须先勾选隐私协议才能继续
|
BtnConfirm.IsEnabled = true;
|
||||||
BtnConfirm.IsEnabled = _currentStep != 0 || CheckBoxPrivacyAccepted.IsChecked == true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user