protected override void OnStartup(StartupEventArgs e) { MySplashScreen splash = new MySplashScreen(); splash.Show(); Stopwatch timer = new Stopwatch(); timer.Start(); base.OnStartup(e); MainWindow main = new MainWindow(); timer.Stop(); int remaining = tim_min - (int)timer.ElapsedMilliseconds; if (remaining > 0) { Thread.Sleep(remaining); } splash.Close(); }
private static void InitSplashScreen() { if (MyFakes.ENABLE_SPLASHSCREEN) { splashScreen = new MySplashScreen(SPLASHSCREEN_IMAGE, new PointF(0.7f, 0.7f)); splashScreen.Draw(); } }
public void InitSplashScreen() { if (MyFakes.ENABLE_SPLASHSCREEN && !m_args.Contains("-nosplash")) { splashScreen = new MySplashScreen(GameInfo.SplashScreenImage, new PointF(0.7f, 0.7f)); splashScreen.Draw(); } }
public App() { InitializeComponent(); AppResources.Culture = CrossMultilingual.Current.DeviceCultureInfo; StripeConfiguration.SetApiKey("sk_live_XXXXXXXXXXXXXXX"); SendBirdClient.Init(ChelperPro.Properties.Resources.APP_ID); MainPage = new MySplashScreen(); }
// partial method,实现了 App.xaml.cs 中的声明 partial void OnLaunched_SplashScreen(LaunchActivatedEventArgs args) { // 启动后显示自定义启动屏幕 if (args.PreviousExecutionState != ApplicationExecutionState.Running) { MySplashScreen mySplashScreen = new MySplashScreen(args); Window.Current.Content = mySplashScreen; } }