From 83558c089d2d7b1cbb530676b6eb179b6dc14fbe Mon Sep 17 00:00:00 2001
From: CJKmkp <2564608840@qq.com>
Date: Thu, 2 Oct 2025 00:17:11 +0800
Subject: [PATCH] =?UTF-8?q?add:=E8=BD=AF=E4=BB=B6=E5=90=AF=E5=8A=A8?=
=?UTF-8?q?=E5=8A=A8=E7=94=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Ink Canvas/Windows/SplashScreen.xaml.cs | 50 ++++++++++++++++++++++++-
1 file changed, 48 insertions(+), 2 deletions(-)
diff --git a/Ink Canvas/Windows/SplashScreen.xaml.cs b/Ink Canvas/Windows/SplashScreen.xaml.cs
index 2b3e2444..b7484b51 100644
--- a/Ink Canvas/Windows/SplashScreen.xaml.cs
+++ b/Ink Canvas/Windows/SplashScreen.xaml.cs
@@ -3,6 +3,7 @@ using System.Reflection;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
+using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Threading;
using System.IO;
@@ -158,9 +159,56 @@ namespace Ink_Canvas.Windows
Dispatcher.Invoke(() =>
{
LoadingText.Text = message;
+
+ // 根据启动动画样式调整加载文本样式
+ int splashStyle = GetCurrentSplashStyle();
+ if (splashStyle == 6) // 马年限定
+ {
+ // 马年限定样式
+ LoadingText.FontSize = 12;
+ LoadingText.FontWeight = FontWeights.SemiBold;
+ LoadingText.Foreground = Brushes.White;
+ LoadingText.HorizontalAlignment = HorizontalAlignment.Left;
+ LoadingText.Margin = new Thickness(0, -133, 160, 140);
+ }
+ else
+ {
+ // 默认样式
+ LoadingText.FontSize = 18;
+ LoadingText.FontWeight = FontWeights.SemiBold;
+ LoadingText.Foreground = Brushes.White;
+ LoadingText.HorizontalAlignment = HorizontalAlignment.Center;
+ LoadingText.Margin = new Thickness(0, -150, 0, 140);
+ }
});
}
+ ///
+ /// 获取当前启动动画样式
+ ///
+ /// 启动动画样式索引
+ private int GetCurrentSplashStyle()
+ {
+ try
+ {
+ var settingsPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Configs", "Settings.json");
+ if (File.Exists(settingsPath))
+ {
+ var json = File.ReadAllText(settingsPath);
+ dynamic obj = JsonConvert.DeserializeObject(json);
+ if (obj?["appearance"]?["splashScreenStyle"] != null)
+ {
+ return (int)obj["appearance"]["splashScreenStyle"];
+ }
+ }
+ return 1; // 默认跟随四季
+ }
+ catch
+ {
+ return 1; // 默认跟随四季
+ }
+ }
+
///
/// 设置版本号文本
///
@@ -265,8 +313,6 @@ namespace Ink_Canvas.Windows
return "ICC Winter.png";
case 6: // 马年限定
return "ICC Horse.png";
- default:
- return "ICC Autumn.png"; // 默认秋季
}
}
}