using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Resources;
using System.Threading.Tasks;
using System.Windows;
using System.Reflection;
namespace demo1017
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
SplashScreen screen = null;
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
screen = new SplashScreen("img12.jpg");
screen.Show(false);
Action action = new Action(() =>
{
for (int i = 0; i < 100; i++)
{
System.Threading.Thread.Sleep(100);
}
});
action.BeginInvoke(new AsyncCallback(InitCallBack), null);
}
void InitCallBack(IAsyncResult ar)
{
screen.Close(TimeSpan.FromSeconds(0));
}
}
}