using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace SPC.Kiosk.Common
{
public sealed class WaitWindow : IDisposable
{
private static WaitWindow instance = null;
private static readonly object padlock = new object();
///
/// This Class Instance
///
public static WaitWindow GetInstance
{
get
{
lock (padlock)
{
if (instance == null)
{
instance = new WaitWindow();
}
return instance;
}
}
}
private WaitForm WaitWindowForm = null;
///
/// Is Show Wait Window
///
public bool IsShowWindow { get; set; }
public WaitWindow()
{
WaitWindowForm = new WaitForm();
}
///
/// Show Process Wait Window
///
///
///
public void ShowWaitWindow()
{
if (WaitWindowForm == null || !IsShowWindow)
{
WaitWindowForm = new WaitForm();
}
WaitWindowForm.Show();
IsShowWindow=true;
}
///
/// Close Process Wait Window
///
public void CloseWaitWindow()
{
if (WaitWindowForm != null && IsShowWindow)
{
IsShowWindow = false;
WaitWindowForm.Close();
//WaitWindowForm = null;
}
}
///
/// Dispose Process Wait Window
///
public void Dispose()
{
if (WaitWindowForm != null)
{
WaitWindowForm.Close();
WaitWindowForm = null;
}
}
}
}