/// <summary> /// アプリケーションがアイドル状態になったらスプラッシュ画面を閉じる。 /// </summary> private static void Application_Idle(object sender, EventArgs e) { if (splashScreen?.IsDisposed == false) { splashScreen.Close(); } splashScreen = null; Application.Idle -= new EventHandler(Application_Idle); }
/// <summary> /// スプラッシュ画面を表示する。 /// </summary> public static void ShowSplashScreen() { if (splashScreen == null) { Application.Idle += new EventHandler(Application_Idle); splashScreen = new PA0102(); splashScreen.Show(); } }