예제 #1
0
        public static void HideMe(Form owner)
        {
            owner.UseWaitCursor = false;
            owner.Enabled       = true;

            if (_Instance != null)
            {
                _Instance.Close();
                _Instance = null;
            }

            Application.DoEvents();
        }
예제 #2
0
        public static void ShowMe(Form owner, string message)
        {
            owner.UseWaitCursor = true;

            if (_Instance == null || _Instance.IsDisposed)
            {
                _Instance = new frmWaiting();
            }
            _Instance.Owner       = owner;
            _Instance.lblMsg.Text = String.IsNullOrEmpty(message) ? _Instance.lblMsg.Text : message;
            _Instance.lblMsg.Invalidate();
            _Instance.Show();

            Application.DoEvents();
        }
예제 #3
0
 private void frmWaiting_FormClosed(object sender, FormClosedEventArgs e)
 {
     _Instance = null;
 }