|
using System;
using System.Windows;
namespace MediaAssistant.Controls.SplashScreen
{
/// <summary>
/// Helper to show or close given splash window
/// </summary>
public static class Splasher
{
/// <summary>
///
/// </summary>
private static Window mSplash;
/// <summary>
/// Get or set the splash screen window
/// </summary>
public static Window Splash
{
get
{
return mSplash;
}
set
{
mSplash = value;
}
}
public static void Show ( )
{
if (Splash == null)
Splash = new SplashScreen();
if ( mSplash != null )
{
mSplash.Show ( );
}
}
/// <summary>
/// Close splash screen
/// </summary>
public static void Close ( )
{
if ( mSplash != null )
{
mSplash.Close ( );
if ( mSplash is IDisposable )
( mSplash as IDisposable ).Dispose ( );
mSplash = null;
}
}
public static void SetMessage(string message)
{
MessageListener.Instance.ReceiveMessage(message);
}
public static void ShowBusy(bool show)
{
MessageListener.Instance.BusyIconVisibility = show ? Visibility.Visible : Visibility.Hidden;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.