using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; using Windows.ApplicationModel.Activation; using Windows.UI.Core; using Windows.UI.ViewManagement; using PasswordTest.Helpers; using Windows.UI; using System.Reflection; // https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板
namespace PasswordTest { ///
/// 可用于自身或导航至 Frame 内部的空白页。 ///
public sealed partial class SplashPage : Page { internal Rect splashImageRect; // 用来获取屏幕显示区域的大小 private SplashScreen splash; // Variable to hold the splash screen object. internal bool dismissed = false; //追踪启动画面解除状态的变量。 internal Frame rootFrame;
// Define methods and constructor public SplashPage(SplashScreen splashscreen, bool loadState) { InitializeComponent();
// Listen for window resize events to reposition the extended splash screen image accordingly. // This ensures that the extended splash screen formats properly in response to window resizing. Window.Current.SizeChanged += new WindowSizeChangedEventHandler(ExtendedSplash\_OnResize);
splash = splashscreen; if (splash != null) { // 注册一个事件处理程序,以便在启动屏幕被关闭时执行。 splash.Dismissed += new TypedEventHandler<SplashScreen, Object>(DismissedEventHandler);